On Fri, Jun 06, 2003, Terence Leung wrote: > Dear sir, > I am writing Visual C++ to create secure communication socket. > But when I use the function SSL_CTX_use_PrivateKey_file(), > it always prompt "Enter PEM pass phrase:" to input the pass phrase in the screen. > > I want to ask how can I modify the program so that the program can automatically > input the pass phrase, no need to input it in the console. >
Call PEM_read_PrivateKey() and the passphrase can be entered either in the last argument or via a callback. Then pass the EVP_PKEY structure using SSL_CTX_use_PrivateKey(). Steve. -- Dr Stephen N. Henson. Core developer of the OpenSSL project: http://www.openssl.org/ Freelance consultant see: http://www.drh-consultancy.demon.co.uk/ Email: [EMAIL PROTECTED], PGP key: via homepage. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]