why do you use "openssl genrsa ...." which only generates private key.
Try to use "openssl rsa ..." : It generates RSA key pair (private & public)

Jipé



[EMAIL PROTECTED] a écrit :

> Hello!
>
> I generate a private key using:
> openssl genrsa -out xxx.key 1024
> It contains the private key, but I can get the public key this way:
> openssl rsa -in xxx.key -pubout -out yyy.pub
>
> I can get the private key in a C program using
> PEM_read_PrivateKey(..), but I can't find
> PEM_read_PublicKey(..) function.
>
> So the question is, how could I get the public_key into an EVP_PKEY
> structure from the generated key file. I would use DSA keys too, so I
> would prefer EVP_PKEY struct.
>
> Thanks:
>     Peter
>
> ps.: is it possible, that the private key file contains the public key
> too?
>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
>
> __________________________________________________
> Modem offert : 150,92 euros remboursés sur le Pack eXtense de Wanadoo !
> Haut débit à partir de 30 euros/mois : http://www.ifrance.com/_reloc/w



__________________________________________________
Modem offert : 150,92 euros remboursés sur le Pack eXtense de Wanadoo ! 
Haut débit à partir de 30 euros/mois : http://www.ifrance.com/_reloc/w

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to