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

Refactor the PKCS11 CryptoCanDo implementation #541

Closed
ionut-arm opened this issue Oct 15, 2021 · 0 comments
Closed

Refactor the PKCS11 CryptoCanDo implementation #541

ionut-arm opened this issue Oct 15, 2021 · 0 comments
Assignees
Labels
code health Issues concerning overall code quality, safety and best practice enhancement New feature or request small Effort label

Comments

@ionut-arm
Copy link
Member

This issue covers a cleanup of the implementation of CryptoCanDo in the PKCS11 provider. Some comments from #426 :

  • methods on types can be called directly on self, so for example Provider::import_check(&self, attributes) can be replaced with self.import_check(attributes).

  • use_check is partially implemented in can_do_crypto_internal - the match arm that covers the use verification does a check before calling the method, which could be moved inside the method

  • is the last return from can_do_crypto_internal needed if the match before it is exhaustive?

@ionut-arm ionut-arm added enhancement New feature or request code health Issues concerning overall code quality, safety and best practice small Effort label labels Oct 15, 2021
@ionut-arm ionut-arm added this to the Parsec Release 0.9.0 milestone Oct 15, 2021
@anta5010 anta5010 self-assigned this Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Issues concerning overall code quality, safety and best practice enhancement New feature or request small Effort label
Projects
None yet
Development

No branches or pull requests

2 participants