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

Report which fields for selecting token were provided #42

Merged

Conversation

cbroglie
Copy link
Contributor

We automatically generate the crypto11.Config values from a PKCS #11
URI, so it's helpful to be report exactly which fields were provided.

We automatically generate the `crypto11.Config` values from a PKCS ThalesGroup#11
URI, so it's helpful to be report exactly which fields were provided.
@cbroglie
Copy link
Contributor Author

If you don't want this in the library we can easily add the same logic to our code before calling Configure, let me know.

@dmjones
Copy link
Contributor

dmjones commented May 21, 2019

Thanks for the PR. Always happy to improve the quality of our error messages. The PR is currently failing due to some tests which relied on the old error messages - would you mind patching that up so I can merge?

That being said, I'm concerned we might break your code (or user experience) one day by changing our error handling. I've tried to avoid the errors becoming part of the API, hence why none of them are exported in v1.0.0.

Even if we merge this in, your code may want to do an equivalent check itself. Especially if you were thinking of piping our error messages to your users.

@cbroglie
Copy link
Contributor Author

I fixed the tests, but no hard feelings if you don't want to merge it. You're right that we should also have this logic on our end.

Copy link
Contributor

@dmjones dmjones left a comment

Choose a reason for hiding this comment

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

LGTM

@dmjones dmjones merged commit 5b9eb55 into ThalesGroup:master May 28, 2019
@dmjones
Copy link
Contributor

dmjones commented May 28, 2019

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