![]() |
TrustCore SDK NanoSSL API reference
version 7.0
|
Asynchronous NanoSSL client functions. More...
Functions | |
MOC_EXTERN sbyte4 | SSL_ASYNC_connect (TCP_SOCKET tempSocket, ubyte sessionIdLen, ubyte *sessionId, ubyte *masterSecret, const sbyte *dnsName, struct certStore *pCertStore) |
Create an asynchronous client connection context. More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_connectAlt (TCP_SOCKET tempSocket, ubyte sessionIdLen, ubyte *sessionId, ubyte *masterSecret, const sbyte *dnsName, void *certStore) |
Wrapper function to create an asynchronous client connection context. More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_start (sbyte4 connectionInstance) |
Start establishing a secure client-server connection. More... | |
MOC_EXTERN sbyte4 SSL_ASYNC_connect | ( | TCP_SOCKET | tempSocket, |
ubyte | sessionIdLen, | ||
ubyte * | sessionId, | ||
ubyte * | masterSecret, | ||
const sbyte * | dnsName, | ||
struct certStore * | pCertStore | ||
) |
This function creates a connection context for a secure SSL/TLS asynchronous connection with a remote server.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
tempSocket | Socket or TCB identifier returned by a call to connect(). |
sessionIdLen | Number of bytes in sessionId , excluding the NULL terminator. |
sessionId | Pointer to session ID. |
masterSecret | Pointer to master secret for the session. |
dnsName | Pointer to expected DNS name of the server's certificate. |
certStore | Pointer to SoT Platform certificate store that contains the SSL connection's certificate (as a trust point or identity). |
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_ASYNC_connectAlt | ( | TCP_SOCKET | tempSocket, |
ubyte | sessionIdLen, | ||
ubyte * | sessionId, | ||
ubyte * | masterSecret, | ||
const sbyte * | dnsName, | ||
void * | certStore | ||
) |
This function is used by the NanoSSL Shim layer to create a connection context for a secure SSL/TLS asynchronous connection with a remote server.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_OPENSSL_SHIM__
tempSocket | Socket or TCP identifier returned by a call to connect(). |
sessionIdLen | Number of bytes in sessionId , excluding the NULL terminator. |
sessionId | Pointer to session ID. |
masterSecret | Pointer to master secret for the session. |
dnsName | Pointer to expected DNS name of the server's certificate. |
certStore | Pointer to SoT Platform certificate store that contains the SSL connection's certificate (as a trust point or identity). |
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_ASYNC_start | ( | sbyte4 | connectionInstance | ) |
This function begins the process of establishing a secure connection between a client and server by sending an SSL Hello
message to a server.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect(). |
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.