Closed derekelkins closed 5 years ago
I plan to tackle this one, I would love being able to generate RSA keys in .pem
file in pure Haskell.
It seems to me that writing the dual of dsaFromASN1
and rsaFromASN1
should be enough to then declare ASN1
instances for PrivKey.
I've written code that does this as part of an unrelated project here. If somebody wants to take that and make a pull request to upstream it that would be great. I know it's really something I should do myself, but it is what it is.
BTW, that project is licensed MPL-2.0, while this is BSD3. However if somebody wants to upstream the Data.X509.IO module, I'll license that module as BSD3 for that purpose.
I've submitted #98 which pulls in @duairc's implementations of ASN1Object
for PrivKey
.
In case there's another suggested way of doing it, my use-case is to produce in-memory RSA private keys in PEM format.