Re: newbie program crashing.

2009-08-02 Thread Neil Dugan
PMHager wrote: First you fill the rsa structure with the private key, PEM_read_bio_RSAPrivateKey(in,&rsa,NULL,NULL); then you overwrite it with the public key. PEM_read_bio_RSA_PUBKEY(in, &rsa, NULL, NULL); Thanks for hint.. I thought you had to load both public and private keys. I sto

RE: newbie program crashing.

2009-08-02 Thread PMHager
First you fill the rsa structure with the private key, PEM_read_bio_RSAPrivateKey(in,&rsa,NULL,NULL); then you overwrite it with the public key. PEM_read_bio_RSA_PUBKEY(in, &rsa, NULL, NULL); RSA_private_decrypt() which points to RSA_eay_private_decrypt() requires the private exponent rsa-