Home
last modified time | relevance | path

Searched refs:psk_key (Results 1 – 15 of 15) sorted by relevance

/third_party/libcoap/src/
Dcoap_session.c629 if (session->psk_key) in coap_session_mfree()
630 coap_delete_bin_const(session->psk_key); in coap_session_mfree()
1485 session->psk_key = coap_new_bin_const(setup_data->psk_info.key.s, in coap_new_client_session_psk2()
1487 if (!session->psk_key) { in coap_new_client_session_psk2()
1542 const coap_bin_const_t *psk_key in coap_session_refresh_psk_key() argument
1545 coap_bin_const_t *old_psk_key = session->psk_key; in coap_session_refresh_psk_key()
1547 if (psk_key && psk_key->s) { in coap_session_refresh_psk_key()
1548 if (session->psk_key) { in coap_session_refresh_psk_key()
1549 if (coap_binary_equal(session->psk_key, psk_key)) in coap_session_refresh_psk_key()
1552 session->psk_key = coap_new_bin_const(psk_key->s, psk_key->length); in coap_session_refresh_psk_key()
[all …]
Dcoap_tinydtls.c387 const coap_bin_const_t *psk_key; in get_psk_info() local
458 psk_key = coap_get_session_client_psk_key(coap_session); in get_psk_info()
459 if (psk_key == NULL) { in get_psk_info()
464 if (psk_key->length > result_length) { in get_psk_info()
469 result_length = psk_key->length; in get_psk_info()
471 memcpy(result, psk_key->s, result_length); in get_psk_info()
490 psk_key = in get_psk_info()
495 psk_key = coap_get_session_server_psk_key(coap_session); in get_psk_info()
498 if (psk_key == NULL) { in get_psk_info()
503 coap_session_refresh_psk_key(coap_session, psk_key); in get_psk_info()
[all …]
Dcoap_gnutls.c563 const coap_bin_const_t *psk_key; in psk_client_callback() local
603 psk_key = &cpsk_info->key; in psk_client_callback()
606 psk_key = coap_get_session_client_psk_key(c_session); in psk_client_callback()
609 if (psk_identity == NULL || psk_key == NULL) { in psk_client_callback()
620 key->data = gnutls_malloc(psk_key->length); in psk_client_callback()
626 memcpy(key->data, psk_key->s, psk_key->length); in psk_client_callback()
627 key->size = psk_key->length; in psk_client_callback()
1781 const coap_bin_const_t *psk_key; in psk_server_callback() local
1801 psk_key = setup_data->validate_id_call_back(&lidentity, in psk_server_callback()
1805 coap_session_refresh_psk_key(c_session, psk_key); in psk_server_callback()
[all …]
Dcoap_openssl.c506 const coap_bin_const_t *psk_key; in coap_dtls_psk_client_callback() local
540 psk_key = &cpsk_info->key; in coap_dtls_psk_client_callback()
543 psk_key = coap_get_session_client_psk_key(c_session); in coap_dtls_psk_client_callback()
546 if (psk_identity == NULL || psk_key == NULL) { in coap_dtls_psk_client_callback()
565 if (psk_key->length > max_psk_len) { in coap_dtls_psk_client_callback()
570 max_psk_len = (unsigned int)psk_key->length; in coap_dtls_psk_client_callback()
572 memcpy(psk, psk_key->s, max_psk_len); in coap_dtls_psk_client_callback()
588 const coap_bin_const_t *psk_key; in coap_dtls_psk_server_callback() local
605 psk_key = setup_data->validate_id_call_back(&lidentity, in coap_dtls_psk_server_callback()
609 coap_session_refresh_psk_key(c_session, psk_key); in coap_dtls_psk_server_callback()
[all …]
Dcoap_mbedtls.c264 const coap_bin_const_t *psk_key; in psk_server_callback() local
281 psk_key = setup_data->validate_id_call_back(&lidentity, in psk_server_callback()
285 coap_session_refresh_psk_key(c_session, psk_key); in psk_server_callback()
287 psk_key = coap_get_session_server_psk_key(c_session); in psk_server_callback()
290 if (psk_key == NULL) in psk_server_callback()
292 mbedtls_ssl_set_hs_psk(ssl, psk_key->s, psk_key->length); in psk_server_callback()
1148 const coap_bin_const_t *psk_key; local
1153 psk_key = coap_get_session_client_psk_key(c_session);
1155 if (psk_key == NULL || psk_identity == NULL) {
1160 if ((ret = mbedtls_ssl_conf_psk(&m_env->conf, psk_key->s,
[all …]
Dcoap_net.c273 if (session->psk_key) { in coap_get_session_client_psk_key()
274 return session->psk_key; in coap_get_session_client_psk_key()
301 if (session->psk_key) in coap_get_session_server_psk_key()
302 return session->psk_key; in coap_get_session_server_psk_key()
/third_party/libcoap/include/coap3/
Dcoap_session_internal.h127 coap_bin_const_t *psk_key; /**< If client, this field contains the member
291 const coap_bin_const_t *psk_key);
/third_party/openssl/apps/
Ds_client.c127 key = OPENSSL_hexstr2buf(psk_key, &key_len); in psk_client_cb()
130 psk_key); in psk_client_cb()
170 unsigned char *key = OPENSSL_hexstr2buf(psk_key, &key_len); in psk_use_session_cb()
174 psk_key); in psk_use_session_cb()
1163 for (p = psk_key = opt_arg(); *p; p++) { in s_client_main()
1166 BIO_printf(bio_err, "Not a hex number '%s'\n", psk_key); in s_client_main()
1802 if (psk_key != NULL) { in s_client_main()
1824 if (psk_key != NULL || psksess != NULL) in s_client_main()
Ds_server.c119 char *psk_key = NULL; /* by default PSK is not used */ variable
162 key = OPENSSL_hexstr2buf(psk_key, &key_len); in psk_server_cb()
165 psk_key); in psk_server_cb()
211 key = OPENSSL_hexstr2buf(psk_key, &key_len); in psk_find_session_cb()
214 psk_key); in psk_find_session_cb()
1439 for (p = psk_key = opt_arg(); *p; p++) { in s_server_main()
1442 BIO_printf(bio_err, "Not a hex number '%s'\n", psk_key); in s_server_main()
2115 if (psk_key != NULL) { in s_server_main()
2151 if (psk_key != NULL || psksess != NULL) in s_server_main()
/third_party/node/deps/openssl/openssl/apps/
Ds_client.c127 key = OPENSSL_hexstr2buf(psk_key, &key_len); in psk_client_cb()
130 psk_key); in psk_client_cb()
170 unsigned char *key = OPENSSL_hexstr2buf(psk_key, &key_len); in psk_use_session_cb()
174 psk_key); in psk_use_session_cb()
1163 for (p = psk_key = opt_arg(); *p; p++) { in s_client_main()
1166 BIO_printf(bio_err, "Not a hex number '%s'\n", psk_key); in s_client_main()
1802 if (psk_key != NULL) { in s_client_main()
1824 if (psk_key != NULL || psksess != NULL) in s_client_main()
Ds_server.c119 char *psk_key = NULL; /* by default PSK is not used */ variable
162 key = OPENSSL_hexstr2buf(psk_key, &key_len); in psk_server_cb()
165 psk_key); in psk_server_cb()
211 key = OPENSSL_hexstr2buf(psk_key, &key_len); in psk_find_session_cb()
214 psk_key); in psk_find_session_cb()
1439 for (p = psk_key = opt_arg(); *p; p++) { in s_server_main()
1442 BIO_printf(bio_err, "Not a hex number '%s'\n", psk_key); in s_server_main()
2115 if (psk_key != NULL) { in s_server_main()
2151 if (psk_key != NULL || psksess != NULL) in s_server_main()
/third_party/openssl/test/
Dssl_old_test.c93 static char *psk_key = NULL; /* by default PSK is not used */ variable
1008 psk_key = *(++argv); in main()
1010 if (strspn(psk_key, "abcdefABCDEF1234567890") != strlen(psk_key)) { in main()
1585 if (psk_key != NULL) { in main()
2978 ret = psk_key2bn(psk_key, psk, max_psk_len); in psk_client_callback()
2996 psk_len = psk_key2bn(psk_key, psk, max_psk_len); in psk_server_callback()
/third_party/libcoap/examples/
Dcoap-server.c1971 static coap_bin_const_t psk_key; in verify_id_callback() local
2000 psk_key = *s_psk_key; in verify_id_callback()
2001 return &psk_key; in verify_id_callback()
2005 psk_key.s = key; in verify_id_callback()
2006 psk_key.length = key_length; in verify_id_callback()
2007 return &psk_key; in verify_id_callback()
/third_party/openssl/apps/include/
Dapps.h265 extern char *psk_key;
/third_party/node/deps/openssl/openssl/apps/include/
Dapps.h265 extern char *psk_key;