-
Notifications
You must be signed in to change notification settings - Fork 34
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
RSA keys don't roundtrip? #171
Comments
Thanks for your report, I opened #172 with a regression test and a fix. If you could verify that this fixes your issue, that would be great. I'll wait for CI, then merge and release. |
CHANGES: * Fix RSA public and private key encoding and decoding (@hannesm mirleft/ocaml-x509#172, reported by @anmonteiro mirleft/ocaml-x509#171)
Thanks, that fixed RSA, but I think I might be seeing the same for P521? |
@anmonteiro would you mind to open a PR with a regression test? thanks a lot. |
I'm asking since I tried to reproduce "the same for P521", but without luck. Even before I released 1.0.2. Note that this package does not include the public key into the PKCS8 encoded private key dump, as openssl normally does (for reasons unknown to me). This means that a openssl generated private key file, read, decoded, encoded, and written by this package won't be identical - but the private key part is identical. I pushed #173 which includes all the P curve public and private key tests -- together with a shell script what openssl commands have been executed to generate the keypairs. WDYT? |
CHANGES: * Fix RSA public and private key encoding and decoding (@hannesm mirleft/ocaml-x509#172, reported by @anmonteiro mirleft/ocaml-x509#171)
forgive me if this is a dumb mistake on my part, but take this example:
and in a toplevel (e.g. utop):
I'd expect these to roundtrip. In the previous version of X509 (before the Cstruct -> string migration), they did roundtrip:
The text was updated successfully, but these errors were encountered: