Thursday, April 24, 2014

PEM routines:PEM_read_bio:no start line

PEM routines:PEM_read_bio:no start line
 I got this error when I tried to convert a private key to PKCS12 format using openssl_pkcs12_export() function under PHP, after 48 hours of trying many solutions I finally found the wright one, it's soo simple just change the format of the private key (PEM encoded) from

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,25E7BB5EB27D828C

<--- Private key here ----->
-----END RSA PRIVATE KEY-----

to

-----BEGIN RSA PRIVATE KEY-----
<--- Private key here ----->
-----END RSA PRIVATE KEY-----
 
That's all !

I reported this error to PHP and it's published on function manual http://www.php.net/manual/en/function.openssl-pkcs12-export.php#114908

0 comments:

Post a Comment