Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add is_initialized() to Pkcs11 #77

Closed
ximon18 opened this issue Jan 13, 2022 · 1 comment · Fixed by #84
Closed

Add is_initialized() to Pkcs11 #77

ximon18 opened this issue Jan 13, 2022 · 1 comment · Fixed by #84

Comments

@ximon18
Copy link
Contributor

ximon18 commented Jan 13, 2022

I recently created a PR for the Krill project to switch from the pkcs11 crate to the cryptoki crate and in doing so I discovered a missing piece of functionality: the cryptoki crate has no equivalent of the pkcs11 crate `is_initialized() function.

Of course I can track whether or not I have called initialized myself but that's extra work. Or alternatively add an fn initialize_if_needed() or enable fn initalize() to tolerate being already initialized, which would prevent the caller from having to check and then call initialize to avoid getting an already initialized error.

@ionut-arm
Copy link
Member

I think we should both add is_initialized and make initialize idempotent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants