gtpc1m5j | Transmission Control Protocol/Internet Protocol |
The SSL_CTX_new_shared function creates a new context (CTX)
structure for use by shared Secure Sockets Layer (SSL) sessions.
Format
#include <openssl/ssl.h>
SSL_CTX *SSL_CTX_new_shared(SSL_METHOD *meth, const char *name)
- 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.
- name
- A pointer to the name to look up in the shared SSL configuration file
(/etc/sslshared.txt) to determine which SSL daemon processes
manage the SSL sessions assigned to the CTX structure created. If you
specify a NULL pointer, the TPF system selects an SSL daemon process that has
the least number of SSL sessions to manage the sessions for this CTX
structure.
Normal Return
Returns a pointer to a CTX token.
Error Return
A NULL pointer indicates an error. The most likely cause of this
error is that a name parameter that does not exist in the shared
SSL configuration file (/etc/sslshared.txt) was passed
in.
Programming Considerations
- Before calling the SSL_CTX_new function, you must call one of
the following functions to set up the connection method:
- SSLv2_client_method
- SSLv2_server_method
- SSLv3_client_method
- SSLv3_server_method
- SSLv23_client_method
- SSLv23_server_method
- TLSv1_client_method
- TLSv1_server_method.
- This function is unique to the TPF system.
- Use this function rather than the SSL_CTX_new function when the
application wants its SSL sessions to be shared. Any SSL sessions
assigned to the CTX structure created by this function will be shared SSL
sessions.
- Use the output of this function as the input to subsequent SSL function
calls that require a pointer to a CTX structure.
Examples
For sample SSL applications, go to http://www.ibm.com/tpf/pubs/tpfpubs.htm,
click SSL for the TPF 4.1 System: An Online User's
Guide, and click Examples from the left navigation
bar.
Related Information