![]() |
TrustCore SDK NanoSSL API reference
version 7.0
|
Synchronous NanoSSL client functions. More...
Functions | |
MOC_EXTERN sbyte4 | SSL_connect (TCP_SOCKET tempSocket, ubyte sessionIdLen, ubyte *sessionId, ubyte *masterSecret, const sbyte *dnsName, struct certStore *certStore) |
Create a synchronous client connection context. More... | |
MOC_EXTERN sbyte4 | SSL_PROXY_connect (TCP_SOCKET sslSocket, sbyte4 sslId, SSLTransportSend transportSend, SSLTransportRecv transportRecv, TCP_SOCKET tempSocket, ubyte sessionIdLen, ubyte *sessionId, ubyte *masterSecret, const sbyte *dnsName, struct certStore *certStore) |
Create a synchronous client connection context with transport handlers for creating a connection through an existing proxy server connection. More... | |
MOC_EXTERN sbyte4 SSL_connect | ( | TCP_SOCKET | tempSocket, |
ubyte | sessionIdLen, | ||
ubyte * | sessionId, | ||
ubyte * | masterSecret, | ||
const sbyte * | dnsName, | ||
struct certStore * | certStore | ||
) |
This function creates a connection context for a secure SSL/TLS synchronous connection with a remote server.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSL_CLIENT__
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_PROXY_connect | ( | TCP_SOCKET | sslSocket, |
sbyte4 | sslId, | ||
SSLTransportSend | transportSend, | ||
SSLTransportRecv | transportRecv, | ||
TCP_SOCKET | tempSocket, | ||
ubyte | sessionIdLen, | ||
ubyte * | sessionId, | ||
ubyte * | masterSecret, | ||
const sbyte * | dnsName, | ||
struct certStore * | certStore | ||
) |
This function creates a connection context for a secure SSL/TLS synchronous connection with a remote server. Transport handlers can be defined for connecting through an existing SSL connection to a proxy server.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSL_CLIENT__
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