RE: PEM_read_RSAPublicKey problem

2008-06-26 Thread David Schwartz
> hi again, > i created a publickey.pem with command: > openssl rsa -in myprivate.pem -pubout -out publickey.pem > > then in C i try to read this public key with: > RSA *pubkey = PEM_read_RSAPublicKey(fp, NULL, NULL, NULL) > > where fp is the opened publickey.pem file. > > but it's return this err

Re: PEM_read_RSAPublicKey

2001-12-26 Thread Ricardo Guerra
thanks :) pubKey is supposed to be used to decrypt a string previously encrypted with the privateKey (rsa_private_encrypt).. by the way... is it possible? i have seen some code and openssl itself to encrypt using public key and decrypt using the private key... El Miércoles 26 Diciembre 2001 1

Re: PEM_read_RSAPublicKey

2001-12-26 Thread Dr S N Henson
Ricardo Guerra wrote: > > hi all, > > i've been having trouble with this pice of code, i get a segmentation fault > when reading the public key, this is the way i generated both private and > public keys. > > priv Key: openssl genrsa -out priv.key 1024 > pub Key: cat pub.key | openssl rsa -pubo

Re: PEM_read_RSAPublicKey

2001-11-16 Thread Juan Segarra
On Fri, 16 Nov 2001, Takaaki Ishii wrote: > Hylton Tregenza wrote: > >Sorry, I asked to early, There is nothing wrong with the code. The file > >is not a public key file (or the format isd wrong) How do I extract a > >public key file from a certificate? > > How about to use X509_get_pubkey

Re: PEM_read_RSAPublicKey

2001-11-16 Thread Takaaki Ishii
Hylton Tregenza wrote: >Sorry, I asked to early, There is nothing wrong with the code. The file >is not a public key file (or the format isd wrong) How do I extract a >public key file from a certificate? by command line: $ openssl x509 -in cert.pem -pubkey -noout by writing some code:

RE: PEM_read_RSAPublicKey

2001-11-16 Thread Hylton Tregenza
Sorry, I asked to early, There is nothing wrong with the code. The file is not a public key file (or the format isd wrong) How do I extract a public key file from a certificate? Hylton -Original Message-From: Hylton Tregenza Sent: 16 November 2001 12:24To: [EMAIL PROTECTED]Su

Re: pem_read_rsapublickey question

2001-10-01 Thread Dr S N Henson
d p chang wrote: > > Checking the user archives I haven't seen anyone address this sort of > problem (v0.9.6b). Well it has been addressed before... > I've generated the various keys w/ something liek > this (from teh man page) > > openssl genrsa -out priv.pem 1024 > openssl r