> From: owner-openssl-users On Behalf Of Manoj
> Sent: Tuesday, December 10, 2013 08:31

> I am creating an EVP_PKEY using functions EVP_PKEY_new() and then
> RSA_generate_key_ex()
> and then wrtting the obtained key to file using function
> PEM_write_PrivateKey().
> As the writing of key to file required a passpharse, which is passed as
> argument to PEM_write_PrivateKey().
> 
> But I want to remove this passpharse from file so that it not required to
> provided during SSL_CTX_use_PrivateKey_file() or SSL connection.
> 
As the man page tells you, if the cipher argument to write_PrivateKey 
is null it does not encrypt. (Also write_{PKCS8,RSA,DSA,EC}PrivateKey.)

Make sure to protect the resulting file from unauthorized access or copying.

BTW one slightly outdated bit: since I believe 1.0.0 the "plain" 
PEM_write_PrivateKey defaults to PKCS8 format, same as 
write_PKCS8PrivateKey, no longer the "traditional" formats, 
which are still available under their specific names.



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to