/third_party/libcoap/man/ |
D | coap_endpoint_server.txt.in | 388 coap_dtls_spsk_info_t psk_info; 412 return &valid_sni_list->sni_list[i].psk_info; 450 dtls_psk.psk_info.hint.s = (const uint8_t*)hint; 451 dtls_psk.psk_info.hint.length = hint ? strlen(hint) : 0; 452 dtls_psk.psk_info.key.s = key; 453 dtls_psk.psk_info.key.length = key_len; 492 coap_dtls_cpsk_info_t *psk_info = (coap_dtls_cpsk_info_t *)arg; 501 return psk_info; 535 dtls_psk.ih_call_back_arg = &dtls_psk.psk_info; 541 dtls_psk.psk_info.identity.s = identity; [all …]
|
D | coap_endpoint_client.txt.in | 300 coap_dtls_cpsk_info_t *psk_info = (coap_dtls_cpsk_info_t *)arg; 307 return psk_info; 342 dtls_psk.ih_call_back_arg = &dtls_psk.psk_info; 348 dtls_psk.psk_info.identity.s = identity; 349 dtls_psk.psk_info.identity.length = identity_len; 350 dtls_psk.psk_info.key.s = key; 351 dtls_psk.psk_info.key.length = key_len;
|
D | coap_encryption.txt.in | 147 coap_dtls_cpsk_info_t psk_info; /* Client PSK definition */ 271 coap_dtls_spsk_info_t psk_info; /* Server PSK definition */ 1052 coap_dtls_spsk_info_t psk_info; 1076 return &valid_sni_list->sni_list[i].psk_info; 1114 dtls_psk.psk_info.hint.s = (const uint8_t*)hint; 1115 dtls_psk.psk_info.hint.length = hint ? strlen(hint) : 0; 1116 dtls_psk.psk_info.key.s = key; 1117 dtls_psk.psk_info.key.length = key_len; 1156 coap_dtls_cpsk_info_t *psk_info = (coap_dtls_cpsk_info_t *)arg; 1163 return psk_info; [all …]
|
/third_party/libcoap/src/ |
D | net.c | 304 const coap_dtls_cpsk_info_t *psk_info; in coap_get_session_client_psk() local 317 psk_info = &session->cpsk_setup_data.psk_info; in coap_get_session_client_psk() 318 if (psk_info->identity.s && psk_info->identity.length > 0 && in coap_get_session_client_psk() 319 psk_info->key.s && psk_info->key.length > 0) { in coap_get_session_client_psk() 320 if (psk_info->identity.length <= max_identity_len && in coap_get_session_client_psk() 321 psk_info->key.length <= max_psk_len) { in coap_get_session_client_psk() 322 memcpy(identity, psk_info->identity.s, psk_info->identity.length); in coap_get_session_client_psk() 323 memcpy(psk, psk_info->key.s, psk_info->key.length); in coap_get_session_client_psk() 324 *identity_len = psk_info->identity.length; in coap_get_session_client_psk() 325 return psk_info->key.length; in coap_get_session_client_psk() [all …]
|
D | coap_openssl.c | 132 coap_dtls_spsk_info_t psk_info; member 453 const coap_dtls_cpsk_info_t *psk_info = in coap_dtls_psk_client_callback() local 458 if (psk_info == NULL) in coap_dtls_psk_client_callback() 460 if (psk_info->identity.length >= max_identity_len) in coap_dtls_psk_client_callback() 462 if (psk_info->key.length > max_psk_len) in coap_dtls_psk_client_callback() 468 identity_len = psk_info->identity.length; in coap_dtls_psk_client_callback() 469 c_session->psk_identity = coap_new_bin_const(psk_info->identity.s, identity_len); in coap_dtls_psk_client_callback() 470 memcpy(identity, psk_info->identity.s, identity_len); in coap_dtls_psk_client_callback() 476 psk_len = psk_info->key.length; in coap_dtls_psk_client_callback() 477 c_session->psk_key = coap_new_bin_const(psk_info->key.s, psk_len); in coap_dtls_psk_client_callback() [all …]
|
D | coap_gnutls.c | 113 coap_dtls_spsk_info_t psk_info; member 552 const coap_dtls_cpsk_info_t *psk_info = in psk_client_callback() local 557 if (psk_info == NULL) in psk_client_callback() 560 *username = gnutls_malloc(psk_info->identity.length+1); in psk_client_callback() 563 memcpy(*username, psk_info->identity.s, psk_info->identity.length); in psk_client_callback() 564 (*username)[psk_info->identity.length] = '\000'; in psk_client_callback() 566 key->data = gnutls_malloc(psk_info->key.length); in psk_client_callback() 572 memcpy(key->data, psk_info->key.s, psk_info->key.length); in psk_client_callback() 573 key->size = psk_info->key.length; in psk_client_callback() 1448 if (setup_data->psk_info.hint.s) { in setup_psk_credentials() [all …]
|
D | coap_session.c | 998 setup_data.psk_info.identity.s = (const uint8_t *)identity; in coap_new_client_session_psk() 999 setup_data.psk_info.identity.length = strlen(identity); in coap_new_client_session_psk() 1003 setup_data.psk_info.key.s = key; in coap_new_client_session_psk() 1004 setup_data.psk_info.key.length = key_len; in coap_new_client_session_psk() 1025 if (setup_data->psk_info.identity.s) { in coap_new_client_session_psk2() 1027 coap_new_bin_const(setup_data->psk_info.identity.s, in coap_new_client_session_psk2() 1028 setup_data->psk_info.identity.length); in coap_new_client_session_psk2() 1041 if (setup_data->psk_info.key.s && setup_data->psk_info.key.length > 0) { in coap_new_client_session_psk2() 1042 session->psk_key = coap_new_bin_const(setup_data->psk_info.key.s, in coap_new_client_session_psk2() 1043 setup_data->psk_info.key.length); in coap_new_client_session_psk2()
|
D | coap_tinydtls.c | 244 const coap_dtls_cpsk_info_t *psk_info = in get_psk_info() local 249 if (psk_info == NULL) in get_psk_info() 251 if (psk_info->identity.length >= result_length) in get_psk_info() 253 if (psk_info->key.length > sizeof(psk)) in get_psk_info() 259 identity_length = psk_info->identity.length; in get_psk_info() 260 coap_session->psk_identity = coap_new_bin_const(psk_info->identity.s, identity_length); in get_psk_info() 261 memcpy(result, psk_info->identity.s, identity_length); in get_psk_info() 264 coap_session_refresh_psk_key(coap_session, &psk_info->key); in get_psk_info()
|
D | coap_mbedtls.c | 120 coap_dtls_spsk_info_t psk_info; member 865 m_context->psk_sni_entry_list[i].psk_info = *new_entry; in psk_sni_callback() 874 &m_context->psk_sni_entry_list[i].psk_info.hint); in psk_sni_callback() 876 &m_context->psk_sni_entry_list[i].psk_info.key); in psk_sni_callback() 878 m_context->psk_sni_entry_list[i].psk_info.key.s, in psk_sni_callback() 879 m_context->psk_sni_entry_list[i].psk_info.key.length); in psk_sni_callback()
|
/third_party/libcoap/include/coap3/ |
D | coap_dtls.h | 367 coap_dtls_cpsk_info_t psk_info; /**< Client PSK definition */ member 455 coap_dtls_spsk_info_t psk_info; /**< Server PSK definition */ member
|
/third_party/libcoap/examples/ |
D | coap-server.c | 772 dtls_cpsk.psk_info.identity.s = user; in setup_cpsk() 773 dtls_cpsk.psk_info.identity.length = user_length; in setup_cpsk() 774 dtls_cpsk.psk_info.key.s = key; in setup_cpsk() 775 dtls_cpsk.psk_info.key.length = key_length; in setup_cpsk() 1929 static coap_dtls_spsk_info_t psk_info; in verify_psk_sni_callback() local 1932 memset (&psk_info, 0, sizeof(psk_info)); in verify_psk_sni_callback() 1933 psk_info.hint.s = (const uint8_t *)hint; in verify_psk_sni_callback() 1934 psk_info.hint.length = hint ? strlen(hint) : 0; in verify_psk_sni_callback() 1935 psk_info.key.s = key; in verify_psk_sni_callback() 1936 psk_info.key.length = key_length; in verify_psk_sni_callback() [all …]
|
D | coap-client.c | 1170 coap_dtls_cpsk_info_t *psk_info = (coap_dtls_cpsk_info_t *)arg; in verify_ih_callback() local 1182 psk_identity_info = *psk_info; in verify_ih_callback() 1195 return psk_info; in verify_ih_callback() 1297 dtls_psk.ih_call_back_arg = &dtls_psk.psk_info; in setup_psk() 1304 dtls_psk.psk_info.identity.s = identity; in setup_psk() 1305 dtls_psk.psk_info.identity.length = identity_len; in setup_psk() 1306 dtls_psk.psk_info.key.s = key; in setup_psk() 1307 dtls_psk.psk_info.key.length = key_len; in setup_psk()
|
D | coap-rd.c | 688 dtls_psk.psk_info.hint.s = (const uint8_t *)hint; in fill_keystore() 689 dtls_psk.psk_info.hint.length = hint ? strlen(hint) : 0; in fill_keystore() 690 dtls_psk.psk_info.key.s = key; in fill_keystore() 691 dtls_psk.psk_info.key.length = key_length; in fill_keystore()
|
/third_party/mbedtls/programs/ssl/ |
D | ssl_server2.c | 1298 psk_entry *psk_info = NULL; in main() local 2185 if( ( psk_info = psk_parse( opt.psk_list ) ) == NULL ) in main() 2961 for( cur_psk = psk_info; cur_psk != NULL; cur_psk = cur_psk->next ) in main() 2976 mbedtls_ssl_conf_psk_cb( &conf, psk_callback, psk_info ); in main() 3975 ret = psk_free( psk_info ); in main()
|