Fix issue that leads to differently encoded signature AlgorithmIdentifier after reencoding
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.
could you possibly take a look, if this solution fits? Is there a problem that prevents it to be merged?
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 intests/unit/. Probably tacked ontox509.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.
thank you, will do that.