![]() |
TrustCore SDK NanoSSL API reference
version 7.0
|
Core functions required by both asynchronous and synchronous NanoSSL clients. More...
Functions | |
MOC_EXTERN sbyte4 | SSL_getClientSessionInfo (sbyte4 connectionInstance, ubyte *sessionIdLen, ubyte sessionId[SSL_MAXSESSIONIDSIZE], ubyte masterSecret[SSL_MASTERSECRETSIZE]) |
Get connection instance's identifying information. More... | |
MOC_EXTERN sbyte4 | SSL_setDNSNames (sbyte4 connectionInstance, const CNMatchInfo *cnMatchInfo) |
Specify a list of DNS names acceptable to the client. More... | |
MOC_EXTERN sbyte4 SSL_getClientSessionInfo | ( | sbyte4 | connectionInstance, |
ubyte * | sessionIdLen, | ||
ubyte | sessionId[SSL_MAXSESSIONIDSIZE], | ||
ubyte | masterSecret[SSL_MASTERSECRETSIZE] | ||
) |
This function retrieves identifying information for the connection instance's context. This information can be saved for SSL session reuse, allowing subsequent connections to be made much more quickly than the initial connection.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_CLIENT__
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
connectionInstance | Connection instance returned from SSL_connect |
sessionIdLen | Pointer to number of bytes in sessionId . |
sessionId | Buffer for returned session ID. |
masterSecret | Buffer for returned master secret. |
OK
(0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR
macro.ssl.c
MOC_EXTERN sbyte4 SSL_setDNSNames | ( | sbyte4 | connectionInstance, |
const CNMatchInfo * | cnMatchInfo | ||
) |
This function specifies a list of DNS names that when matched to the certificate subject name will enable a connection.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_MULTIPLE_COMMON_NAMES__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_CLIENT__
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
connectionInstance | Connection instance returned from SSL_connect(). |
cnMatchInfos | Pointer to CNMatchInfo structure (defined in ca_mgmt.h) containing acceptable DNS names. The flags field is a bit combination of matchFlag enumerations (see ca_mgmt.h). The length of the array is indicated by setting the name field of the array's final element to NULL . |
OK
(0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR
macro.ssl.c