-
Notifications
You must be signed in to change notification settings - Fork 25
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 API to set Crypto Provider #107
base: master
Are you sure you want to change the base?
Conversation
if (cnSign.ContainsKey("countersign0")) { | ||
AddCounterSignature0(hSignObj, cnSigners.get("countersign0")); | ||
AddCounterSignature0(hSignObj, cnSign.get("countersign0")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm definitely not sure, but it looks to me like this should be the other way around: that the if
condition should change to cnSigners
instead, because there's already an if
statement like this for cnSign
on line 1217 above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, probably, but it doesn't change anything in the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this was changed in 425c5df in the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did change it, because it seems logical to me.
src/main/java/COSE/OneKey.java
Outdated
@@ -483,22 +496,37 @@ static public OneKey generateKey(AlgorithmID algorithm) throws CoseException { | |||
* @throws CoseException | |||
*/ | |||
static public OneKey generateKey(AlgorithmID algorithm, String parameters) throws CoseException { | |||
return generateKey(algorithm, null, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this should be generateKey(algorithm, parameters, null)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why I was requested to review, but this seems fine to me. I'm not a maintainer of the project, though, and I don't know how the project is governed.
Adds an API to explicitely set a Java Crypto Provider to use for all crypto operations in the library.