Hello
When I make an RSA key with
openssl genrsa -out key.pem 1024
I can read it fine with
FILE* fp = ...;
EVP_PKEY* pkey;
pkey = PEM_read_PrivateKey(fp, 0, 0, 0);
and use pkey to sign data. If I try the same with DES3 encryption
openssl genrsa -out key.pem -des3 1024
the same code gives an error
error:0906B072:PEM routines:PEM_get_EVP_CIPHER_INFO:unsupported encryption
The pass phrase usage in apps/rsa.c suggests
pkey = PEM_read_PrivateKey(fp, 0, 0, "passphrase");
could work. It doesn't, but gives the same error.
Does anyone know a way read encrypted RSA keys to EVP_PKEY* variable?
Or maybe RSA keys are not meant to be used this way?
This refers to openssl-0.9.6c on a RH 7.2.
Thanks,
Jari Lappalainen
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]