libcoap 4.3.5-develop-19cef11
|
Internal CoAP DTLS support. More...
#include "coap_internal.h"
Go to the source code of this file.
Macros | |
#define | COAP_DTLS_RETRANSMIT_COAP_TICKS (COAP_DTLS_RETRANSMIT_MS * COAP_TICKS_PER_SECOND / 1000) |
Functions | |
void * | coap_dtls_new_context (coap_context_t *coap_context) |
Creates a new DTLS context for the given coap_context . More... | |
int | coap_dtls_context_set_spsk (coap_context_t *coap_context, coap_dtls_spsk_t *setup_data) |
Set the DTLS context's default server PSK information. More... | |
int | coap_dtls_context_set_cpsk (coap_context_t *coap_context, coap_dtls_cpsk_t *setup_data) |
Set the DTLS context's default client PSK information. More... | |
int | coap_dtls_context_set_pki (coap_context_t *coap_context, const coap_dtls_pki_t *setup_data, const coap_dtls_role_t role) |
Set the DTLS context's default server PKI information. More... | |
int | coap_dtls_context_set_pki_root_cas (coap_context_t *coap_context, const char *ca_file, const char *ca_dir) |
Set the dtls context's default Root CA information for a client or server. More... | |
int | coap_dtls_context_check_keys_enabled (coap_context_t *coap_context) |
Check whether one of the coap_dtls_context_set_{psk|pki}() functions have been called. More... | |
void | coap_dtls_free_context (void *dtls_context) |
Releases the storage allocated for dtls_context . More... | |
void * | coap_dtls_new_client_session (coap_session_t *coap_session) |
Create a new client-side session. More... | |
void * | coap_dtls_new_server_session (coap_session_t *coap_session) |
Create a new DTLS server-side session. More... | |
void | coap_dtls_free_session (coap_session_t *coap_session) |
Terminates the DTLS session (may send an ALERT if necessary) then frees the underlying TLS library object containing security parameters for the session. More... | |
void | coap_dtls_session_update_mtu (coap_session_t *coap_session) |
Notify of a change in the CoAP session's MTU, for example after a PMTU update. More... | |
ssize_t | coap_dtls_send (coap_session_t *coap_session, const uint8_t *data, size_t data_len) |
Send data to a DTLS peer. More... | |
int | coap_dtls_is_context_timeout (void) |
Check if timeout is handled per CoAP session or per CoAP context. More... | |
coap_tick_t | coap_dtls_get_context_timeout (void *dtls_context) |
Do all pending retransmits and get next timeout. More... | |
coap_tick_t | coap_dtls_get_timeout (coap_session_t *coap_session, coap_tick_t now) |
Get next timeout for this session. More... | |
int | coap_dtls_handle_timeout (coap_session_t *coap_session) |
Handle a DTLS timeout expiration. More... | |
int | coap_dtls_receive (coap_session_t *coap_session, const uint8_t *data, size_t data_len) |
Handling incoming data from a DTLS peer. More... | |
int | coap_dtls_hello (coap_session_t *coap_session, const uint8_t *data, size_t data_len) |
Handling client HELLO messages from a new candiate peer. More... | |
void | coap_dtls_establish (coap_session_t *session) |
Layer function interface for layer below DTLS connect being established. More... | |
void | coap_dtls_close (coap_session_t *session) |
Layer function interface for DTLS close for a session. More... | |
unsigned int | coap_dtls_get_overhead (coap_session_t *coap_session) |
Get DTLS overhead over cleartext PDUs. More... | |
void * | coap_tls_new_client_session (coap_session_t *coap_session) |
Create a new TLS client-side session. More... | |
void * | coap_tls_new_server_session (coap_session_t *coap_session) |
Create a TLS new server-side session. More... | |
void | coap_tls_free_session (coap_session_t *coap_session) |
Terminates the TLS session (may send an ALERT if necessary) then frees the underlying TLS library object containing security parameters for the session. More... | |
ssize_t | coap_tls_write (coap_session_t *coap_session, const uint8_t *data, size_t data_len) |
Send data to a TLS peer, with implicit flush. More... | |
ssize_t | coap_tls_read (coap_session_t *coap_session, uint8_t *data, size_t data_len) |
Read some data from a TLS peer. More... | |
void | coap_tls_establish (coap_session_t *session) |
Layer function interface for layer below TLS accept/connect being established. More... | |
void | coap_tls_close (coap_session_t *session) |
Layer function interface for TLS close for a session. More... | |
const coap_bin_const_t * | coap_get_session_client_psk_key (const coap_session_t *coap_session) |
Get the current client's PSK key. More... | |
const coap_bin_const_t * | coap_get_session_client_psk_identity (const coap_session_t *coap_session) |
Get the current client's PSK identity. More... | |
const coap_bin_const_t * | coap_get_session_server_psk_key (const coap_session_t *coap_session) |
Get the current server's PSK key. More... | |
const coap_bin_const_t * | coap_get_session_server_psk_hint (const coap_session_t *coap_session) |
Get the current server's PSK identity hint. More... | |
void | coap_dtls_startup (void) |
Initialize the underlying (D)TLS Library layer. More... | |
void | coap_dtls_shutdown (void) |
Close down the underlying (D)TLS Library layer. More... | |
void * | coap_dtls_get_tls (const coap_session_t *session, coap_tls_library_t *tls_lib) |
Get the actual (D)TLS object for the session. More... | |
void | coap_dtls_map_key_type_to_define (const coap_dtls_pki_t *setup_data, coap_dtls_key_t *key) |
Map the PKI key definitions to the new DEFINE format. More... | |
int | coap_dtls_define_issue (coap_define_issue_key_t type, coap_define_issue_fail_t fail, coap_dtls_key_t *key, const coap_dtls_role_t role, int ret) |
Report PKI DEFINE type issue. More... | |
int | coap_dtls_set_cid_tuple_change (coap_context_t *context, uint8_t every) |
Set the Connection ID client tuple frequency change for testing CIDs. More... | |
Internal CoAP DTLS support.
Definition in file coap_dtls_internal.h.