1) dont send questions like this to openssl-dev.
2) To me it looks like youre not giving any pwd but passing passin ==
NULL to the function, i.e. telling it no pwd is needed. A good idea is
also to use ERR_print_errors_fp to see _what_ is wrong.

Thats all I could think of but im not 1 of the gurus...
/Douglas

>   We want to read key from encrypted key file,buf failed! Why?
>   Our code is below:
> 
> 
>   EVP_PKEY *pkey=NULL;
>   BIO *in=NULL;
>   char *passin = NULL;
> 
>   in=BIO_new(BIO_s_file());
>   BIO_read_filename(in,"testkey.pem")
>   pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,passin);
>   if (pkey==NULL) printf("read error!");
> 
> 
> 
> Best Regards!
> 
> TechInfo Group

-- 

------------------------------------------------------
 Douglas Wikström <[EMAIL PROTECTED]>
------------------------------------------------------
 Yes, God created Man before Woman,
 but one always makes a draft before the masterpiece.
------------------------------------------------------
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to