23 #error "Please do not include this file directly, use pal.h instead" 42 #ifdef PAL_NET_TCP_AND_TLS_SUPPORT 44 #endif //PAL_NET_TCP_AND_TLS_SUPPORT 63 #ifdef MBED_CONF_MBED_CLOUD_CLIENT_PSA_SUPPORT 282 #if (PAL_USE_SSL_SESSION_RESUME == 1) 293 #endif // PAL_USE_SSL_SESSION_RESUME 306 #endif // _PAL_DTLS_H_ int(* palEntropySource_f)(void *data, unsigned char *output, size_t len, size_t *olen)
This callback is useful ONLY when mbed TLS is used as TLS platform library.
Definition: pal_TLS.h:73
palStatus_t pal_sslWrite(palTLSHandle_t palTLSHandle, const void *buffer, uint32_t len, uint32_t *bytesWritten)
Write the exact length of application data bytes.
palStatus_t pal_sslSetDebugging(palTLSConfHandle_t palTLSConf, uint8_t turnOn)
Turn the debugging on or off for the given TLS library configuration handle. The logs are sent via th...
palStatus_t pal_initTLSConfiguration(palTLSConfHandle_t *palTLSConf, palTLSTransportMode_t transportationMode)
Initiate a new configuration context.
palStatus_t pal_sslDebugging(uint8_t turnOn)
palTLSTranportMode
Definition: pal_TLS.h:41
uintptr_t palTLSConfHandle_t
Definition: pal_TLS.h:39
palStatus_t pal_setCAChain(palTLSConfHandle_t palTLSConf, palX509_t *caChain, palX509CRL_t *caCRL)
Set the data required to verify the peer certificate.
uintptr_t palTLSHandle_t
Definition: pal_TLS.h:38
palStatus_t pal_initTLSLibrary(void)
Initiate the TLS library.
palStatus_t pal_initTLS(palTLSConfHandle_t palTLSConf, palTLSHandle_t *palTLSHandle)
Initiate a new TLS context.
uint32_t palSocketLength_t
The length of data.
Definition: pal_network.h:43
palStatus_t pal_sslGetVerifyResult(palTLSHandle_t palTLSHandle)
Return the result of the certificate verification.
palSocketLength_t addressLength
Definition: pal_TLS.h:51
palStatus_t pal_setPSK(palTLSConfHandle_t palTLSConf, const unsigned char *identity, uint32_t maxIdentityLenInBytes, const unsigned char *psk, uint32_t maxPskLenInBytes)
Set the Pre-Shared Key (PSK) and the expected identity name.
palStatus_t pal_setOwnCertChain(palTLSConfHandle_t palTLSConf, palX509_t *ownCert)
Set your own certificate chain.
struct palTLSBuffer palTLSBuffer_t
palStatus_t pal_sslGetVerifyResultExtended(palTLSHandle_t palTLSHandle, int32_t *verifyResult)
Return the result of the certificate verification.
void * palSocket_t
PAL socket handle type.
Definition: pal_network.h:44
palStatus_t pal_setOwnPrivateKey(palTLSConfHandle_t palTLSConf, palPrivateKey_t *privateKey)
Set your own private key.
const void * buffer
Definition: pal_TLS.h:57
palStatus_t pal_addEntropySource(palEntropySource_f entropyCallback)
Add an entropy source to the TLS/DTLS library. NOT available in all TLS/DTLS platforms, see note.
palStatus_t pal_initPrivateKey(const void *buf, size_t buf_size, palPrivateKey_t *privateKey)
palSocketAddress_t * socketAddress
Definition: pal_TLS.h:50
palTLSBuffer_t palPrivateKey_t
Definition: pal_TLS.h:66
enum palTLSTranportMode palTLSTransportMode_t
void(* palSocketCallback_f)(void *)
Definition: pal_TLS.h:75
struct palTLSSocket palTLSSocket_t
palStatus_t pal_handShake(palTLSHandle_t palTLSHandle, palTLSConfHandle_t palTLSConf)
Perform the TLS handshake. This function is blocking.
uint32_t size
Definition: pal_TLS.h:58
palStatus_t pal_tlsSetSocket(palTLSConfHandle_t palTLSConf, palTLSSocket_t *socket)
Set the socket used by the TLS configuration context.
palStatus_t pal_cleanupTLS(void)
Free resources for the TLS library.
palStatus_t pal_tlsConfigurationFree(palTLSConfHandle_t *palTLSConf)
Destroy and free the resources of the TLS configurtion context.
void pal_setDTLSSocketCallback(palTLSConfHandle_t palTLSConf, palSocketCallback_f callback, void *argument)
Set the socket callback function pointer for the DTLS handshake retransmission. DTLS only...
palStatus_t pal_freeTLS(palTLSHandle_t *palTLSHandle)
Destroy and free the resources of the TLS context.
palSocket_t socket
Definition: pal_TLS.h:49
palTLSTransportMode_t transportationMode
Definition: pal_TLS.h:52
palTLSBuffer_t palX509_t
Definition: pal_TLS.h:61
int32_t palStatus_t
Definition: pal_types.h:49
palTLSBuffer_t palX509CRL_t
Definition: pal_TLS.h:62
palStatus_t pal_setHandShakeTimeOut(palTLSConfHandle_t palTLSConf, uint32_t timeoutInMilliSec)
Set the retransmit timeout values for the DTLS handshake. DTLS only, no effect on TLS...
Definition: pal_network.h:48
palStatus_t pal_sslRead(palTLSHandle_t palTLSHandle, void *buffer, uint32_t len, uint32_t *actualLen)
Read the application data bytes (the max number of bytes).