skip book previous and next navigation links
go up to top of book: HP Open Source Security for OpenVMS Volume 2:... HP Open Source Security for OpenVMS Volume 2:...
go to beginning of reference: SSL Application Programming Interface (API) Reference SSL Application Programming Interface (API) Reference
go to previous page: SSL_CTX_load_verify_locations SSL_CTX_load_verify_locations
go to next page: SSL_CTX_sess_numberSSL_CTX_sess_number
end of book navigation links


SSL_CTX_new
Description
Notes
Return Values
See Also
 

NAME

SSL_CTX_new - create a new SSL_CTX object as framework for TLS/SSL enabled functions

Synopsis  

#include <openssl/ssl.h>
SSL_CTX *SSL_CTX_new(SSL_METHOD *method);


return to top DESCRIPTION  

SSL_CTX_new() creates a new SSL_CTX object as framework to establish TLS/SSL enabled connections.


return to top NOTES  

The SSL_CTX object uses method as connection method. The methods exist in a generic type (for client and server use), a server only type, and a client only type. method can be of the following types:

The list of protocols available can later be limited using the SSL_OP_NO_SSLv2, SSL_OP_NO_SSLv3, SSL_OP_NO_TLSv1 options of the SSL_CTX_set_options() or SSL_set_options() functions. Using these options it is possible to choose e.g. SSLv23_server_method() and be able to negotiate with all possible clients, but to only allow newer protocols like SSLv3 or TLSv1.

SSL_CTX_new() initializes the list of ciphers, the session cache setting, the callbacks, the keys and certificates, and the options to its default values.


return to top RETURN VALUES  

The following return values can occur:


return to top SEE ALSO  

SSL_CTX_free(3) , SSL_accept(3) , ssl(3) , SSL_set_connect_state(3)
go to previous page: SSL_CTX_load_verify_locations SSL_CTX_load_verify_locations
go to next page: SSL_CTX_sess_numberSSL_CTX_sess_number