Steve, First my appologies for misspelling your name.
Second. Thanks very much for your response. I can happily say that I can now read my key! Now I just need to verify my signature which appears to be in hex as well. I will do a little research but other than converting to b64, is there anything else that I should be aware of with respect to the signature verification? thanks very much for your help. take care, e -----Original Message----- From: Dr. Stephen Henson [mailto:[EMAIL PROTECTED] Sent: Monday, May 03, 2004 1:22 PM To: [EMAIL PROTECTED] Subject: Re: loading an RSA pubkey that is hex encoded and DER On Mon, May 03, 2004, Eleanor Nagai wrote: > Steven, > > Hi! > > Thanks very much for your response. I tried the -keyform option in the dgst > command but get the message "unable to load key file". So I tried your > suggestion > to convert the key to pem format using: > > openssl rsa -in <key file> -pubin -inform der -pubout -outform pem > > but got the following message: > > unable to load Public Key > 12823:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong > tag:tasn_dec.c:946 > 12823:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested > asn1 error:tasn_dec.c:304:Type=X509_PUBKEY > > The asn1parse tool doesn't seem to be able to understand the key file either > as: > > openssl asn1parse -inform <der|txt> -in <key file> -dump > > returns > > 0:d=0 hl=2 l= 48 cons:PRINTABLESTRING > Error in encoding > 12829:error:0D07209B:asn1 encoding routines:ASN1_get_object:too > long:asn1_lib.c:132: > Well 48 = ASCII '0' so it seems like your data really is in hex format. You'll need to convert it to a binary file first either by writing a program or using a utility: IIRC the xxd utility can do this. After that it depends on what format the data is in. If its a subjectPublicKeyInfo structure OpenSSL should have no problems with it. If its and RSAPublicKey you'll need to convert it because currently there's no command line options to handle that. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED] ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
