libcoap 4.3.5-develop-7370fcf
Loading...
Searching...
No Matches
coap_oscore.c File Reference

CoAP OSCORE handling. More...

+ Include dependency graph for coap_oscore.c:

Go to the source code of this file.

Functions

int coap_oscore_is_supported (void)
 Check whether OSCORE is available.
 
coap_session_tcoap_new_client_session_oscore (coap_context_t *ctx, const coap_address_t *local_if, const coap_address_t *server, coap_proto_t proto, coap_oscore_conf_t *oscore_conf)
 Creates a new client session to the designated server, protecting the data using OSCORE.
 
coap_session_tcoap_new_client_session_oscore3 (coap_context_t *ctx, const coap_address_t *local_if, const coap_address_t *server, coap_proto_t proto, coap_oscore_conf_t *oscore_conf, void *app_data, coap_app_data_free_callback_t callback, coap_str_const_t *ws_host)
 Creates a new client session to the designated server, protecting the data using OSCORE, along with app_data information (as per coap_session_set_app_data2()) and optional WebSockets host (as per coap_ws_set_host_request()) to remove timing window call-back in startup instead of doing coap_new_client_session_oscore(); coap_session_set_app_data2(); or coap_new_client_session_oscore(); coap_ws_set_host_request();.
 
coap_session_tcoap_new_client_session_oscore_psk (coap_context_t *ctx, const coap_address_t *local_if, const coap_address_t *server, coap_proto_t proto, coap_dtls_cpsk_t *psk_data, coap_oscore_conf_t *oscore_conf)
 Creates a new client session to the designated server with PSK credentials as well as protecting the data using OSCORE.
 
coap_session_tcoap_new_client_session_oscore_psk3 (coap_context_t *ctx, const coap_address_t *local_if, const coap_address_t *server, coap_proto_t proto, coap_dtls_cpsk_t *psk_data, coap_oscore_conf_t *oscore_conf, void *app_data, coap_app_data_free_callback_t callback, coap_str_const_t *ws_host)
 Creates a new client session to the designated server, with PSK credentials protecting the data using OSCORE, along with app_data information (as per coap_session_set_app_data2()) and optional WebSockets host (as per coap_ws_set_host_request()) to remove timing window call-back in (D)TLS startup instead of doing coap_new_client_session_oscore_psk(); coap_session_set_app_data2(); or coap_new_client_session_oscore_psk(); coap_ws_set_host_request();.
 
coap_session_tcoap_new_client_session_oscore_pki (coap_context_t *ctx, const coap_address_t *local_if, const coap_address_t *server, coap_proto_t proto, coap_dtls_pki_t *pki_data, coap_oscore_conf_t *oscore_conf)
 Creates a new client session to the designated server with PKI credentials as well as protecting the data using OSCORE.
 
coap_session_tcoap_new_client_session_oscore_pki3 (coap_context_t *ctx, const coap_address_t *local_if, const coap_address_t *server, coap_proto_t proto, coap_dtls_pki_t *pki_data, coap_oscore_conf_t *oscore_conf, void *app_data, coap_app_data_free_callback_t callback, coap_str_const_t *ws_host)
 Creates a new client session to the designated server, with PKI credentials protecting the data using OSCORE, along with app_data information (as per coap_session_set_app_data2()) and optional WebSockets host (as per coap_ws_set_host_request()) to remove timing window call-back in (D)TLS startup instead of doing coap_new_client_session_oscore_pki(); coap_session_set_app_data2(); or coap_new_client_session_oscore_pki(); coap_ws_set_host_request();.
 
int coap_context_oscore_server (coap_context_t *context, coap_oscore_conf_t *oscore_conf)
 Set the context's default OSCORE configuration for a server.
 
coap_oscore_conf_tcoap_new_oscore_conf (coap_str_const_t conf_mem, coap_oscore_save_seq_num_t save_seq_num_func, void *save_seq_num_func_param, uint64_t start_seq_num)
 Parse an OSCORE configuration (held in memory) and populate a OSCORE configuration structure.
 
int coap_delete_oscore_conf (coap_oscore_conf_t *oscore_conf)
 Release all the information associated with the OSCORE configuration.
 
int coap_new_oscore_recipient (coap_context_t *context, coap_bin_const_t *recipient_id)
 Add in the specific Recipient ID into the OSCORE context (server only).
 
int coap_delete_oscore_recipient (coap_context_t *context, coap_bin_const_t *recipient_id)
 Release all the information associated for the specific Recipient ID (and hence stop any further OSCORE protection for this Recipient).
 
void coap_oscore_register_external_handlers (coap_context_t *context, coap_oscore_find_handler_t find_handler, coap_oscore_update_seq_num_handler_t update_seq_num_handler)
 Register external storage handlers for OSCORE session state.
 
COAP_API int coap_oscore_recipient_set_last_seq (coap_oscore_conf_t *oscore_conf, const coap_bin_const_t *recipient_id, uint64_t last_seq)
 
COAP_API int coap_oscore_recipient_set_seq_window (coap_oscore_conf_t *oscore_conf, const coap_bin_const_t *recipient_id, uint64_t seq_window)
 

Detailed Description

CoAP OSCORE handling.

Definition in file coap_oscore.c.

Function Documentation

◆ coap_oscore_recipient_set_last_seq()

COAP_API int coap_oscore_recipient_set_last_seq ( coap_oscore_conf_t oscore_conf,
const coap_bin_const_t recipient_id,
uint64_t  last_seq 
)

Definition at line 3000 of file coap_oscore.c.

◆ coap_oscore_recipient_set_seq_window()

COAP_API int coap_oscore_recipient_set_seq_window ( coap_oscore_conf_t oscore_conf,
const coap_bin_const_t recipient_id,
uint64_t  seq_window 
)

Definition at line 3010 of file coap_oscore.c.