SSL_CTX_new
The SSL_CTX_new function creates a new context (CTX) structure for use by one or more Secure Sockets Layer (SSL) sessions that are not shared. Use the SSL_CTX_new_shared function to create a CTX structure for shared SSL sessions.
Last updated
- Changed in 2024.
- Changed in 2019.
- Changed for PUT13.
- Changed for PUT00.
Format
LIBS := CSSL
#include <openssl/ssl.h>
const SSL_CTX *SSL_CTX_new(SSL_METHOD *meth) - meth
- A pointer to the connection method that indicates which SSL versions are supported and whether the new CTX structure is for a client application or a server application.
Normal return
A pointer to the new CTX token.
Error return
A NULL pointer.
Programming considerations
- To use this function, you must include the library that is specified in the prototype in your makefile.
- Before calling the SSL_CTX_new function, you must call one of the following functions to set up the connection method:
- Use the output of this function as input to subsequent functions that require a CTX structure as input.
- Issue the SSL_CTX_new_shared function to use shared SSL sessions.
- The SSL_CTX_new function sets the list of available TLS 1.3 cipher suites to be the default on the z/TPF system. Issue the SSL_CTX_set_ciphersuites function to override this list within the CTX. An empty list is permissible for the control string parameter that is passed to this function. For a list of the default TLS 1.3 cipher suites that the z/TPF system supports, see the SSL_CTX_set_ciphersuites function.
Examples
For sample SSL applications, see SSL examples.