Home
last modified time | relevance | path

Searched refs:conf (Results 1 – 25 of 34) sorted by relevance

12

/mbedtls-3.5.0/tests/suites/
Dtest_suite_debug.function59 mbedtls_ssl_config conf;
63 mbedtls_ssl_config_init(&conf);
67 mbedtls_ssl_config_defaults(&conf,
72 mbedtls_ssl_conf_dbg(&conf, string_debug, &buffer);
74 TEST_ASSERT(mbedtls_ssl_setup(&ssl, &conf) == 0);
85 mbedtls_ssl_config_free(&conf);
94 mbedtls_ssl_config conf;
98 mbedtls_ssl_config_init(&conf);
102 mbedtls_ssl_config_defaults(&conf,
107 mbedtls_ssl_conf_dbg(&conf, string_debug, &buffer);
[all …]
/mbedtls-3.5.0/include/mbedtls/
Dssl.h1600 const mbedtls_ssl_config *MBEDTLS_PRIVATE(conf); /*!< configuration information */
1900 const mbedtls_ssl_config *conf);
1919 void mbedtls_ssl_conf_endpoint(mbedtls_ssl_config *conf, int endpoint);
1935 void mbedtls_ssl_conf_transport(mbedtls_ssl_config *conf, int transport);
1963 void mbedtls_ssl_conf_authmode(mbedtls_ssl_config *conf, int authmode);
1985 void mbedtls_ssl_tls13_conf_early_data(mbedtls_ssl_config *conf,
2013 mbedtls_ssl_config *conf, uint32_t max_early_data_size);
2034 void mbedtls_ssl_conf_verify(mbedtls_ssl_config *conf,
2046 void mbedtls_ssl_conf_rng(mbedtls_ssl_config *conf,
2064 void mbedtls_ssl_conf_dbg(mbedtls_ssl_config *conf,
[all …]
/mbedtls-3.5.0/programs/fuzz/
Dfuzz_client.c43 mbedtls_ssl_config conf; in LLVMFuzzerTestOneInput() local
77 mbedtls_ssl_config_init(&conf); in LLVMFuzzerTestOneInput()
86 if (mbedtls_ssl_config_defaults(&conf, in LLVMFuzzerTestOneInput()
95 mbedtls_ssl_conf_psk(&conf, psk, sizeof(psk), in LLVMFuzzerTestOneInput()
102 mbedtls_ssl_conf_ca_chain(&conf, &cacert, NULL); in LLVMFuzzerTestOneInput()
103 mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_REQUIRED); in LLVMFuzzerTestOneInput()
107 mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_NONE); in LLVMFuzzerTestOneInput()
110 mbedtls_ssl_conf_extended_master_secret(&conf, in LLVMFuzzerTestOneInput()
115 mbedtls_ssl_conf_encrypt_then_mac(&conf, in LLVMFuzzerTestOneInput()
120 mbedtls_ssl_conf_renegotiation(&conf, in LLVMFuzzerTestOneInput()
[all …]
Dfuzz_server.c43 mbedtls_ssl_config conf; in LLVMFuzzerTestOneInput() local
96 mbedtls_ssl_config_init(&conf); in LLVMFuzzerTestOneInput()
101 if (mbedtls_ssl_config_defaults(&conf, in LLVMFuzzerTestOneInput()
109 mbedtls_ssl_conf_rng(&conf, dummy_random, &ctr_drbg); in LLVMFuzzerTestOneInput()
112 mbedtls_ssl_conf_ca_chain(&conf, srvcert.next, NULL); in LLVMFuzzerTestOneInput()
113 if (mbedtls_ssl_conf_own_cert(&conf, &srvcert, &pkey) != 0) { in LLVMFuzzerTestOneInput()
118 mbedtls_ssl_conf_cert_req_ca_list(&conf, in LLVMFuzzerTestOneInput()
123 mbedtls_ssl_conf_alpn_protocols(&conf, alpn_list); in LLVMFuzzerTestOneInput()
135 mbedtls_ssl_conf_session_tickets_cb(&conf, in LLVMFuzzerTestOneInput()
142 mbedtls_ssl_conf_extended_master_secret(&conf, in LLVMFuzzerTestOneInput()
[all …]
Dfuzz_dtlsserver.c44 mbedtls_ssl_config conf; in LLVMFuzzerTestOneInput() local
83 mbedtls_ssl_config_init(&conf); in LLVMFuzzerTestOneInput()
86 if (mbedtls_ssl_config_defaults(&conf, in LLVMFuzzerTestOneInput()
95 mbedtls_ssl_conf_rng(&conf, dummy_random, &ctr_drbg); in LLVMFuzzerTestOneInput()
98 mbedtls_ssl_conf_ca_chain(&conf, srvcert.next, NULL); in LLVMFuzzerTestOneInput()
99 if (mbedtls_ssl_conf_own_cert(&conf, &srvcert, &pkey) != 0) { in LLVMFuzzerTestOneInput()
108 mbedtls_ssl_conf_dtls_cookies(&conf, in LLVMFuzzerTestOneInput()
113 if (mbedtls_ssl_setup(&ssl, &conf) != 0) { in LLVMFuzzerTestOneInput()
159 mbedtls_ssl_config_free(&conf); in LLVMFuzzerTestOneInput()
Dfuzz_dtlsclient.c39 mbedtls_ssl_config conf; in LLVMFuzzerTestOneInput() local
60 mbedtls_ssl_config_init(&conf); in LLVMFuzzerTestOneInput()
70 if (mbedtls_ssl_config_defaults(&conf, in LLVMFuzzerTestOneInput()
78 mbedtls_ssl_conf_ca_chain(&conf, &cacert, NULL); in LLVMFuzzerTestOneInput()
80 mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_NONE); in LLVMFuzzerTestOneInput()
81 mbedtls_ssl_conf_rng(&conf, dummy_random, &ctr_drbg); in LLVMFuzzerTestOneInput()
83 if (mbedtls_ssl_setup(&ssl, &conf) != 0) { in LLVMFuzzerTestOneInput()
120 mbedtls_ssl_config_free(&conf); in LLVMFuzzerTestOneInput()
/mbedtls-3.5.0/library/
Dssl_tls.c91 int mbedtls_ssl_conf_cid(mbedtls_ssl_config *conf, in mbedtls_ssl_conf_cid() argument
104 conf->ignore_unexpected_cid = ignore_other_cid; in mbedtls_ssl_conf_cid()
105 conf->cid_len = len; in mbedtls_ssl_conf_cid()
114 if (ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in mbedtls_ssl_set_cid()
126 if (own_cid_len != ssl->conf->cid_len) { in mbedtls_ssl_set_cid()
129 (unsigned) ssl->conf->cid_len)); in mbedtls_ssl_set_cid()
148 if (ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in mbedtls_ssl_get_own_cid()
178 if (ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM || in mbedtls_ssl_get_peer_cid()
1130 ssl->conf->new_session_tickets_count; in ssl_handshake_init()
1134 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_handshake_init()
[all …]
Dssl_tls12_server.c56 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()
[all …]
Dssl_tls12_client.c184 ssl->conf->f_rng, ssl->conf->p_rng); in ssl_write_ecjpake_kkpp_ext()
235 if (ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM || in ssl_write_cid_ext()
272 if (ssl->conf->mfl_code == MBEDTLS_SSL_MAX_FRAG_LEN_NONE) { in ssl_write_max_fragment_length_ext()
287 *p++ = ssl->conf->mfl_code; in ssl_write_max_fragment_length_ext()
306 if (ssl->conf->encrypt_then_mac == MBEDTLS_SSL_ETM_DISABLED) { in ssl_write_encrypt_then_mac_ext()
338 if (ssl->conf->extended_ms == MBEDTLS_SSL_EXTENDED_MS_DISABLED) { in ssl_write_extended_ms_ext()
371 if (ssl->conf->session_tickets == MBEDTLS_SSL_SESSION_TICKETS_DISABLED) { in ssl_write_session_ticket_ext()
417 if ((ssl->conf->transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) || in ssl_write_use_srtp_ext()
418 (ssl->conf->dtls_srtp_profile_list == NULL) || in ssl_write_use_srtp_ext()
419 (ssl->conf->dtls_srtp_profile_list_len == 0)) { in ssl_write_use_srtp_ext()
[all …]
Ddebug.c57 ssl->conf->f_dbg(ssl->conf->p_dbg, level, file, line, idstr); in debug_send_line()
59 ssl->conf->f_dbg(ssl->conf->p_dbg, level, file, line, str); in debug_send_line()
73 NULL == ssl->conf || in mbedtls_debug_print_msg()
74 NULL == ssl->conf->f_dbg || in mbedtls_debug_print_msg()
98 NULL == ssl->conf || in mbedtls_debug_print_ret()
99 NULL == ssl->conf->f_dbg || in mbedtls_debug_print_ret()
128 NULL == ssl->conf || in mbedtls_debug_print_buf()
129 NULL == ssl->conf->f_dbg || in mbedtls_debug_print_buf()
183 NULL == ssl->conf || in mbedtls_debug_print_ecp()
184 NULL == ssl->conf->f_dbg || in mbedtls_debug_print_ecp()
[all …]
Dssl_misc.h1495 int mbedtls_ssl_conf_has_static_psk(mbedtls_ssl_config const *conf);
1512 if (!mbedtls_svc_key_id_is_null(ssl->conf->psk_opaque)) { in mbedtls_ssl_get_opaque_psk()
1513 return ssl->conf->psk_opaque; in mbedtls_ssl_get_opaque_psk()
1531 } else if (ssl->conf->psk != NULL && ssl->conf->psk_len > 0) { in mbedtls_ssl_get_psk()
1532 *psk = ssl->conf->psk; in mbedtls_ssl_get_psk()
1533 *psk_len = ssl->conf->psk_len; in mbedtls_ssl_get_psk()
1640 key_cert = ssl->conf->key_cert; in mbedtls_ssl_own_key()
1653 key_cert = ssl->conf->key_cert; in mbedtls_ssl_own_cert()
1687 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in mbedtls_ssl_in_hdr_len()
1704 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in mbedtls_ssl_hs_hdr_len()
[all …]
Dssl_client.c137 if (ssl->conf->alpn_list == NULL) { in ssl_write_alpn_ext()
159 for (const char **cur = ssl->conf->alpn_list; *cur != NULL; cur++) { in ssl_write_alpn_ext()
261 if ((mbedtls_ssl_conf_is_tls13_enabled(ssl->conf) && in ssl_write_supported_groups_ext()
263 (mbedtls_ssl_conf_is_tls12_enabled(ssl->conf) && in ssl_write_supported_groups_ext()
335 ciphersuite_list = ssl->conf->ciphersuite_list; in ssl_write_client_hello_cipher_suites()
466 mbedtls_ssl_write_version(p, ssl->conf->transport, in ssl_write_client_hello_body()
514 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in ssl_write_client_hello_body()
715 ret = ssl->conf->f_rng(ssl->conf->p_rng, in ssl_generate_random()
754 if (ssl->conf->f_rng == NULL) { in ssl_prepare_client_hello()
772 ssl->tls_version = ssl->conf->max_tls_version; in ssl_prepare_client_hello()
[all …]
Dssl_msg.c107 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_STREAM) { in mbedtls_ssl_check_record()
263 if (ssl->handshake->retransmit_timeout >= ssl->conf->hs_timeout_max) { in ssl_double_retransmit_timeout()
273 if (ssl->handshake->retransmit_timeout != ssl->conf->hs_timeout_min) { in ssl_double_retransmit_timeout()
282 new_timeout > ssl->conf->hs_timeout_max) { in ssl_double_retransmit_timeout()
283 new_timeout = ssl->conf->hs_timeout_max; in ssl_double_retransmit_timeout()
295 ssl->handshake->retransmit_timeout = ssl->conf->hs_timeout_min; in ssl_reset_retransmit_timeout()
1939 if (ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) { in mbedtls_ssl_fetch_input()
2008 timeout = ssl->conf->read_timeout; in mbedtls_ssl_fetch_input()
2045 else if (ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER && in mbedtls_ssl_fetch_input()
2079 ssl->conf->read_timeout); in mbedtls_ssl_fetch_input()
[all …]
/mbedtls-3.5.0/tests/scripts/
Ddepends.py134 def option_exists(conf, option): argument
135 return option in conf.settings
137 def set_config_option_value(conf, option, colors, value: Union[bool, str]): argument
141 if not option_exists(conf, option):
142 log_line('Symbol {} was not found in {}'.format(option, conf.filename), color=colors.red)
147 conf.unset(option)
150 conf.set(option)
153 conf.set(option, value)
156 def set_reference_config(conf, options, colors): argument
162 conf.adapt(config.full_adapter)
[all …]
Dtest-ref-configs.pl159 foreach my $conf ( @configs_to_test ) {
160 my $test_with_psa = $configs{$conf}{'test_again_with_use_psa'};
163 perform_test( $conf, $configs{$conf}, $test_with_psa );
165 perform_test( $conf, $configs{$conf}, 0 );
/mbedtls-3.5.0/programs/ssl/
Dmini_client.c166 mbedtls_ssl_config conf; in main() local
174 mbedtls_ssl_config_init(&conf); in main()
186 if (mbedtls_ssl_config_defaults(&conf, in main()
194 mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg); in main()
197 mbedtls_ssl_conf_psk(&conf, psk, sizeof(psk), in main()
207 mbedtls_ssl_conf_ca_chain(&conf, &ca, NULL); in main()
208 mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_REQUIRED); in main()
211 if (mbedtls_ssl_setup(&ssl, &conf) != 0) { in main()
267 mbedtls_ssl_config_free(&conf); in main()
Ddtls_server.c101 mbedtls_ssl_config conf; in main() local
112 mbedtls_ssl_config_init(&conf); in main()
199 if ((ret = mbedtls_ssl_config_defaults(&conf, in main()
207 mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg); in main()
208 mbedtls_ssl_conf_dbg(&conf, my_debug, stdout); in main()
209 mbedtls_ssl_conf_read_timeout(&conf, READ_TIMEOUT_MS); in main()
212 mbedtls_ssl_conf_session_cache(&conf, &cache, in main()
217 mbedtls_ssl_conf_ca_chain(&conf, srvcert.next, NULL); in main()
218 if ((ret = mbedtls_ssl_conf_own_cert(&conf, &srvcert, &pkey)) != 0) { in main()
229 mbedtls_ssl_conf_dtls_cookies(&conf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check, in main()
[all …]
Ddtls_client.c93 mbedtls_ssl_config conf; in main() local
109 mbedtls_ssl_config_init(&conf); in main()
162 if ((ret = mbedtls_ssl_config_defaults(&conf, in main()
173 mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_OPTIONAL); in main()
174 mbedtls_ssl_conf_ca_chain(&conf, &cacert, NULL); in main()
175 mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg); in main()
176 mbedtls_ssl_conf_dbg(&conf, my_debug, stdout); in main()
177 mbedtls_ssl_conf_read_timeout(&conf, READ_TIMEOUT_MS); in main()
179 if ((ret = mbedtls_ssl_setup(&ssl, &conf)) != 0) { in main()
330 mbedtls_ssl_config_free(&conf); in main()
Dssl_server.c88 mbedtls_ssl_config conf; in main() local
98 mbedtls_ssl_config_init(&conf); in main()
180 if ((ret = mbedtls_ssl_config_defaults(&conf, in main()
188 mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg); in main()
189 mbedtls_ssl_conf_dbg(&conf, my_debug, stdout); in main()
192 mbedtls_ssl_conf_session_cache(&conf, &cache, in main()
197 mbedtls_ssl_conf_ca_chain(&conf, srvcert.next, NULL); in main()
198 if ((ret = mbedtls_ssl_conf_own_cert(&conf, &srvcert, &pkey)) != 0) { in main()
203 if ((ret = mbedtls_ssl_setup(&ssl, &conf)) != 0) { in main()
350 mbedtls_ssl_config_free(&conf); in main()
Dssl_client1.c79 mbedtls_ssl_config conf; in main() local
91 mbedtls_ssl_config_init(&conf); in main()
144 if ((ret = mbedtls_ssl_config_defaults(&conf, in main()
156 mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_OPTIONAL); in main()
157 mbedtls_ssl_conf_ca_chain(&conf, &cacert, NULL); in main()
158 mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg); in main()
159 mbedtls_ssl_conf_dbg(&conf, my_debug, stdout); in main()
161 if ((ret = mbedtls_ssl_setup(&ssl, &conf)) != 0) { in main()
280 mbedtls_ssl_config_free(&conf); in main()
Dssl_fork_server.c95 mbedtls_ssl_config conf; in main() local
102 mbedtls_ssl_config_init(&conf); in main()
166 if ((ret = mbedtls_ssl_config_defaults(&conf, in main()
174 mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg); in main()
175 mbedtls_ssl_conf_dbg(&conf, my_debug, stdout); in main()
177 mbedtls_ssl_conf_ca_chain(&conf, srvcert.next, NULL); in main()
178 if ((ret = mbedtls_ssl_conf_own_cert(&conf, &srvcert, &pkey)) != 0) { in main()
261 if ((ret = mbedtls_ssl_setup(&ssl, &conf)) != 0) { in main()
373 mbedtls_ssl_config_free(&conf); in main()
Dssl_pthread_server.c298 mbedtls_ssl_config conf; in main() local
320 mbedtls_ssl_config_init(&conf); in main()
328 base_info.config = &conf; in main()
391 if ((ret = mbedtls_ssl_config_defaults(&conf, in main()
400 mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg); in main()
401 mbedtls_ssl_conf_dbg(&conf, my_mutexed_debug, stdout); in main()
407 mbedtls_ssl_conf_session_cache(&conf, &cache, in main()
412 mbedtls_ssl_conf_ca_chain(&conf, &cachain, NULL); in main()
413 if ((ret = mbedtls_ssl_conf_own_cert(&conf, &srvcert, &pkey)) != 0) { in main()
475 mbedtls_ssl_config_free(&conf); in main()
Dssl_server2.c1162 mbedtls_ssl_conf_get_async_config_data(ssl->conf); in ssl_async_start()
1250 mbedtls_ssl_conf_get_async_config_data(ssl->conf); in ssl_async_resume()
1490 mbedtls_ssl_config conf; in main() local
1599 mbedtls_ssl_config_init(&conf); in main()
2768 if ((ret = mbedtls_ssl_config_defaults(&conf, in main()
2783 mbedtls_ssl_conf_cert_profile(&conf, &crt_profile_for_test); in main()
2784 mbedtls_ssl_conf_sig_algs(&conf, ssl_sig_algs_for_test); in main()
2789 mbedtls_ssl_conf_authmode(&conf, opt.auth_mode); in main()
2793 mbedtls_ssl_conf_cert_req_ca_list(&conf, opt.cert_req_ca_list); in main()
2797 mbedtls_ssl_tls13_conf_early_data(&conf, tls13_early_data_enabled); in main()
[all …]
/mbedtls-3.5.0/tests/src/test_helpers/
Dssl_helpers.c646 if (ep->conf.endpoint == MBEDTLS_SSL_IS_SERVER) { in mbedtls_test_ssl_endpoint_certificate_init()
716 mbedtls_ssl_conf_ca_chain(&(ep->conf), cert->ca_cert, NULL); in mbedtls_test_ssl_endpoint_certificate_init()
718 ret = mbedtls_ssl_conf_own_cert(&(ep->conf), cert->cert, in mbedtls_test_ssl_endpoint_certificate_init()
721 TEST_ASSERT(ep->conf.key_cert != NULL); in mbedtls_test_ssl_endpoint_certificate_init()
723 ret = mbedtls_ssl_conf_own_cert(&(ep->conf), NULL, NULL); in mbedtls_test_ssl_endpoint_certificate_init()
725 TEST_ASSERT(ep->conf.key_cert == NULL); in mbedtls_test_ssl_endpoint_certificate_init()
727 ret = mbedtls_ssl_conf_own_cert(&(ep->conf), cert->cert, in mbedtls_test_ssl_endpoint_certificate_init()
765 mbedtls_ssl_config_init(&(ep->conf)); in mbedtls_test_ssl_endpoint_init()
766 mbedtls_ssl_conf_rng(&(ep->conf), rng_get, NULL); in mbedtls_test_ssl_endpoint_init()
768 TEST_ASSERT(mbedtls_ssl_conf_get_user_data_p(&ep->conf) == NULL); in mbedtls_test_ssl_endpoint_init()
[all …]
/mbedtls-3.5.0/programs/x509/
Dcert_app.c139 mbedtls_ssl_config conf; in main() local
154 mbedtls_ssl_config_init(&conf); in main()
371 if ((ret = mbedtls_ssl_config_defaults(&conf, in main()
380 mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_REQUIRED); in main()
381 mbedtls_ssl_conf_ca_chain(&conf, &cacert, NULL); in main()
382 mbedtls_ssl_conf_verify(&conf, my_verify, NULL); in main()
384 mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_NONE); in main()
387 mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg); in main()
388 mbedtls_ssl_conf_dbg(&conf, my_debug, stdout); in main()
390 if ((ret = mbedtls_ssl_setup(&ssl, &conf)) != 0) { in main()
[all …]

12