![]() |
TrustCore SDK NanoSSL API reference
version 7.0
|
Asynchronous NanoSSL client and server functions. More...
Functions | |
MOC_EXTERN sbyte4 | SSL_ASYNC_closeConnection (sbyte4 connectionInstance) |
Close an SSL session and release resources. More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_freeSendBufferZeroCopy (sbyte4 connectionInstance, ubyte4 numUnusedBytes) |
Get a pointer reference to the connection's send data buffer. More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_getRecvBuffer (sbyte4 connectionInstance, ubyte **data, ubyte4 *len, ubyte4 *pRetProtocol) |
Get a pointer to the connection's receive data buffer (the socket buffer itself). More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_getRecvPending (sbyte4 connectionInstance, sbyte4 *len) |
Get number of bytes to read. More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_getSendBuffer (sbyte4 connectionInstance, ubyte *data, ubyte4 *len) |
Get a copy of the connection's send data buffer. More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_getSendBufferZeroCopy (sbyte4 connectionInstance, ubyte **data, ubyte4 *len) |
Get a pointer reference to the connection's send data buffer. More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_init (sbyte4 numServerConnections, sbyte4 numClientConnections) |
Initialize NanoSSL client or server internal structures. More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_recvMessage (sbyte4 connectionInstance, ubyte *pBytesReceived, ubyte4 numBytesReceived) |
Get a copy of data received from a connected server/client. More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_recvMessage2 (sbyte4 connectionInstance, ubyte *pBytesReceived, ubyte4 numBytesReceived, ubyte **ppRetBytesReceived, ubyte4 *pRetNumRxBytesRemaining) |
Get a pointer to the connection's most recently receiveed message. More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_sendMessage (sbyte4 connectionInstance, sbyte *pBuffer, sbyte4 bufferSize, sbyte4 *pBytesSent) |
Send data to a connected server/client. More... | |
MOC_EXTERN sbyte4 | SSL_ASYNC_sendMessagePending (sbyte4 connectionInstance) |
Determines whether there is data in a connection instance's SSL send buffer. More... | |
MOC_EXTERN sbyte4 | SSL_bindMbedtlsShimMethods (mssl_methods_t *pMeth) |
Binds NanoSSL functions to be used by NanoSSL Shim layer. More... | |
MOC_EXTERN sbyte4 | SSL_bindShimMethods (nssl_methods_t *pMeth) |
Binds NanoSSL functions to be used by NanoSSL Shim layer. More... | |
MOC_EXTERN sbyte4 | SSL_in_accept_init_moc (sbyte4 connectionInstance) |
Checks if server accepts a secure connection. More... | |
MOC_EXTERN sbyte4 | SSL_in_connect_init_moc (sbyte4 connectionInstance) |
Checks if the connection instance can be connected to. More... | |
MOC_EXTERN sbyte4 | SSL_isSecureConnectionEstablished (sbyte4 connectionInstance) |
Checks if a secure connection has been established. More... | |
MOC_EXTERN sbyte4 | SSL_OSSL_AddIdenCertChain (void *pCertStore, OSSL_SizedBuffer *certs, unsigned numCerts, const u_int8_t *pKeyBlob, unsigned keyBlobLength, ubyte *pAlias, ubyte4 aliasLen) |
Add an x509v3 certificate identity to the Digicert SoT Platform certificate store. More... | |
MOC_EXTERN sbyte4 | SSL_OSSL_AddTrustPoint (void *pCertStore, u_int8_t *pDerBuf, int derLen) |
Add a trust point to a Digicert SoT Platform certificate store. More... | |
MOC_EXTERN sbyte4 | SSL_OSSL_DSAParamsToKeyBlob (OSSL_DSAParams *pD, void **ppKeyBlob, unsigned int *pBlobLen) |
Convert DSA private key into Mocana's internal KeyBlob format. More... | |
MOC_EXTERN sbyte4 | SSL_OSSL_ECCParamsToKeyBlob (OSSL_ECCParams *pEParams, void *ppKeyBlob, unsigned int *pBlobLen) |
Convert ECC private key into Mocana's internal KeyBlob format. More... | |
MOC_EXTERN sbyte4 | SSL_OSSL_RSAParamsToKeyBlob (OSSL_RSAParams *pR, void **ppKeyBlob, unsigned int *pBlobLen) |
Convert RSA private key into Mocana's internal KeyBlob format. More... | |
MOC_EXTERN sbyte4 SSL_ASYNC_closeConnection | ( | sbyte4 | connectionInstance | ) |
This function closes an asynchronous SSL session and releases all the resources that are managed by the NanoSSL client/server.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_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.ssl.c
MOC_EXTERN sbyte4 SSL_ASYNC_freeSendBufferZeroCopy | ( | sbyte4 | connectionInstance, |
ubyte4 | numUnusedBytes | ||
) |
This function is used to indicate how many bytes of the most recently produced send data buffer was consumed by the caller. This call typically follows the call to SSL_ASYNC_getSendBufferZeroCopy() that returns the pointer to the send data buffer that is waiting to be transmitted. If numUnusedBytes
is 0, then the send data buffer is freed. If it is not zero, then that much data is retained and the next call to SSL_ASYNC_getSendBufferZeroCopy() will return the saved data. This call is suitable for Zero-Copy implementations.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect() or SSL_ASYNC_accept(). |
numUnusedBytes | A ubyte4 value that indicates how many bytes is left over from the data buffer obtained from a previous call to SSL_ASYNC_getSendBufferZeroCopy(). |
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_getRecvBuffer | ( | sbyte4 | connectionInstance, |
ubyte ** | data, | ||
ubyte4 * | len, | ||
ubyte4 * | pRetProtocol | ||
) |
This function returns a pointer (through the data
parameter) to the specified connection's most recently received data buffer (the socket buffer itself).
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect(). |
data | On return, pointer to the address of the connection's receive buffer. |
len | On return pointer to number of bytes in data . |
pRetProtocol | On return, the SSL protocol type for data (usually 23 == SSL Application Data) |
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_getRecvPending | ( | sbyte4 | connectionInstance, |
sbyte4 * | len | ||
) |
This function returns the the number of bytes needed to be read.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect() or SSL_ASYNC_accept(). |
len | Pass in a pointer to a sbyte4. On return this contains the number of bytes to be read |
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_getSendBuffer | ( | sbyte4 | connectionInstance, |
ubyte * | data, | ||
ubyte4 * | len | ||
) |
This function returns a copy (through the data
parameter) of the specified connection's most recently sent data buffer.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect(). |
data | On return, pointer to the buffer containing the data in the connection's send buffer. |
len | On return pointer to number of bytes in data . |
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_getSendBufferZeroCopy | ( | sbyte4 | connectionInstance, |
ubyte ** | data, | ||
ubyte4 * | len | ||
) |
This function returns the pointer (through the data
parameter) of the specified connection's most recently sent data buffer. It is suitable for Zero-Copy implementations. After the caller gets the pointer and transmits all (or some) of the data, it must call SSL_ASYNC_freeSendBufferZeroCopy() to indicate how much of data still remains to be transmitted before it makes another call to SSL_ASYNC_getSendBuffer() to send fresh data.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect() or SSL_ASYNC_accept(). |
data | On return, contains the address of the buffer containing the data in the connection's send buffer. i.e *data has the pointer to the connection's send buffer) |
len | Pass in a pointer to a ubyte4. On return this contains the number of bytes in the connection's send buffer (i.e data ) |
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_init | ( | sbyte4 | numServerConnections, |
sbyte4 | numClientConnections | ||
) |
This function initializes NanoSSL client/server internal structures. Your application should call this function before starting the HTTPS and application servers.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
numServerConnections | Maximum number of SSL/TLS server connections to allow. (Each connection requires only a few bytes of memory.) If operating in dual mode, this is the sum of the synchronous and asynchronous server connections. |
numClientConnections | Maximum number of SSL/TLS client connections to allow. If operating in dual mode, this is the sum of the synchronous and asynchronous client connections. |
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_recvMessage | ( | sbyte4 | connectionInstance, |
ubyte * | pBytesReceived, | ||
ubyte4 | numBytesReceived | ||
) |
This function retrieves data from a connected server/client and copies it into a new buffer. It should be called from your TCP/IP receive upcall handler, or from your application after reading a packet of data. The engine decrypts and processes the packet, and then calls NanoSSL server's upcall function, funcPtrReceiveUpcall
, to hand off the decrypted data.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect. |
pBytesReceived | On return, pointer to the packet or message received from the TCP/IP stack. |
numBytesReceived | On return, number of bytes in pBytesReceived . |
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.(revise the note that refers to "earlier Embedded SSL/TLS implementations", which is quite old relative to the DSF/SoTP usage)
ssl.c
MOC_EXTERN sbyte4 SSL_ASYNC_recvMessage2 | ( | sbyte4 | connectionInstance, |
ubyte * | pBytesReceived, | ||
ubyte4 | numBytesReceived, | ||
ubyte ** | ppRetBytesReceived, | ||
ubyte4 * | pRetNumRxBytesRemaining | ||
) |
This function returns a pointer (through the pBytesReceived
parameter) to the specified connection's most recently received message. Typically, you'll call this function and then, if the returned number of bytes of application data is greater than 0, call SSL_ASYNC_getRecvBuffer() to get the pointer to the decrypted data.
To enable this function, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_API_EXTENSIONS__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect(). |
pBytesReceived | On return, pointer to the packet or message received from the TCP/IP stack. |
numBytesReceived | On return, number of bytes in pBytesReceived . |
ppRetBytesReceived | On return, pointer to buffer containing number of bytes remaining to be read. |
pRetNumRxBytesRemaining | On return, pointer to number of bytes in ppRetBytesReceived . |
SSL_FLAG_ENABLE_RECV_BUFFER
is set; 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_sendMessage | ( | sbyte4 | connectionInstance, |
sbyte * | pBuffer, | ||
sbyte4 | bufferSize, | ||
sbyte4 * | pBytesSent | ||
) |
This function sends data to a connected server/client. It should not be called until a secure SSL connection is established between the client and server.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect. |
pBuffer | Pointer to buffer containing the data to send. |
bufferSize | Number of bytes in pBuffer . |
pBytesSent | On return, pointer to number of bytes successfully sent. |
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.funcPtrOpenStateUpcall
upcall event.ssl.c
MOC_EXTERN sbyte4 SSL_ASYNC_sendMessagePending | ( | sbyte4 | connectionInstance | ) |
This function determines whether there is data in a connection instance's SSL send buffer. If the send buffer is empty, the function returns zero (0) as its status. If send data is pending, an attempt is made to send the data, and the subsequent number of bytes remaining to be sent is returned as the function status. (A function return value of zero (0) indicates that the send was successful and that no data remains in the send buffer.)
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect(). |
OK
(0) if the send buffer is empty or if this function successfully sent all remaining buffer data; otherwise the number of bytes remaining to be sent.ssl.c
MOC_EXTERN sbyte4 SSL_bindMbedtlsShimMethods | ( | mssl_methods_t * | pMeth | ) |
This function is used to bind NanoSSL functions to be used as callback functions in an internal data structure so that NanoSSL functions are used under the hood of the Shim layer.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
Additionally, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_MBEDTLS_SHIM__
pMeth | Pointer to data structure that stores the NanoSSL functions. |
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_bindShimMethods | ( | nssl_methods_t * | pMeth | ) |
This function is used to bind NanoSSL functions to be used as callback functions in an internal data structure so that NanoSSL functions are used under the hood of the Shim layer.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
Additionally, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_OPENSSL_SHIM__
pMeth | Pointer to data structure that stores the NanoSSL functions. |
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_in_accept_init_moc | ( | sbyte4 | connectionInstance | ) |
This function is needed to get Apache MOD_SSL to work over NanoSSL instead of OpenSSL. The function checks if the connection instance can accept a secure connection from clients.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_CLIENT__
__ENABLE_MOCANA_SSL_SERVER__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect(). |
OK
(0) if successful; otherwise, returns 1 (not successful).ssl.c
MOC_EXTERN sbyte4 SSL_in_connect_init_moc | ( | sbyte4 | connectionInstance | ) |
This function is needed to get Apache MOD_SSL to work over NanoSSL instead of OpenSSL. The function checks if the connection instance is open to allow clients to connect to it.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_CLIENT__
__ENABLE_MOCANA_SSL_SERVER__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect(). |
OK
(0) if successful; otherwise, returns 1 (not successful).ssl.c
MOC_EXTERN sbyte4 SSL_isSecureConnectionEstablished | ( | sbyte4 | connectionInstance | ) |
This function is needed to get Apache MOD_SSL to work over NanoSSL instead of OpenSSL. The function checks whether the connection instance is a secure 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_SERVER__
Additionally, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
connectionInstance | Connection instance returned from SSL_ASYNC_connect(). |
OK
(0) if successful; otherwise, returns 1 (not successful).ssl.c
MOC_EXTERN sbyte4 SSL_OSSL_AddIdenCertChain | ( | void * | pCertStore, |
OSSL_SizedBuffer * | certs, | ||
unsigned | numCerts, | ||
const u_int8_t * | pKeyBlob, | ||
unsigned | keyBlobLength, | ||
ubyte * | pAlias, | ||
ubyte4 | aliasLen | ||
) |
This function allocates space to the Digicert SoT Platform certificate store and adds a valid x509v3 certificate to it. The certificate is verified with its private key and is also indexed based on key type.
certificate store
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
n Additionally, the following flag must be defined in moptions.h:__ENABLE_MOCANA_OPENSSL_SHIM__
pCertStore | Pointer to the SoT Platform certificate store that contains the SSL connection's certificates. |
certs | Pointer to the buffer that holds certificate data. |
numCerts | Number of certificates in SoT Platform certificate store. |
ppKeyBlob | On return, pointer to the converted KeyBlob. |
pBlobLen | On return, pointer to the length of the KeyBlob. |
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_OSSL_AddTrustPoint | ( | void * | pCertStore, |
u_int8_t * | pDerBuf, | ||
int | derLen | ||
) |
This function adds a trust point to a Digicert SoT Platform certificate store.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
Additionally, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_OPENSSL_SHIM__
pCertStore | Pointer to the SoT Platform certificate store to which to add the trust point. |
pDerBuf | Pointer to the trust point to add. |
derLen | Number of bytes in the trust point. |
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_OSSL_DSAParamsToKeyBlob | ( | OSSL_DSAParams * | pD, |
void ** | ppKeyBlob, | ||
unsigned int * | pBlobLen | ||
) |
This function is called by the NanoSSL Shim layer to create an DSA private key and use the RSA parameters given to convert it into Mocana's internal KeyBlob format.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
Additionally, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_OPENSSL_SHIM__
__ENABLE_MOCANA_DSA__
pD | Pointer to the DSA parameters. |
ppKeyBlob | On return, pointer to the converted KeyBlob. |
pBlobLen | On return, pointer to the length of the KeyBlob. |
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_OSSL_ECCParamsToKeyBlob | ( | OSSL_ECCParams * | pEParams, |
void * | ppKeyBlob, | ||
unsigned int * | pBlobLen | ||
) |
This function is called by the NanoSSL Shim layer to create an DSA private key and use the EC parameters given to convert it into Mocana's internal KeyBlob format.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
Additionally, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_OPENSSL_SHIM__
__ENABLE_MOCANA_ECC__
pEParams | Pointer to the ECC parameters. |
ppKeyBlob | On return, pointer to the converted KeyBlob. |
pBlobLen | On return, pointer to the length of the KeyBlob. |
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_OSSL_RSAParamsToKeyBlob | ( | OSSL_RSAParams * | pR, |
void ** | ppKeyBlob, | ||
unsigned int * | pBlobLen | ||
) |
This function is called by the NanoSSL Shim layer to create an RSA private key and use the RSA parameters given to convert it into Mocana's internal KeyBlob format.
To enable this function, at least one of the following flags must be defined in moptions.h:
__ENABLE_MOCANA_SSL_ASYNC_CLIENT_API__
__ENABLE_MOCANA_SSL_ASYNC_SERVER_API__
Additionally, the following flag must be defined in moptions.h:
__ENABLE_MOCANA_OPENSSL_SHIM__
pR | Pointer to the RSA parameters. |
ppKeyBlob | On return, pointer to the converted KeyBlob. |
pBlobLen | On return, pointer to the length of the KeyBlob. |
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