Lines Matching refs:conf
56 if (ssl->conf->endpoint != MBEDTLS_SSL_IS_SERVER) { in mbedtls_ssl_set_client_transport_id()
72 void mbedtls_ssl_conf_dtls_cookies(mbedtls_ssl_config *conf, in mbedtls_ssl_conf_dtls_cookies() argument
77 conf->f_cookie_write = f_cookie_write; in mbedtls_ssl_conf_dtls_cookies()
78 conf->f_cookie_check = f_cookie_check; in mbedtls_ssl_conf_dtls_cookies()
79 conf->p_cookie = p_cookie; in mbedtls_ssl_conf_dtls_cookies()
85 static int ssl_conf_has_psk_or_cb(mbedtls_ssl_config const *conf) in ssl_conf_has_psk_or_cb() argument
87 if (conf->f_psk != NULL) { in ssl_conf_has_psk_or_cb()
91 if (conf->psk_identity_len == 0 || conf->psk_identity == NULL) { in ssl_conf_has_psk_or_cb()
97 if (!mbedtls_svc_key_id_is_null(conf->psk_opaque)) { in ssl_conf_has_psk_or_cb()
102 if (conf->psk != NULL && conf->psk_len != 0) { in ssl_conf_has_psk_or_cb()
370 if (ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_cid_ext()
441 if (ssl->conf->encrypt_then_mac == MBEDTLS_SSL_ETM_ENABLED) { in ssl_parse_encrypt_then_mac_ext()
464 if (ssl->conf->extended_ms == MBEDTLS_SSL_EXTENDED_MS_ENABLED) { in ssl_parse_extended_ms_ext()
483 if (ssl->conf->f_ticket_parse == NULL || in ssl_parse_session_ticket_ext()
484 ssl->conf->f_ticket_write == NULL) { in ssl_parse_session_ticket_ext()
507 if ((ret = ssl->conf->f_ticket_parse(ssl->conf->p_ticket, &session, in ssl_parse_session_ticket_ext()
560 if ((ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) || in ssl_parse_use_srtp_ext()
561 (ssl->conf->dtls_srtp_profile_list == NULL) || in ssl_parse_use_srtp_ext()
562 (ssl->conf->dtls_srtp_profile_list_len == 0)) { in ssl_parse_use_srtp_ext()
618 for (i = 0; i < ssl->conf->dtls_srtp_profile_list_len; i++) { in ssl_parse_use_srtp_ext()
619 if (client_protection == ssl->conf->dtls_srtp_profile_list[i]) { in ssl_parse_use_srtp_ext()
620 ssl->dtls_srtp_info.chosen_dtls_srtp_profile = ssl->conf->dtls_srtp_profile_list[i]; in ssl_parse_use_srtp_ext()
643 if (ssl->conf->dtls_srtp_mki_support == MBEDTLS_SSL_DTLS_SRTP_MKI_SUPPORTED && in ssl_parse_use_srtp_ext()
711 list = ssl->conf->key_cert; in ssl_pick_cert()
738 key_type_matches = ((ssl->conf->f_async_sign_start != NULL || in ssl_pick_cert()
739 ssl->conf->f_async_decrypt_start != NULL || in ssl_pick_cert()
847 ssl_conf_has_psk_or_cb(ssl->conf) == 0) { in ssl_ciphersuite_match()
968 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM in ssl_parse_client_hello()
1018 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_client_hello()
1078 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_client_hello()
1160 ssl->tls_version = mbedtls_ssl_read_version(buf, ssl->conf->transport); in ssl_parse_client_hello()
1202 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_client_hello()
1217 if (ssl->conf->f_cookie_check != NULL in ssl_parse_client_hello()
1222 if (ssl->conf->f_cookie_check(ssl->conf->p_cookie, in ssl_parse_client_hello()
1546 ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE) { in ssl_parse_client_hello()
1558 ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION) { in ssl_parse_client_hello()
1578 if (ssl->conf->f_cert_cb && (ret = ssl->conf->f_cert_cb(ssl)) != 0) { in ssl_parse_client_hello()
1594 ciphersuites = ssl->conf->ciphersuite_list; in ssl_parse_client_hello()
1597 if (ssl->conf->respect_cli_pref == MBEDTLS_SSL_SRV_CIPHERSUITE_ORDER_CLIENT) { in ssl_parse_client_hello()
1659 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_client_hello()
1957 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_write_ecjpake_kkpp_ext()
1982 if ((ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) || in ssl_write_use_srtp_ext()
1989 if (ssl->conf->dtls_srtp_mki_support == MBEDTLS_SSL_DTLS_SRTP_MKI_SUPPORTED) { in ssl_write_use_srtp_ext()
2053 mbedtls_ssl_write_version(p, ssl->conf->transport, ssl->tls_version); in ssl_write_hello_verify_request()
2058 if (ssl->conf->f_cookie_write == NULL) { in ssl_write_hello_verify_request()
2066 if ((ret = ssl->conf->f_cookie_write(ssl->conf->p_cookie, in ssl_write_hello_verify_request()
2089 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_hello_verify_request()
2116 if (ssl->conf->f_get_cache == NULL) { in ssl_handle_id_based_session_resumption()
2127 ret = ssl->conf->f_get_cache(ssl->conf->p_cache, in ssl_handle_id_based_session_resumption()
2166 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_server_hello()
2175 if (ssl->conf->f_rng == NULL) { in ssl_write_server_hello()
2190 mbedtls_ssl_write_version(p, ssl->conf->transport, ssl->tls_version); in ssl_write_server_hello()
2204 if ((ret = ssl->conf->f_rng(ssl->conf->p_rng, p, 4)) != 0) { in ssl_write_server_hello()
2211 if ((ret = ssl->conf->f_rng(ssl->conf->p_rng, p, 28)) != 0) { in ssl_write_server_hello()
2242 if ((ret = ssl->conf->f_rng(ssl->conf->p_rng, ssl->session_negotiate->id, in ssl_write_server_hello()
2407 authmode = ssl->conf->authmode; in ssl_write_certificate_request()
2499 if (ssl->conf->cert_req_ca_list == MBEDTLS_SSL_CERT_REQ_CA_LIST_ENABLED) { in ssl_write_certificate_request()
2511 if (ssl->conf->dn_hints != NULL) { in ssl_write_certificate_request()
2512 crt = ssl->conf->dn_hints; in ssl_write_certificate_request()
2520 crt = ssl->conf->ca_chain; in ssl_write_certificate_request()
2702 int ret = ssl->conf->f_async_resume(ssl, in ssl_resume_server_key_exchange()
2801 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_prepare_server_key_exchange()
2835 if (ssl->conf->dhm_P.p == NULL || ssl->conf->dhm_G.p == NULL) { in ssl_prepare_server_key_exchange()
2850 &ssl->conf->dhm_P, in ssl_prepare_server_key_exchange()
2851 &ssl->conf->dhm_G)) != 0) { in ssl_prepare_server_key_exchange()
2860 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_prepare_server_key_exchange()
3014 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_prepare_server_key_exchange()
3117 if (ssl->conf->f_async_sign_start != NULL) { in ssl_prepare_server_key_exchange()
3118 ret = ssl->conf->f_async_sign_start(ssl, in ssl_prepare_server_key_exchange()
3153 ssl->conf->f_rng, in ssl_prepare_server_key_exchange()
3154 ssl->conf->p_rng)) != 0) { in ssl_prepare_server_key_exchange()
3278 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_write_server_hello_done()
3289 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_server_hello_done()
3350 int ret = ssl->conf->f_async_resume(ssl, in ssl_resume_decrypt_pms()
3412 if (ssl->conf->f_async_decrypt_start != NULL) { in ssl_decrypt_encrypted_pms()
3413 ret = ssl->conf->f_async_decrypt_start(ssl, in ssl_decrypt_encrypted_pms()
3443 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_decrypt_encrypted_pms()
3482 mbedtls_ssl_write_version(ver, ssl->conf->transport, in ssl_parse_encrypted_pms()
3505 ret = ssl->conf->f_rng(ssl->conf->p_rng, fake_pms, sizeof(fake_pms)); in ssl_parse_encrypted_pms()
3544 if (ssl_conf_has_psk_or_cb(ssl->conf) == 0) { in ssl_parse_client_psk_identity()
3565 if (ssl->conf->f_psk != NULL) { in ssl_parse_client_psk_identity()
3566 if (ssl->conf->f_psk(ssl->conf->p_psk, ssl, *p, n) != 0) { in ssl_parse_client_psk_identity()
3572 if (n != ssl->conf->psk_identity_len || in ssl_parse_client_psk_identity()
3573 mbedtls_ct_memcmp(ssl->conf->psk_identity, *p, n) != 0) { in ssl_parse_client_psk_identity()
3648 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_parse_client_key_exchange()
3729 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_parse_client_key_exchange()
3773 p += ssl->conf->psk_identity_len + 2; in ssl_parse_client_key_exchange()
3819 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_parse_client_key_exchange()
3964 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_parse_client_key_exchange()
4191 if ((ret = ssl->conf->f_ticket_write(ssl->conf->p_ticket, in ssl_write_new_session_ticket()
4336 void mbedtls_ssl_conf_preference_order(mbedtls_ssl_config *conf, int order) in mbedtls_ssl_conf_preference_order() argument
4338 conf->respect_cli_pref = order; in mbedtls_ssl_conf_preference_order()