forge icon indicating copy to clipboard operation
forge copied to clipboard

Fix issue that leads to differently encoded signature AlgorithmIdentifier after reencoding

Open MaxFichtelmann opened this issue 7 years ago • 3 comments

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 avatar Feb 08 '19 16:02 MaxFichtelmann

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

MaxFichtelmann avatar Mar 13 '19 16:03 MaxFichtelmann

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.

davidlehn avatar Mar 15 '19 01:03 davidlehn

thank you, will do that.

MaxFichtelmann avatar Mar 15 '19 09:03 MaxFichtelmann