49#ifdef COAP_DTLS_PSK_DEFAULT_IDENTITY
50#ifdef COAP_DTLS_PSK_DEFAULT_KEY
53get_default_psk_info(
const coap_endpoint_t *address_info,
57 if(info->identity == NULL || info->identity_len == 0) {
59 info->identity = (uint8_t *)COAP_DTLS_PSK_DEFAULT_IDENTITY;
60 info->identity_len = strlen(COAP_DTLS_PSK_DEFAULT_IDENTITY);
63 if(info->identity_len != strlen(COAP_DTLS_PSK_DEFAULT_IDENTITY) ||
64 memcmp(info->identity, COAP_DTLS_PSK_DEFAULT_IDENTITY,
65 info->identity_len) != 0) {
69 info->key = (uint8_t *)COAP_DTLS_PSK_DEFAULT_KEY;
70 info->key_len = strlen(COAP_DTLS_PSK_DEFAULT_KEY);
76 .coap_get_psk_info = get_default_psk_info
87#ifdef COAP_DTLS_PSK_DEFAULT_IDENTITY
88#ifdef COAP_DTLS_PSK_DEFAULT_KEY
API to address CoAP endpoints.
void coap_keystore_simple_init(void)
Registers a simple CoAP DTLS keystore with fixed pre-shared key credentials.
void coap_set_keystore(const coap_keystore_t *keystore)
Set the CoAP keystore to use by CoAP.
The structure of a CoAP pre-shared key info.
The structure of a CoAP keystore.