Thanks for this. I also found the Openssl perl module useful
(http://search.cpan.org/dist/Crypt-OpenSSL-RSA/RSA.pm) as it has a
function new_key_from_parameters which uses the rsa components to
generate a key.
Dr. Stephen Henson wrote:
On Wed, Apr 11, 2007, Iain Pople wrote:
Hi,
I am trying to replace a legacy system with openssl. The legacy system
used RSA keys but stored them in its own format. I can extract the RSA
components but I'm not sure how to generate a PEM formatted RSA key.
What is the easiest way to do this? Can the command line tools do it, or
do I need to use the API?
You can use the mini-ASN1 compiler in OpenSSL 0.9.8 with the asn1parse
-genconf option.
There is an example of how to generate an RSAPrivateKey structure in the
ASN1_generate_nconf manual page which can be fed to asn1parse.
Steve.
--
Iain Pople
Systems Interface Technical Lead
University of Melbourne
(
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]