Convert ECDSA signing code to produce ECDSA signatures in ASN.1 form #1605
+46
−43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Elliptic Curve signatures that Notary produces are not in ASN.1 form, which leads to incompatibilities with some popular external libraries and tools such as OpenSSL (#1544) or AWS KMS. The proposed change here will generate ECDSA signatures in ASN.1 form going forward, but also be backwards-compatible in its Verify logic, i.e. all signatures produced so far for users of Notary will continue to be verified successfully as the original verification logic will remain in the code. All that users will need to do, should they wish to upgrade, is rebuild their client, server and signer.
If there are any reasons why Notary should produce non-ASN.1 signatures, please discuss it in this thread.
Note: an important note is that for Docker CLI to be compatible with the ASN.1 signatures, the Docker client needs to be rebuilt with the updated Notary code, otherwise, Docker CLI won't be able to verify signatures.