Lines Matching refs:conf
52 if (ssl->conf->endpoint != MBEDTLS_SSL_IS_SERVER) { in mbedtls_ssl_set_client_transport_id()
68 void mbedtls_ssl_conf_dtls_cookies(mbedtls_ssl_config *conf, in mbedtls_ssl_conf_dtls_cookies() argument
73 conf->f_cookie_write = f_cookie_write; in mbedtls_ssl_conf_dtls_cookies()
74 conf->f_cookie_check = f_cookie_check; in mbedtls_ssl_conf_dtls_cookies()
75 conf->p_cookie = p_cookie; in mbedtls_ssl_conf_dtls_cookies()
81 static int ssl_conf_has_psk_or_cb(mbedtls_ssl_config const *conf) in ssl_conf_has_psk_or_cb() argument
83 if (conf->f_psk != NULL) { in ssl_conf_has_psk_or_cb()
87 if (conf->psk_identity_len == 0 || conf->psk_identity == NULL) { in ssl_conf_has_psk_or_cb()
93 if (!mbedtls_svc_key_id_is_null(conf->psk_opaque)) { in ssl_conf_has_psk_or_cb()
98 if (conf->psk != NULL && conf->psk_len != 0) { in ssl_conf_has_psk_or_cb()
366 if (ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_cid_ext()
437 if (ssl->conf->encrypt_then_mac == MBEDTLS_SSL_ETM_ENABLED) { in ssl_parse_encrypt_then_mac_ext()
460 if (ssl->conf->extended_ms == MBEDTLS_SSL_EXTENDED_MS_ENABLED) { in ssl_parse_extended_ms_ext()
479 if (ssl->conf->f_ticket_parse == NULL || in ssl_parse_session_ticket_ext()
480 ssl->conf->f_ticket_write == NULL) { in ssl_parse_session_ticket_ext()
503 if ((ret = ssl->conf->f_ticket_parse(ssl->conf->p_ticket, &session, in ssl_parse_session_ticket_ext()
556 if ((ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) || in ssl_parse_use_srtp_ext()
557 (ssl->conf->dtls_srtp_profile_list == NULL) || in ssl_parse_use_srtp_ext()
558 (ssl->conf->dtls_srtp_profile_list_len == 0)) { in ssl_parse_use_srtp_ext()
614 for (i = 0; i < ssl->conf->dtls_srtp_profile_list_len; i++) { in ssl_parse_use_srtp_ext()
615 if (client_protection == ssl->conf->dtls_srtp_profile_list[i]) { in ssl_parse_use_srtp_ext()
616 ssl->dtls_srtp_info.chosen_dtls_srtp_profile = ssl->conf->dtls_srtp_profile_list[i]; in ssl_parse_use_srtp_ext()
639 if (ssl->conf->dtls_srtp_mki_support == MBEDTLS_SSL_DTLS_SRTP_MKI_SUPPORTED && in ssl_parse_use_srtp_ext()
707 list = ssl->conf->key_cert; in ssl_pick_cert()
734 key_type_matches = ((ssl->conf->f_async_sign_start != NULL || in ssl_pick_cert()
735 ssl->conf->f_async_decrypt_start != NULL || in ssl_pick_cert()
846 ssl_conf_has_psk_or_cb(ssl->conf) == 0) { in ssl_ciphersuite_match()
970 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM in ssl_parse_client_hello()
1023 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_client_hello()
1084 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_client_hello()
1164 … ssl->conf->transport); in ssl_parse_client_hello()
1166 ssl->session_negotiate->endpoint = ssl->conf->endpoint; in ssl_parse_client_hello()
1207 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_client_hello()
1222 if (ssl->conf->f_cookie_check != NULL in ssl_parse_client_hello()
1227 if (ssl->conf->f_cookie_check(ssl->conf->p_cookie, in ssl_parse_client_hello()
1551 ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE) { in ssl_parse_client_hello()
1563 ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION) { in ssl_parse_client_hello()
1583 if (ssl->conf->f_cert_cb && (ret = ssl->conf->f_cert_cb(ssl)) != 0) { in ssl_parse_client_hello()
1599 ciphersuites = ssl->conf->ciphersuite_list; in ssl_parse_client_hello()
1602 if (ssl->conf->respect_cli_pref == MBEDTLS_SSL_SRV_CIPHERSUITE_ORDER_CLIENT) { in ssl_parse_client_hello()
1664 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_client_hello()
1965 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_write_ecjpake_kkpp_ext()
1990 if ((ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) || in ssl_write_use_srtp_ext()
1997 if (ssl->conf->dtls_srtp_mki_support == MBEDTLS_SSL_DTLS_SRTP_MKI_SUPPORTED) { in ssl_write_use_srtp_ext()
2061 mbedtls_ssl_write_version(p, ssl->conf->transport, ssl->tls_version); in ssl_write_hello_verify_request()
2066 if (ssl->conf->f_cookie_write == NULL) { in ssl_write_hello_verify_request()
2074 if ((ret = ssl->conf->f_cookie_write(ssl->conf->p_cookie, in ssl_write_hello_verify_request()
2097 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_hello_verify_request()
2124 if (ssl->conf->f_get_cache == NULL) { in ssl_handle_id_based_session_resumption()
2135 ret = ssl->conf->f_get_cache(ssl->conf->p_cache, in ssl_handle_id_based_session_resumption()
2174 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_server_hello()
2193 mbedtls_ssl_write_version(p, ssl->conf->transport, ssl->tls_version); in ssl_write_server_hello()
2207 if ((ret = ssl->conf->f_rng(ssl->conf->p_rng, p, 4)) != 0) { in ssl_write_server_hello()
2214 if ((ret = ssl->conf->f_rng(ssl->conf->p_rng, p, 20)) != 0) { in ssl_write_server_hello()
2227 if (mbedtls_ssl_conf_is_tls13_enabled(ssl->conf)) { in ssl_write_server_hello()
2240 if ((ret = ssl->conf->f_rng(ssl->conf->p_rng, p, 8)) != 0) { in ssl_write_server_hello()
2271 if ((ret = ssl->conf->f_rng(ssl->conf->p_rng, ssl->session_negotiate->id, in ssl_write_server_hello()
2437 authmode = ssl->conf->authmode; in ssl_write_certificate_request()
2529 if (ssl->conf->cert_req_ca_list == MBEDTLS_SSL_CERT_REQ_CA_LIST_ENABLED) { in ssl_write_certificate_request()
2541 if (ssl->conf->dn_hints != NULL) { in ssl_write_certificate_request()
2542 crt = ssl->conf->dn_hints; in ssl_write_certificate_request()
2550 crt = ssl->conf->ca_chain; in ssl_write_certificate_request()
2780 int ret = ssl->conf->f_async_resume(ssl, in ssl_resume_server_key_exchange()
2879 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_prepare_server_key_exchange()
2913 if (ssl->conf->dhm_P.p == NULL || ssl->conf->dhm_G.p == NULL) { in ssl_prepare_server_key_exchange()
2928 &ssl->conf->dhm_P, in ssl_prepare_server_key_exchange()
2929 &ssl->conf->dhm_G)) != 0) { in ssl_prepare_server_key_exchange()
2938 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_prepare_server_key_exchange()
3092 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_prepare_server_key_exchange()
3195 if (ssl->conf->f_async_sign_start != NULL) { in ssl_prepare_server_key_exchange()
3196 ret = ssl->conf->f_async_sign_start(ssl, in ssl_prepare_server_key_exchange()
3231 ssl->conf->f_rng, in ssl_prepare_server_key_exchange()
3232 ssl->conf->p_rng)) != 0) { in ssl_prepare_server_key_exchange()
3356 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_write_server_hello_done()
3367 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_server_hello_done()
3428 int ret = ssl->conf->f_async_resume(ssl, in ssl_resume_decrypt_pms()
3490 if (ssl->conf->f_async_decrypt_start != NULL) { in ssl_decrypt_encrypted_pms()
3491 ret = ssl->conf->f_async_decrypt_start(ssl, in ssl_decrypt_encrypted_pms()
3521 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_decrypt_encrypted_pms()
3559 mbedtls_ssl_write_version(ver, ssl->conf->transport, in ssl_parse_encrypted_pms()
3579 ret = ssl->conf->f_rng(ssl->conf->p_rng, fake_pms, sizeof(fake_pms)); in ssl_parse_encrypted_pms()
3616 if (ssl_conf_has_psk_or_cb(ssl->conf) == 0) { in ssl_parse_client_psk_identity()
3637 if (ssl->conf->f_psk != NULL) { in ssl_parse_client_psk_identity()
3638 if (ssl->conf->f_psk(ssl->conf->p_psk, ssl, *p, n) != 0) { in ssl_parse_client_psk_identity()
3644 if (n != ssl->conf->psk_identity_len || in ssl_parse_client_psk_identity()
3645 mbedtls_ct_memcmp(ssl->conf->psk_identity, *p, n) != 0) { in ssl_parse_client_psk_identity()
3720 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_parse_client_key_exchange()
3811 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_parse_client_key_exchange()
3856 p += ssl->conf->psk_identity_len + 2; in ssl_parse_client_key_exchange()
3903 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_parse_client_key_exchange()
4059 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_parse_client_key_exchange()
4289 if ((ret = ssl->conf->f_ticket_write(ssl->conf->p_ticket, in ssl_write_new_session_ticket()
4434 void mbedtls_ssl_conf_preference_order(mbedtls_ssl_config *conf, int order) in mbedtls_ssl_conf_preference_order() argument
4436 conf->respect_cli_pref = order; in mbedtls_ssl_conf_preference_order()