On Wed, Mar 19, 2003, Robert Locke wrote: > Greetings... > > > I have an RSA public key file exported from PGP v8.0 (ie, foo.asc). How > > can I get openssl to read this file? Do I need to convert it to PEM > > format? How do I do that? > > I feel like I'm getting close to figuring this out, but alas, no cigar. > Here's what I did: > > * I generated a 1024 RSA private key using PGP v.8.0. > * I then exported the key to a file in ASCII armored format (foo.asc). > * I then "dos2unix"'d the file. > * Then: > openssl base64 -d -in foo.asc -out foo.bin > openssl rsa -in foo.bin -inform DER -out foo.pem -outform > PEM -pubin > > However, the final command gives me this error: > asn1 encoding routines:d2i_X509_PUBKEY:expecting an asn1 > sequence:x_pubkey.c > > Any ideas? Am I just totally misunderstanding how this stuff works? > > Still confused... >
The PGP public key format isn't supported by the OpenSSL command line tools. You would have to write a program that would parse the PGP format and output something in OpenSSL PEM format. Why do you want to convert a PGP key for use with OpenSSL? Can't you generate a key using OpenSSL and use that? Steve. -- Dr Stephen N. Henson. Core developer of the OpenSSL project: http://www.openssl.org/ Freelance consultant see: http://www.drh-consultancy.demon.co.uk/ Email: [EMAIL PROTECTED], PGP key: via homepage. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
