Hi,

I'm trying to export an RSA key pair in PEM format to be able to use these 
keys in other contexts including with openssl.

The export of the public key unfortunately ends up being unrecognized by 
openssl. (The private one seems to work fine)

Example code is here, http://pastebin.com/qw8wxx4L

When i run:

openssl rsa  -pubin -inform PEM -in pub.pem -noout -text 

to check i get:

unable to load Public Key
139875126281920:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong 
tag:tasn_dec.c:1319:
139875126281920:error:0D07803A:asn1 encoding 
routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:381:Type=X509_ALGOR
139875126281920:error:0D08303A:asn1 encoding 
routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 
error:tasn_dec.c:751:Field=algor, Type=X509_PUBKEY
139875126281920:error:0906700D:PEM routines:PEM_ASN1_read_bio:ASN1 
lib:pem_oth.c:83:

Am i missing anything here? It is more or less cut & paste from the 
examples.

I run Crypto++ 5.6.1(-6) on an 64 bit Ubuntu 13.10 system

/Tor

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to