Lines Matching refs:psk

2124     if (conf->psk != NULL && conf->psk_len != 0) {  in mbedtls_ssl_conf_has_static_psk()
2141 if (conf->psk != NULL) { in ssl_conf_remove_psk()
2142 mbedtls_zeroize_and_free(conf->psk, conf->psk_len); in ssl_conf_remove_psk()
2143 conf->psk = NULL; in ssl_conf_remove_psk()
2184 const unsigned char *psk, size_t psk_len, in mbedtls_ssl_conf_psk() argument
2195 if (psk == NULL) { in mbedtls_ssl_conf_psk()
2205 if ((conf->psk = mbedtls_calloc(1, psk_len)) == NULL) { in mbedtls_ssl_conf_psk()
2209 memcpy(conf->psk, psk, conf->psk_len); in mbedtls_ssl_conf_psk()
2233 if (ssl->handshake->psk != NULL) { in ssl_remove_psk()
2234 mbedtls_zeroize_and_free(ssl->handshake->psk, in ssl_remove_psk()
2242 const unsigned char *psk, size_t psk_len) in mbedtls_ssl_set_hs_psk() argument
2251 if (psk == NULL || ssl->handshake == NULL) { in mbedtls_ssl_set_hs_psk()
2284 status = psa_import_key(&key_attributes, psk, psk_len, &key); in mbedtls_ssl_set_hs_psk()
2293 if ((ssl->handshake->psk = mbedtls_calloc(1, psk_len)) == NULL) { in mbedtls_ssl_set_hs_psk()
2298 memcpy(ssl->handshake->psk, psk, ssl->handshake->psk_len); in mbedtls_ssl_set_hs_psk()
2306 mbedtls_svc_key_id_t psk, in mbedtls_ssl_conf_psk_opaque() argument
2318 if (mbedtls_svc_key_id_is_null(psk)) { in mbedtls_ssl_conf_psk_opaque()
2321 conf->psk_opaque = psk; in mbedtls_ssl_conf_psk_opaque()
2334 mbedtls_svc_key_id_t psk) in mbedtls_ssl_set_hs_psk_opaque() argument
2336 if ((mbedtls_svc_key_id_is_null(psk)) || in mbedtls_ssl_set_hs_psk_opaque()
2342 ssl->handshake->psk_opaque = psk; in mbedtls_ssl_set_hs_psk_opaque()
4852 if (handshake->psk != NULL) { in mbedtls_ssl_handshake_free()
4853 mbedtls_zeroize_and_free(handshake->psk, handshake->psk_len); in mbedtls_ssl_handshake_free()
6044 if (conf->psk != NULL) { in mbedtls_ssl_config_free()
6045 mbedtls_zeroize_and_free(conf->psk, conf->psk_len); in mbedtls_ssl_config_free()
6046 conf->psk = NULL; in mbedtls_ssl_config_free()
7071 mbedtls_svc_key_id_t psk; in ssl_compute_master() local
7078 psk = mbedtls_ssl_get_opaque_psk(ssl); in ssl_compute_master()
7108 status = setup_psa_key_derivation(&derivation, psk, alg, in ssl_compute_master()
7109 ssl->conf->psk, ssl->conf->psk_len, in ssl_compute_master()
7393 const unsigned char *psk = NULL; in mbedtls_ssl_psk_derive_premaster() local
7395 int psk_ret = mbedtls_ssl_get_psk(ssl, &psk, &psk_len); in mbedtls_ssl_psk_derive_premaster()
7504 memcpy(p, psk, psk_len); in mbedtls_ssl_psk_derive_premaster()