21#ifndef NET_SOCK_DTLS_CREDS_H
22#define NET_SOCK_DTLS_CREDS_H
37#ifndef CONFIG_DTLS_PSK_ID_HINT_MAX_SIZE
38#define CONFIG_DTLS_PSK_ID_HINT_MAX_SIZE 32
44#ifndef CONFIG_DTLS_CREDENTIALS_MAX
45#define CONFIG_DTLS_CREDENTIALS_MAX 4
64 const char* hint,
size_t hint_len);
uint16_t credman_tag_t
Tag of the credential.
int sock_dtls_set_server_psk_id_hint(sock_dtls_t *sock, const char *hint)
Sets the PSK Identity hint to be sent to clients during handshake.
void sock_dtls_set_client_psk_cb(sock_dtls_t *sock, sock_dtls_client_psk_cb_t cb)
Sets the callback function for clients to specify a credential to use for a given connection.
credman_tag_t(* sock_dtls_client_psk_cb_t)(sock_dtls_t *sock, sock_udp_ep_t *ep, credman_tag_t tags[], unsigned tags_len, const char *hint, size_t hint_len)
Pre-Shared Key client callback.
void sock_dtls_set_rpk_cb(sock_dtls_t *sock, sock_dtls_rpk_cb_t cb)
Sets the callback function to specify a credential to use for a given connection, when using Raw Publ...
size_t sock_dtls_get_credentials(sock_dtls_t *sock, const credman_tag_t **out)
Returns an array of tags of the registered credentials in sock.
int sock_dtls_remove_credential(sock_dtls_t *sock, credman_tag_t tag)
Removes a credential tag of the list of available credentials for sock.
credman_tag_t(* sock_dtls_rpk_cb_t)(sock_dtls_t *sock, sock_udp_ep_t *ep, credman_tag_t tags[], unsigned tags_len)
Raw Public Key callback.
int sock_dtls_add_credential(sock_dtls_t *sock, credman_tag_t tag)
Adds a credential tag to list of available credentials for sock.
Common IP-based transport layer end point.
Information about DTLS sock.