You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use :public_key.der_decode/2 with the data provided from the PrivateKeyInfo tuple. I'm assuming the the algorithm identifier is contained inside the PrivateKeyInfo data, but I don't know how to extract it so I've hard-coded :RSAPrivateKey here.
This is the same issue as reported here:
https://stackoverflow.com/questions/41336947/erlang-generate-rsa-keys-from-pem-files
In this case it causes
ExPublicKey.load/2
to return an {:error, _} tuple.Loading the corresponding public key produces the
:RSAPublicKey
as expected.Steps to reproduce
I'm using OpenSSL 1.0.2o
Possible solution
Use
:public_key.der_decode/2
with the data provided from thePrivateKeyInfo
tuple. I'm assuming the the algorithm identifier is contained inside thePrivateKeyInfo
data, but I don't know how to extract it so I've hard-coded:RSAPrivateKey
here.The text was updated successfully, but these errors were encountered: