Thanks Dave.
Will give a shot using PEM_write_bio_RSAPUBKEY.

On Fri, Nov 2, 2012 at 7:12 PM, Dave Thompson <dthomp...@prinpay.com> wrote:

> >From: owner-openssl-us...@openssl.org On Behalf Of Taraniteja Vishwanatha
> >Sent: Friday, 02 November, 2012 18:29
>
> Answering only -users, this is not a -dev question.
>
> >I want to generate a RSA key pair in x509 format and pem encoded
> >( BEGIN PUBLIC KEY .........END PUBLIC KEY).
> >Can anyone give me an example of how to do that?
> >Its working if I want it in PKCS1 format. Here is my code:
> <snip>
> >int retVal = PEM_write_bio_RSAPublicKey(publicBio, rsaKey);
> >if( retVal == 0) ...
>
> Assuming you mean SubjectPublicKeyInfo,
> on the same man page as PEM_{read,write}{,_bio}_RSAPublicKey,
> see PEM_{read,write}{,_bio}_RSA_PUBKEY.
>
> Or use generic EVP_PKEY and PEM_{read,write}{,_bio}_PUBKEY .
>
>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@openssl.org
>

Reply via email to