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 FindAllCertificates method #71

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mekpavit
Copy link

@mekpavit mekpavit commented Aug 11, 2020

This pull request add new method FindAllCertificates on *crypto11.Context class. The use case of this method is when the client doesn't know any details about certificates stored in HSM token but want to retrieve/lookup for the certificate.

Changes:

  • Add FindAllCertificates method. The code is based on FindCertificate and was edited for the new functionality. The code duplication between FindCertificate and FindAllCertificates can be removed but I think it's fine to leave it like this for now.
  • Add TestFindAllCertificates function in certificates_test.go to test FindAllCertificates method
  • Add removeAllCertificates in certificates_test.go helper function that find and remove all certificates in the token
  • Add removeAllCertificates() at the end of each test cases in certificates_test.go to make each case independent of each other

Copy link
Contributor

@solcates solcates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delayed review. LGTM, merging. Thanks for the handy contrib.

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 this pull request may close these issues.

2 participants