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

Handle leading zeros in (r|s)-parameters of ECDSA signature #17

Closed
wants to merge 1 commit into from

Conversation

xbill-dns
Copy link

@xbill-dns xbill-dns commented Mar 5, 2019

break;
case Algorithm.ECDSAP384SHA384:
signature = ECDSASignaturefromDNS(signature,
ECDSA_P384);
signature = convertECDSASignature(signature);
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicate branches in switch. If both this case and the one above it are to call the same exact method, would it would be cleaner to:

  case Algorithm.ECDSAP256SHA256:
  case Algorithm.ECDSAP384SHA384:
    signature = convertECDSASignature(signature);
    break;

* verification purposes.
*/
public static byte[] convertECDSASignature(byte[] signature) {
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Dangling javadoc. Perhaps just use the regular block comment?

* and
* https://github.com/gryphius/dnsjava/commit/b4216b35a8386cf47e2c59a875c655d584624d1d
*/
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Unneeded extra braces {} ?

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.

None yet

2 participants