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 API to set Crypto Provider #107

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

Conversation

nodh
Copy link

@nodh nodh commented Dec 22, 2021

Adds an API to explicitely set a Java Crypto Provider to use for all crypto operations in the library.

Comment on lines 1248 to 1249
if (cnSign.ContainsKey("countersign0")) {
AddCounterSignature0(hSignObj, cnSigners.get("countersign0"));
AddCounterSignature0(hSignObj, cnSign.get("countersign0"));
Copy link
Contributor

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.

Copy link
Author

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.

Copy link
Contributor

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?

Copy link
Author

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.

@nodh nodh requested a review from emlun October 11, 2023 10:27
@@ -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);
Copy link
Contributor

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)?

Copy link
Author

Choose a reason for hiding this comment

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

Good catch

@nodh nodh requested a review from emlun October 20, 2023 07:09
Copy link
Contributor

@emlun emlun left a 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.

@nodh
Copy link
Author

nodh commented Oct 25, 2023

My apologies, pinging @ivajloip, @jimsch

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