Sorry for the spam. I have asked this question yesterday, but no one
answered.
I want to load prvKey from a pass phased protected keyfile. The truth is
that, my program goes swiftly with keyfiles without pass phase, but
fails with files that do have pass phase.
Here is my code:
BIO *in=BIO_new(BIO_s_file());
if (BIO_read_filename(in,"key.pem") <= 0)
{
printf("read keyfile name into BIO* in error,
exiting...\n");
ERR_print_errors_fp(stderr);
exit(1);
}
if (in == NULL)
{
printf("in==NULL exiting .....");
exit(1);
}
rsa=PEM_read_bio_RSAPrivateKey(in,NULL,NULL,NULL);
printf("rsa address=%d\n",rsa);
if(rsa==NULL)
{
ERR_print_errors_fp(stderr);
exit(1);
}
...
The result turns out to be:
rsa address=0
22307:error:0906B072:PEM routines:PEM_get_EVP_CIPHER_INFO:unsupported
encryption:pem_lib.c:454:
make: *** [test] Error 1
Any help?
Hazel
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]