Lines Matching refs:conf

53     if( ssl->conf->endpoint != MBEDTLS_SSL_IS_SERVER )  in mbedtls_ssl_set_client_transport_id()
67 void mbedtls_ssl_conf_dtls_cookies( mbedtls_ssl_config *conf, in mbedtls_ssl_conf_dtls_cookies() argument
72 conf->f_cookie_write = f_cookie_write; in mbedtls_ssl_conf_dtls_cookies()
73 conf->f_cookie_check = f_cookie_check; in mbedtls_ssl_conf_dtls_cookies()
74 conf->p_cookie = p_cookie; in mbedtls_ssl_conf_dtls_cookies()
119 ret = ssl->conf->f_sni( ssl->conf->p_sni, in ssl_parse_servername_ext()
148 static int ssl_conf_has_psk_or_cb( mbedtls_ssl_config const *conf ) in ssl_conf_has_psk_or_cb() argument
150 if( conf->f_psk != NULL ) in ssl_conf_has_psk_or_cb()
153 if( conf->psk_identity_len == 0 || conf->psk_identity == NULL ) in ssl_conf_has_psk_or_cb()
156 if( conf->psk != NULL && conf->psk_len != 0 ) in ssl_conf_has_psk_or_cb()
160 if( ! mbedtls_svc_key_id_is_null( conf->psk_opaque ) ) in ssl_conf_has_psk_or_cb()
170 if( ssl->conf->f_psk != NULL ) in ssl_use_opaque_psk()
181 if( ! mbedtls_svc_key_id_is_null( ssl->conf->psk_opaque ) ) in ssl_use_opaque_psk()
482 if( ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM ) in ssl_parse_cid_ext()
561 if( ssl->conf->encrypt_then_mac == MBEDTLS_SSL_ETM_ENABLED ) in ssl_parse_encrypt_then_mac_ext()
585 if( ssl->conf->extended_ms == MBEDTLS_SSL_EXTENDED_MS_ENABLED ) in ssl_parse_extended_ms_ext()
604 if( ssl->conf->f_ticket_parse == NULL || in ssl_parse_session_ticket_ext()
605 ssl->conf->f_ticket_write == NULL ) in ssl_parse_session_ticket_ext()
629 if( ( ret = ssl->conf->f_ticket_parse( ssl->conf->p_ticket, &session, in ssl_parse_session_ticket_ext()
677 if( ssl->conf->alpn_list == NULL ) in ssl_parse_alpn_ext()
733 for( ours = ssl->conf->alpn_list; *ours != NULL; ours++ ) in ssl_parse_alpn_ext()
769 if( ( ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM ) || in ssl_parse_use_srtp_ext()
770 ( ssl->conf->dtls_srtp_profile_list == NULL ) || in ssl_parse_use_srtp_ext()
771 ( ssl->conf->dtls_srtp_profile_list_len == 0 ) ) in ssl_parse_use_srtp_ext()
834 for( i = 0; i < ssl->conf->dtls_srtp_profile_list_len; i++) in ssl_parse_use_srtp_ext()
836 if( client_protection == ssl->conf->dtls_srtp_profile_list[i] ) in ssl_parse_use_srtp_ext()
838 ssl->dtls_srtp_info.chosen_dtls_srtp_profile = ssl->conf->dtls_srtp_profile_list[i]; in ssl_parse_use_srtp_ext()
861 if( ssl->conf->dtls_srtp_mki_support == MBEDTLS_SSL_DTLS_SRTP_MKI_SUPPORTED && in ssl_parse_use_srtp_ext()
919 list = ssl->conf->key_cert; in ssl_pick_cert()
1038 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_ciphersuite_match()
1069 ssl_conf_has_psk_or_cb( ssl->conf ) == 0 ) in ssl_ciphersuite_match()
1195 mbedtls_ssl_read_version( &major, &minor, ssl->conf->transport, buf + 1 ); in ssl_parse_client_hello()
1210 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM in ssl_parse_client_hello()
1267 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) in ssl_parse_client_hello()
1314 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) in ssl_parse_client_hello()
1395 ssl->conf->transport, buf ); in ssl_parse_client_hello()
1401 if( ssl->major_ver < ssl->conf->min_major_ver || in ssl_parse_client_hello()
1402 ssl->minor_ver < ssl->conf->min_minor_ver ) in ssl_parse_client_hello()
1407 ssl->conf->min_major_ver, ssl->conf->min_minor_ver ) ); in ssl_parse_client_hello()
1413 if( ssl->major_ver > ssl->conf->max_major_ver ) in ssl_parse_client_hello()
1415 ssl->major_ver = ssl->conf->max_major_ver; in ssl_parse_client_hello()
1416 ssl->minor_ver = ssl->conf->max_minor_ver; in ssl_parse_client_hello()
1418 else if( ssl->minor_ver > ssl->conf->max_minor_ver ) in ssl_parse_client_hello()
1419 ssl->minor_ver = ssl->conf->max_minor_ver; in ssl_parse_client_hello()
1454 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) in ssl_parse_client_hello()
1471 if( ssl->conf->f_cookie_check != NULL in ssl_parse_client_hello()
1477 if( ssl->conf->f_cookie_check( ssl->conf->p_cookie, in ssl_parse_client_hello()
1552 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) in ssl_parse_client_hello()
1611 if( ssl->conf->f_sni == NULL ) in ssl_parse_client_hello()
1802 ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE ) in ssl_parse_client_hello()
1817 ssl->conf->allow_legacy_renegotiation == MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION ) in ssl_parse_client_hello()
1844 ciphersuites = ssl->conf->ciphersuite_list; in ssl_parse_client_hello()
1847 if (ssl->conf->respect_cli_pref == MBEDTLS_SSL_SRV_CIPHERSUITE_ORDER_CLIENT) in ssl_parse_client_hello()
1907 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) in ssl_parse_client_hello()
2206 ssl->conf->f_rng, ssl->conf->p_rng ); in ssl_write_ecjpake_kkpp_ext()
2264 if( ( ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM ) || in ssl_write_use_srtp_ext()
2272 if( ssl->conf->dtls_srtp_mki_support == MBEDTLS_SSL_DTLS_SRTP_MKI_SUPPORTED ) in ssl_write_use_srtp_ext()
2341 ssl->conf->transport, p ); in ssl_write_hello_verify_request()
2346 if( ssl->conf->f_cookie_write == NULL ) in ssl_write_hello_verify_request()
2355 if( ( ret = ssl->conf->f_cookie_write( ssl->conf->p_cookie, in ssl_write_hello_verify_request()
2380 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_hello_verify_request()
2406 if( ssl->conf->f_get_cache == NULL ) in ssl_handle_id_based_session_resumption()
2415 ret = ssl->conf->f_get_cache( ssl->conf->p_cache, in ssl_handle_id_based_session_resumption()
2454 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_server_hello()
2464 if( ssl->conf->f_rng == NULL ) in ssl_write_server_hello()
2481 ssl->conf->transport, p ); in ssl_write_server_hello()
2495 if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p, 4 ) ) != 0 ) in ssl_write_server_hello()
2501 if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p, 28 ) ) != 0 ) in ssl_write_server_hello()
2534 if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, ssl->session_negotiate->id, in ssl_write_server_hello()
2696 authmode = ssl->conf->authmode; in ssl_write_certificate_request()
2760 for( cur = ssl->conf->sig_hashes; *cur != MBEDTLS_MD_NONE; cur++ ) in ssl_write_certificate_request()
2791 if( ssl->conf->cert_req_ca_list == MBEDTLS_SSL_CERT_REQ_CA_LIST_ENABLED ) in ssl_write_certificate_request()
2803 crt = ssl->conf->ca_chain; in ssl_write_certificate_request()
2880 int ret = ssl->conf->f_async_resume( ssl, in ssl_resume_server_key_exchange()
2942 ssl->conf->f_rng, ssl->conf->p_rng ); in ssl_prepare_server_key_exchange()
2978 if( ssl->conf->dhm_P.p == NULL || ssl->conf->dhm_G.p == NULL ) in ssl_prepare_server_key_exchange()
2994 &ssl->conf->dhm_P, in ssl_prepare_server_key_exchange()
2995 &ssl->conf->dhm_G ) ) != 0 ) in ssl_prepare_server_key_exchange()
3005 ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) in ssl_prepare_server_key_exchange()
3071 ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) in ssl_prepare_server_key_exchange()
3188 if( ssl->conf->f_async_sign_start != NULL ) in ssl_prepare_server_key_exchange()
3190 ret = ssl->conf->f_async_sign_start( ssl, in ssl_prepare_server_key_exchange()
3227 ssl->conf->f_rng, in ssl_prepare_server_key_exchange()
3228 ssl->conf->p_rng ) ) != 0 ) in ssl_prepare_server_key_exchange()
3353 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) in ssl_write_server_hello_done()
3364 if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && in ssl_write_server_hello_done()
3427 int ret = ssl->conf->f_async_resume( ssl, in ssl_resume_decrypt_pms()
3488 if( ssl->conf->f_async_decrypt_start != NULL ) in ssl_decrypt_encrypted_pms()
3490 ret = ssl->conf->f_async_decrypt_start( ssl, in ssl_decrypt_encrypted_pms()
3522 ssl->conf->f_rng, ssl->conf->p_rng ); in ssl_decrypt_encrypted_pms()
3561 ssl->conf->transport, ver ); in ssl_parse_encrypted_pms()
3592 ret = ssl->conf->f_rng( ssl->conf->p_rng, fake_pms, sizeof( fake_pms ) ); in ssl_parse_encrypted_pms()
3630 if( ssl_conf_has_psk_or_cb( ssl->conf ) == 0 ) in ssl_parse_client_psk_identity()
3654 if( ssl->conf->f_psk != NULL ) in ssl_parse_client_psk_identity()
3656 if( ssl->conf->f_psk( ssl->conf->p_psk, ssl, *p, n ) != 0 ) in ssl_parse_client_psk_identity()
3663 if( n != ssl->conf->psk_identity_len || in ssl_parse_client_psk_identity()
3664 mbedtls_ssl_safer_memcmp( ssl->conf->psk_identity, *p, n ) != 0 ) in ssl_parse_client_psk_identity()
3748 ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) in ssl_parse_client_key_exchange()
3781 ssl->conf->f_rng, ssl->conf->p_rng ) ) != 0 ) in ssl_parse_client_key_exchange()
3838 p += ssl->conf->psk_identity_len + 2; in ssl_parse_client_key_exchange()
3962 ssl->conf->f_rng, ssl->conf->p_rng ); in ssl_parse_client_key_exchange()
4205 if( ( ret = ssl->conf->f_ticket_write( ssl->conf->p_ticket, in ssl_write_new_session_ticket()
4353 void mbedtls_ssl_conf_preference_order( mbedtls_ssl_config *conf, int order ) in mbedtls_ssl_conf_preference_order() argument
4355 conf->respect_cli_pref = order; in mbedtls_ssl_conf_preference_order()