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

Fix issue that leads to differently encoded signature AlgorithmIdentifier after reencoding #651

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MaxFichtelmann
Copy link
Contributor

fix #650 by adding an additional property signatureAlgorithm onto the cert object created by pki.certificateFromAsn1.

when encoding the certificate and the above signatureAlgorithm property is present, it is used instead of constructing the algorithm from oid and parameters. In its absence the original approach is used, so this should only have an impact when encoding a previously decoded certificate.

@MaxFichtelmann MaxFichtelmann changed the title Forge 650 #650 - make sure to reencode certificates with the same signature AlgorithmIdentifier Feb 8, 2019
@MaxFichtelmann MaxFichtelmann changed the title #650 - make sure to reencode certificates with the same signature AlgorithmIdentifier Fix issue that leads to differently encoded signature AlgorithmIdentifier after reencoding Feb 8, 2019
@MaxFichtelmann
Copy link
Contributor Author

could you possibly take a look, if this solution fits? Is there a problem that prevents it to be merged?

@davidlehn
Copy link
Member

Sorry, we've been busy on other projects and haven't had a chance to get to this. At some point we'll find the time for a proper review. Two small things I noticed that should be changed:

  • Files in that test/issues/ dir are not run automatically. I assume your new tests should always run so they should be added to the files in tests/unit/. Probably tacked onto x509.js? Could just use a comment to say what issue they are addressing.
  • Use 2 space indents in the test code to match the other code.

@MaxFichtelmann
Copy link
Contributor Author

thank you, will do that.

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.

x509 binary extracted from PKCS12 differs slightly from actual X.509
2 participants