This module contains M2M Wi-Fi SSL APIs implementation.
Copyright (c) 2017-2021 Microchip Technology Inc. and its subsidiaries.
#include "driver/include/m2m_ssl.h"
#include "driver/source/m2m_hif.h"
#include "driver/source/nmasic.h"
Macros | |
#define | CHUNKHDRSZ (sizeof(tstrTlsSrvChunkHdr)) |
#define | CHUNKSZ (TXLIMIT - 256) |
#define | TXLIMIT (256 * 6) |
Functions | |
static void | m2m_ssl_cb (uint8 u8OpCode, uint16 u16DataSize, uint32 u32Addr) |
Internal SSL callback function. More... | |
NMI_API void | m2m_ssl_ecc_process_done (void) |
Allow SSL driver to tidy up after application has finished processing ECC message. More... | |
NMI_API sint8 | m2m_ssl_handshake_rsp (tstrEccReqInfo *strECCResp, uint8 *pu8RspDataBuff, uint16 u16RspDataSz) |
Sends ECC responses to the WINC. More... | |
NMI_API sint8 | m2m_ssl_init (tpfAppSSLCb pfAppSSLCb) |
Initializes the SSL layer. More... | |
NMI_API sint8 | m2m_ssl_retrieve_cert (uint16 *pu16Curve, uint8 *pu8Value, uint8 *pu8Sig, tstrECPoint *pstrKey) |
Retrieve the next set of information from the WINC for ECDSA verification. More... | |
NMI_API sint8 | m2m_ssl_retrieve_hash (uint8 *pu8Value, uint16 u16ValueSz) |
Retrieve the value from the WINC for ECDSA signing. More... | |
NMI_API sint8 | m2m_ssl_retrieve_next_for_verifying (tenuEcNamedCurve *penuCurve, uint8 *pu8Value, uint16 *pu16ValueSz, uint8 *pu8Sig, uint16 *pu16SigSz, tstrECPoint *pstrKey) |
Retrieve the next set of information from the WINC for ECDSA verification. More... | |
NMI_API sint8 | m2m_ssl_send_certs_to_winc (uint8 *pu8Buffer, uint32 u32BufferSz) |
Sends certificates to the WINC. More... | |
NMI_API sint8 | m2m_ssl_set_active_ciphersuites (uint32 u32SslCsBMP) |
Sets the active ciphersuites. More... | |
NMI_API void | m2m_ssl_stop_processing_certs (void) |
Allow SSL driver to tidy up in case application does not read all available certificates. More... | |
NMI_API void | m2m_ssl_stop_retrieving (void) |
Allow SSL driver to tidy up when the application chooses not to retrieve all available information. More... | |
Variables | |
static tenuTlsFlashStatus | genuStatus = TLS_FLASH_ERR_UNKNOWN |
static tpfAppSSLCb | gpfAppSSLCb = NULL |
static uint32 | gu32HIFAddr = 0 |
#define CHUNKHDRSZ (sizeof(tstrTlsSrvChunkHdr)) |
Referenced by m2m_ssl_send_certs_to_winc().
#define CHUNKSZ (TXLIMIT - 256) |
Referenced by m2m_ssl_send_certs_to_winc().
#define TXLIMIT (256 * 6) |
Referenced by m2m_ssl_send_certs_to_winc().
Internal SSL callback function.
[in] | u8OpCode | HIF Opcode type. |
[in] | u16DataSize | HIF data length. |
[in] | u32Addr | HIF address. |
References genuStatus, gpfAppSSLCb, gu32HIFAddr, hif_receive(), M2M_ERR, M2M_SSL_REQ_ECC, M2M_SSL_RESP_SET_CS_LIST, M2M_SSL_RESP_WRITE_OWN_CERTS, M2M_SUCCESS, TLS_FLASH_ERR_CORRUPT, TLS_FLASH_ERR_NO_CHANGE, TLS_FLASH_ERR_UNKNOWN, TLS_FLASH_OK, TLS_FLASH_OK_NO_CHANGE, tstrTlsSrvChunkHdr::u16Offset32, tstrTlsSrvChunkHdr::u16Sig, tstrTlsSrvChunkHdr::u16Size32, and tstrTlsSrvChunkHdr::u16TotalSize32.
Referenced by m2m_ssl_init().
|
static |
Referenced by m2m_ssl_cb(), and m2m_ssl_init().
|
static |
Referenced by m2m_ssl_cb(), and m2m_ssl_init().
|
static |