axTLS
|
A base object for SSLServer/SSLClient. More...
Public Member Functions | |
void | dispose () |
Remove a client/server context. More... | |
int | read (SSL ssl, SSLReadHolder rh) |
Read the SSL data stream. More... | |
int | write (SSL ssl, byte[] out_data) |
Write to the SSL data stream. More... | |
int | write (SSL ssl, byte[] out_data, int out_len) |
Write to the SSL data stream. More... | |
SSL | find (Socket s) |
Find an ssl object based on a Socket reference. More... | |
int | verifyCert (SSL ssl) |
Authenticate a received certificate. More... | |
int | renegotiate (SSL ssl) |
Force the client to perform its handshake again. More... | |
int | objLoad (int obj_type, String filename, String password) |
Load a file into memory that is in binary DER or ASCII PEM format. More... | |
int | objLoad (int obj_type, byte[] data, int len, String password) |
Transfer binary data into the object loader. More... | |
Protected Member Functions | |
SSLCTX (int options, int num_sessions) | |
Establish a new client/server context. More... | |
Protected Attributes | |
int | m_ctx |
A base object for SSLServer/SSLClient.
|
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.
options | [in] Any particular options. At present the options supported are:
|
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.
References axTLSj.SSLCTX.m_ctx.
|
inline |
Remove a client/server context.
Frees any used resources used by this context. Each connection will be sent a "Close Notify" alert (if possible).
References axTLSj.SSLCTX.m_ctx.
|
inline |
Read the SSL data stream.
ssl | [in] An SSL object reference. |
rh | [out] After a successful read, the decrypted data can be retrieved with rh.getData(). It will be null otherwise. |
References axTLSj.SSL.m_ssl.
|
inline |
Write to the SSL data stream.
ssl | [in] An SSL obect reference. |
out_data | [in] The data to be written |
References axTLSj.SSL.m_ssl.
|
inline |
Write to the SSL data stream.
ssl | [in] An SSL obect reference. |
out_data | [in] The data to be written |
out_len | [in] The number of bytes to be written |
References axTLSj.SSL.m_ssl.
|
inline |
Find an ssl object based on a Socket reference.
Goes through the list of SSL objects maintained in a client/server context to look for a socket match.
s | [in] A reference to a Socket object. |
References axTLSj.SSLCTX.m_ctx.
|
inline |
Authenticate a received certificate.
This call is usually made by a client after a handshake is complete and the context is in SSL_SERVER_VERIFY_LATER mode.
ssl | [in] An SSL object reference. |
References axTLSj.SSL.m_ssl.
|
inline |
Force the client to perform its handshake again.
For a client this involves sending another "client hello" message. For the server is means sending a "hello request" message.
This is a blocking call on the client (until the handshake completes).
ssl | [in] An SSL object reference. |
References axTLSj.SSL.m_ssl.
|
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.
obj_type | [in] The format of the file. Can be one of:
|
PEM files are automatically detected (if supported).
filename | [in] The location of a file in DER/PEM format. |
password | [in] The password used. Can be null if not required. |
References axTLSj.SSLCTX.m_ctx.
|
inline |
Transfer binary data into the object loader.
These are temporary objects that are used to load private keys, certificates etc into memory.
obj_type | [in] The format of the memory data. |
data | [in] The binary data to be loaded. |
len | [in] The amount of data to be loaded. |
password | [in] The password used. Can be null if not required. |
References axTLSj.SSLCTX.m_ctx.
|
protected |
A reference to the real client/server context.
Referenced by axTLSj.SSLServer.connect(), axTLSj.SSLClient.connect(), axTLSj.SSLCTX.dispose(), axTLSj.SSLCTX.find(), axTLSj.SSLCTX.objLoad(), and axTLSj.SSLCTX.SSLCTX().