Skip to content

Add FindAllCertificates method#71

Open
mekpavit wants to merge 5 commits intoThalesGroup:masterfrom
mekpavit:master
Open

Add FindAllCertificates method#71
mekpavit wants to merge 5 commits intoThalesGroup:masterfrom
mekpavit:master

Conversation

@mekpavit
Copy link
Copy Markdown

@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
Copy Markdown
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