A base object for SSLServer/SSLClient.
axTLSj.SSLCTX.SSLCTX |
( |
int |
options, |
|
|
int |
num_sessions |
|
) |
| |
|
inlineprotected |
Establish a new client/server context.
This function is called before any client/server SSL connections are made. If multiple threads are used, then each thread will have its own SSLCTX context. Any number of connections may be made with a single context.
Each new connection will use the this context's private key and certificate chain. If a different certificate chain is required, then a different context needs to be be used.
- Parameters
-
options | [in] Any particular options. At present the options supported are:
- SSL_SERVER_VERIFY_LATER (client only): Don't stop a handshake if the server authentication fails. The certificate can be authenticated later with a call to verifyCert().
- SSL_CLIENT_AUTHENTICATION (server only): Enforce client authentication i.e. each handshake will include a "certificate request" message from the server.
- SSL_DISPLAY_BYTES (full mode build only): Display the byte sequences during the handshake.
- SSL_DISPLAY_STATES (full mode build only): Display the state changes during the handshake.
- SSL_DISPLAY_CERTS (full mode build only): Display the certificates that are passed during a handshake.
- SSL_DISPLAY_RSA (full mode build only): Display the RSA key details that are passed during a handshake.
|
num_sessions | [in] The number of sessions to be used for session caching. If this value is 0, then there is no session caching. |
If this option is null, then the default internal private key/ certificate pair is used (if CONFIG_SSL_USE_DEFAULT_KEY is set).
The resources used by this object are automatically freed.
- Returns
- A client/server context.
References axTLSj.SSLCTX.m_ctx.
int axTLSj.SSLCTX.objLoad |
( |
int |
obj_type, |
|
|
String |
filename, |
|
|
String |
password |
|
) |
| |
|
inline |
Load a file into memory that is in binary DER or ASCII PEM format.
These are temporary objects that are used to load private keys, certificates etc into memory.
- Parameters
-
obj_type | [in] The format of the file. Can be one of:
- SSL_OBJ_X509_CERT (no password required)
- SSL_OBJ_X509_CACERT (no password required)
- SSL_OBJ_RSA_KEY (AES128/AES256 PEM encryption supported)
- SSL_OBJ_P8 (RC4-128 encrypted data supported)
- SSL_OBJ_P12 (RC4-128 encrypted data supported)
|
PEM files are automatically detected (if supported).
- Parameters
-
filename | [in] The location of a file in DER/PEM format. |
password | [in] The password used. Can be null if not required. |
- Returns
- SSL_OK if all ok
References axTLSj.SSLCTX.m_ctx.