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()
1062 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_client_hello()
1142 … ssl->conf->transport); in ssl_parse_client_hello()
1144 ssl->session_negotiate->endpoint = ssl->conf->endpoint; in ssl_parse_client_hello()
1185 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_client_hello()
1200 if (ssl->conf->f_cookie_check != NULL in ssl_parse_client_hello()
1205 if (ssl->conf->f_cookie_check(ssl->conf->p_cookie, in ssl_parse_client_hello()
1529 ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE) { in ssl_parse_client_hello()
1541 ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION) { in ssl_parse_client_hello()
1561 if (ssl->conf->f_cert_cb && (ret = ssl->conf->f_cert_cb(ssl)) != 0) { in ssl_parse_client_hello()
1577 ciphersuites = ssl->conf->ciphersuite_list; in ssl_parse_client_hello()
1580 if (ssl->conf->respect_cli_pref == MBEDTLS_SSL_SRV_CIPHERSUITE_ORDER_CLIENT) { in ssl_parse_client_hello()
1642 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_parse_client_hello()
1943 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_write_ecjpake_kkpp_ext()
1968 if ((ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) || in ssl_write_use_srtp_ext()
1975 if (ssl->conf->dtls_srtp_mki_support == MBEDTLS_SSL_DTLS_SRTP_MKI_SUPPORTED) { in ssl_write_use_srtp_ext()
2039 mbedtls_ssl_write_version(p, ssl->conf->transport, ssl->tls_version); in ssl_write_hello_verify_request()
2044 if (ssl->conf->f_cookie_write == NULL) { in ssl_write_hello_verify_request()
2052 if ((ret = ssl->conf->f_cookie_write(ssl->conf->p_cookie, in ssl_write_hello_verify_request()
2075 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_hello_verify_request()
2102 if (ssl->conf->f_get_cache == NULL) { in ssl_handle_id_based_session_resumption()
2113 ret = ssl->conf->f_get_cache(ssl->conf->p_cache, in ssl_handle_id_based_session_resumption()
2152 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_server_hello()
2171 mbedtls_ssl_write_version(p, ssl->conf->transport, ssl->tls_version); in ssl_write_server_hello()
2185 if ((ret = ssl->conf->f_rng(ssl->conf->p_rng, p, 4)) != 0) { in ssl_write_server_hello()
2192 if ((ret = ssl->conf->f_rng(ssl->conf->p_rng, p, 20)) != 0) { in ssl_write_server_hello()
2205 if (mbedtls_ssl_conf_is_tls13_enabled(ssl->conf)) { in ssl_write_server_hello()
2218 if ((ret = ssl->conf->f_rng(ssl->conf->p_rng, p, 8)) != 0) { in ssl_write_server_hello()
2249 if ((ret = ssl->conf->f_rng(ssl->conf->p_rng, ssl->session_negotiate->id, in ssl_write_server_hello()
2415 authmode = ssl->conf->authmode; in ssl_write_certificate_request()
2507 if (ssl->conf->cert_req_ca_list == MBEDTLS_SSL_CERT_REQ_CA_LIST_ENABLED) { in ssl_write_certificate_request()
2519 if (ssl->conf->dn_hints != NULL) { in ssl_write_certificate_request()
2520 crt = ssl->conf->dn_hints; in ssl_write_certificate_request()
2528 crt = ssl->conf->ca_chain; in ssl_write_certificate_request()
2758 int ret = ssl->conf->f_async_resume(ssl, in ssl_resume_server_key_exchange()
2857 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_prepare_server_key_exchange()
2891 if (ssl->conf->dhm_P.p == NULL || ssl->conf->dhm_G.p == NULL) { in ssl_prepare_server_key_exchange()
2906 &ssl->conf->dhm_P, in ssl_prepare_server_key_exchange()
2907 &ssl->conf->dhm_G)) != 0) { in ssl_prepare_server_key_exchange()
2916 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_prepare_server_key_exchange()
3070 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_prepare_server_key_exchange()
3173 if (ssl->conf->f_async_sign_start != NULL) { in ssl_prepare_server_key_exchange()
3174 ret = ssl->conf->f_async_sign_start(ssl, in ssl_prepare_server_key_exchange()
3209 ssl->conf->f_rng, in ssl_prepare_server_key_exchange()
3210 ssl->conf->p_rng)) != 0) { in ssl_prepare_server_key_exchange()
3334 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_write_server_hello_done()
3345 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_server_hello_done()
3406 int ret = ssl->conf->f_async_resume(ssl, in ssl_resume_decrypt_pms()
3468 if (ssl->conf->f_async_decrypt_start != NULL) { in ssl_decrypt_encrypted_pms()
3469 ret = ssl->conf->f_async_decrypt_start(ssl, in ssl_decrypt_encrypted_pms()
3499 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_decrypt_encrypted_pms()
3537 mbedtls_ssl_write_version(ver, ssl->conf->transport, in ssl_parse_encrypted_pms()
3557 ret = ssl->conf->f_rng(ssl->conf->p_rng, fake_pms, sizeof(fake_pms)); in ssl_parse_encrypted_pms()
3594 if (ssl_conf_has_psk_or_cb(ssl->conf) == 0) { in ssl_parse_client_psk_identity()
3615 if (ssl->conf->f_psk != NULL) { in ssl_parse_client_psk_identity()
3616 if (ssl->conf->f_psk(ssl->conf->p_psk, ssl, *p, n) != 0) { in ssl_parse_client_psk_identity()
3622 if (n != ssl->conf->psk_identity_len || in ssl_parse_client_psk_identity()
3623 mbedtls_ct_memcmp(ssl->conf->psk_identity, *p, n) != 0) { in ssl_parse_client_psk_identity()
3698 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_parse_client_key_exchange()
3789 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_parse_client_key_exchange()
3834 p += ssl->conf->psk_identity_len + 2; in ssl_parse_client_key_exchange()
3881 ssl->conf->f_rng, ssl->conf->p_rng)) != 0) { in ssl_parse_client_key_exchange()
4037 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_parse_client_key_exchange()
4267 if ((ret = ssl->conf->f_ticket_write(ssl->conf->p_ticket, in ssl_write_new_session_ticket()
4412 void mbedtls_ssl_conf_preference_order(mbedtls_ssl_config *conf, int order) in mbedtls_ssl_conf_preference_order() argument
4414 conf->respect_cli_pref = order; in mbedtls_ssl_conf_preference_order()