[openssl-dev] Load secrets to context.

Dr. Stephen Henson steve at openssl.org
Wed Jul 27 16:55:56 UTC 2016


On Wed, Jul 27, 2016, john gloster wrote:

> Hi,
> 
> Can we use both the following APIs in the same application to load
> certificate to the SSL context?
> 
> *SSL_CTX_use_certificate_file()*
> *SSL_CTX_use_certificate_chain_file()*
> 

You should only use one. If you use SSL_CTX_use_certificate_chain_file() the
file needs to contains the certificates from EE to root in order in PEM
format.

If you want to do things differently you can load the PEM files manually and
use functions like SSL_CTX_use_certificate() and SSL_CTX_add0_chain_cert().

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org


More information about the openssl-dev mailing list