#include "../Include_i.h"
Macros | |
#define | LOG_CLASS "DTLS_mbedtls" |
Functions | |
STATUS | createDtlsSession (PDtlsSessionCallbacks pDtlsSessionCallbacks, TIMER_QUEUE_HANDLE timerQueueHandle, INT32 certificateBits, BOOL generateRSACertificate, PRtcCertificate pRtcCertificates, PDtlsSession *ppDtlsSession) |
STATUS | freeDtlsSession (PDtlsSession *ppDtlsSession) |
INT32 | dtlsSessionSendCallback (PVOID customData, const unsigned char *pBuf, ULONG len) |
INT32 | dtlsSessionReceiveCallback (PVOID customData, unsigned char *pBuf, ULONG len) |
VOID | dtlsSessionSetTimerCallback (PVOID customData, UINT32 intermediateDelayInMs, UINT32 finalDelayInMs) |
INT32 | dtlsSessionGetTimerCallback (PVOID customData) |
STATUS | dtlsTransmissionTimerCallback (UINT32 timerID, UINT64 currentTime, UINT64 customData) |
INT32 | dtlsSessionKeyDerivationCallback (PVOID customData, const unsigned char *pMasterSecret, const unsigned char *pKeyBlock, ULONG maclen, ULONG keylen, ULONG ivlen, const unsigned char clientRandom[32], const unsigned char serverRandom[32], mbedtls_tls_prf_types tlsProfile) |
STATUS | dtlsSessionHandshakeInThread (PDtlsSession pDtlsSession, BOOL isServer) |
STATUS | dtlsSessionStart (PDtlsSession pDtlsSession, BOOL isServer) |
STATUS | dtlsSessionIsInitFinished (PDtlsSession pDtlsSession, PBOOL pIsFinished) |
STATUS | dtlsSessionProcessPacket (PDtlsSession pDtlsSession, PBYTE pData, PINT32 pDataLen) |
STATUS | dtlsSessionPutApplicationData (PDtlsSession pDtlsSession, PBYTE pData, INT32 dataLen) |
STATUS | dtlsSessionGetLocalCertificateFingerprint (PDtlsSession pDtlsSession, PCHAR pBuff, UINT32 buffLen) |
STATUS | dtlsSessionVerifyRemoteCertificateFingerprint (PDtlsSession pDtlsSession, PCHAR pExpectedFingerprint) |
STATUS | dtlsSessionPopulateKeyingMaterial (PDtlsSession pDtlsSession, PDtlsKeyingMaterial pDtlsKeyingMaterial) |
STATUS | dtlsSessionShutdown (PDtlsSession pDtlsSession) |
STATUS | copyCertificateAndKey (mbedtls_x509_crt *pCert, mbedtls_pk_context *pKey, PDtlsSessionCertificateInfo pDst) |
STATUS | createCertificateAndKey (INT32 certificateBits, BOOL generateRSACertificate, mbedtls_x509_crt *pCert, mbedtls_pk_context *pKey) |
STATUS | freeCertificateAndKey (mbedtls_x509_crt *pCert, mbedtls_pk_context *pKey) |
STATUS | dtlsCertificateFingerprint (mbedtls_x509_crt *pCert, PCHAR pBuff) |
Variables | |
mbedtls_ssl_srtp_profile | DTLS_SRTP_SUPPORTED_PROFILES [] |
#define LOG_CLASS "DTLS_mbedtls" |
STATUS copyCertificateAndKey | ( | mbedtls_x509_crt * | pCert, |
mbedtls_pk_context * | pKey, | ||
PDtlsSessionCertificateInfo | pDst | ||
) |
STATUS createCertificateAndKey | ( | INT32 | certificateBits, |
BOOL | generateRSACertificate, | ||
mbedtls_x509_crt * | pCert, | ||
mbedtls_pk_context * | pKey | ||
) |
createCertificateAndKey generates a new certificate and a key If generateRSACertificate is true, RSA is going to be used for the key generation. Otherwise, ECDSA is going to be used. certificateBits is only being used when generateRSACertificate is true.
STATUS createDtlsSession | ( | PDtlsSessionCallbacks | pDtlsSessionCallbacks, |
TIMER_QUEUE_HANDLE | timerQueueHandle, | ||
INT32 | certificateBits, | ||
BOOL | generateRSACertificate, | ||
PRtcCertificate | pRtcCertificates, | ||
PDtlsSession * | ppDtlsSession | ||
) |
Create DTLS session. Not thread safe.
PDtlsSessionCallbacks | - callbacks |
TIMER_QUEUE_HANDLE | - timer handle to schedule timer task with |
INT32 | - size of generated certificate |
BOOL | - whether to generate certificate or not |
PRtcCertificate | - user provided certificate |
PDtlsSession* | - pointer to created DtlsSession object |
STATUS dtlsCertificateFingerprint | ( | mbedtls_x509_crt * | pCert, |
PCHAR | pBuff | ||
) |
STATUS dtlsSessionGetLocalCertificateFingerprint | ( | PDtlsSession | pDtlsSession, |
PCHAR | pBuff, | ||
UINT32 | buffLen | ||
) |
INT32 dtlsSessionGetTimerCallback | ( | PVOID | customData | ) |
STATUS dtlsSessionHandshakeInThread | ( | PDtlsSession | pDtlsSession, |
BOOL | isServer | ||
) |
STATUS dtlsSessionIsInitFinished | ( | PDtlsSession | pDtlsSession, |
PBOOL | pIsFinished | ||
) |
INT32 dtlsSessionKeyDerivationCallback | ( | PVOID | customData, |
const unsigned char * | pMasterSecret, | ||
const unsigned char * | pKeyBlock, | ||
ULONG | maclen, | ||
ULONG | keylen, | ||
ULONG | ivlen, | ||
const unsigned char | clientRandom[32], | ||
const unsigned char | serverRandom[32], | ||
mbedtls_tls_prf_types | tlsProfile | ||
) |
STATUS dtlsSessionPopulateKeyingMaterial | ( | PDtlsSession | pDtlsSession, |
PDtlsKeyingMaterial | pDtlsKeyingMaterial | ||
) |
STATUS dtlsSessionProcessPacket | ( | PDtlsSession | pDtlsSession, |
PBYTE | pData, | ||
PINT32 | pDataLen | ||
) |
STATUS dtlsSessionPutApplicationData | ( | PDtlsSession | pDtlsSession, |
PBYTE | pData, | ||
INT32 | dataLen | ||
) |
INT32 dtlsSessionReceiveCallback | ( | PVOID | customData, |
unsigned char * | pBuf, | ||
ULONG | len | ||
) |
INT32 dtlsSessionSendCallback | ( | PVOID | customData, |
const unsigned char * | pBuf, | ||
ULONG | len | ||
) |
VOID dtlsSessionSetTimerCallback | ( | PVOID | customData, |
UINT32 | intermediateDelayInMs, | ||
UINT32 | finalDelayInMs | ||
) |
STATUS dtlsSessionShutdown | ( | PDtlsSession | pDtlsSession | ) |
STATUS dtlsSessionStart | ( | PDtlsSession | pDtlsSession, |
BOOL | isServer | ||
) |
Start DTLS handshake. Not thread safe.
PDtlsSession | - DtlsSession object |
BOOL | - is server |
STATUS dtlsSessionVerifyRemoteCertificateFingerprint | ( | PDtlsSession | pDtlsSession, |
PCHAR | pExpectedFingerprint | ||
) |
STATUS dtlsTransmissionTimerCallback | ( | UINT32 | timerID, |
UINT64 | currentTime, | ||
UINT64 | customData | ||
) |
STATUS freeCertificateAndKey | ( | mbedtls_x509_crt * | pCert, |
mbedtls_pk_context * | pKey | ||
) |
STATUS freeDtlsSession | ( | PDtlsSession * | ppDtlsSession | ) |
Free DTLS session. Not thread safe.
PDtlsSession | - DtlsSession object to free |
mbedtls_ssl_srtp_profile DTLS_SRTP_SUPPORTED_PROFILES[] |