I am having exactly the same problem as reported by Ken Gold of IBM on the "openssl-users" list in May. I haven't seen any response to his original posting or received a reply from him. I can read a password protected private key file OK using the OpenSSL shell, but if I try and do it programmatically I just get a NULL key returned. If the private key is not password protected everything works 100%! I am trying it under OpenSSL 0.9.8i in a Windows shell or 0.9.8h in a Cygwin Bash shell - both give the same error (NULL key). I am programming in CodeGear C++ Builder on Windows XP. The relevant code snippet as follows: bio_key = BIO_new( BIO_s_file() ); BIO_read_filename( bio_key, keyfile ); sigkey = PEM_read_bio_PrivateKey( bio_key, NULL, NULL, (void *)pwd ); where "keyfile" is the (correct) path to the private key file and "pwd" is the (correct) password as a NULL terminated string. The error text reported is as follows: 5244:error:0906B072:lib(9):func(107):reason(114):.\crypto\pem\pem_lib.c:481 I get the same response with keys generated with RSA and also ECDSA. If anyone can provide any insights or pointers on this issue it would be much appreciated! Regards, Nick
Dr. Nick van der Merwe Director: Technology & Business Development Ideco Technologies (Pty) Ltd Tel: 011 463 1902 Fax: 086 529 0641 / 011 745 5615 Mobile: 083 709 8230 E-mail: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] <http://www.ideco.co.za/> www.ideco.co.za Merton House, Eton Office Park East c/o Sloane Str. & Harrison Ave., Epsom Downs, 2191 PO Box 130353, Bryanston 2021 Disclaimer: This e-mail and any files transmitted with it are confidential and intended solely for the use of the addressee. If you have received this e-mail in error, please delete it and notify the sender. Please note that any views or opinions expressed in this e-mail are solely those of the author and do not necessarily represent those of the Ideco Group. Finally, the recipient should check this e-mail and any attachments for the presence of viruses, worms and any other malicious software. Ideco accepts no liability for any damage caused by any malicious software which may be transmitted by this e-mail.
<<attd5e8a.gif>>