Lines Matching refs:cctx

350     SSL_CTX *cctx = NULL, *sctx = NULL;  in test_keylog()  local
366 &sctx, &cctx, cert, privkey))) in test_keylog()
370 SSL_CTX_set_options(cctx, SSL_OP_NO_TLSv1_3); in test_keylog()
374 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "RSA"))) in test_keylog()
377 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL) in test_keylog()
380 SSL_CTX_set_keylog_callback(cctx, client_keylog_callback); in test_keylog()
381 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) in test_keylog()
390 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog()
422 SSL_CTX_free(cctx); in test_keylog()
431 SSL_CTX *cctx = NULL, *sctx = NULL; in test_keylog_no_master_key() local
449 &sctx, &cctx, cert, privkey)) in test_keylog_no_master_key()
454 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL) in test_keylog_no_master_key()
458 SSL_CTX_set_keylog_callback(cctx, client_keylog_callback); in test_keylog_no_master_key()
459 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) in test_keylog_no_master_key()
469 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog_no_master_key()
507 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog_no_master_key()
539 SSL_CTX_free(cctx); in test_keylog_no_master_key()
574 SSL_CTX *cctx = NULL, *sctx = NULL; in test_client_cert_verify_cb() local
580 &sctx, &cctx, NULL, NULL))) in test_client_cert_verify_cb()
587 if (!TEST_true(SSL_CTX_load_verify_locations(cctx, root, NULL))) in test_client_cert_verify_cb()
589 SSL_CTX_set_verify(cctx, SSL_VERIFY_PEER, NULL); in test_client_cert_verify_cb()
590 SSL_CTX_set_cert_verify_callback(cctx, verify_retry_cb, NULL); in test_client_cert_verify_cb()
591 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_client_cert_verify_cb()
632 SSL_CTX_free(cctx); in test_client_cert_verify_cb()
754 SSL_CTX *cctx = NULL, *sctx = NULL; in test_client_hello_cb() local
760 &sctx, &cctx, cert, privkey))) in test_client_hello_cb()
765 SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION); in test_client_hello_cb()
767 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_client_hello_cb()
769 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_client_hello_cb()
789 SSL_CTX_free(cctx); in test_client_hello_cb()
796 SSL_CTX *cctx = NULL, *sctx = NULL; in test_no_ems() local
802 &sctx, &cctx, cert, privkey)) { in test_no_ems()
809 if (!create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, NULL)) { in test_no_ems()
834 SSL_CTX_free(cctx); in test_no_ems()
847 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ccs_change_cipher() local
862 &sctx, &cctx, cert, privkey)) in test_ccs_change_cipher()
864 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
878 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
898 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
944 SSL_CTX_free(cctx); in test_ccs_change_cipher()
1001 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_large_message() local
1006 max_version, &sctx, &cctx, cert, in execute_test_large_message()
1017 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in execute_test_large_message()
1028 SSL_CTX_set_read_ahead(cctx, 1); in execute_test_large_message()
1034 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in execute_test_large_message()
1052 SSL_CTX_free(cctx); in execute_test_large_message()
1167 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_ktls() local
1191 &sctx, &cctx, cert, privkey))) in execute_test_ktls()
1195 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, cipher)) in execute_test_ktls()
1199 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipher)) in execute_test_ktls()
1204 if (!TEST_true(create_ssl_objects2(sctx, cctx, &serverssl, in execute_test_ktls()
1284 SSL_CTX_free(cctx); in execute_test_ktls()
1299 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_ktls_sendfile() local
1330 &sctx, &cctx, cert, privkey))) in execute_test_ktls_sendfile()
1334 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, cipher)) in execute_test_ktls_sendfile()
1338 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipher)) in execute_test_ktls_sendfile()
1343 if (!TEST_true(create_ssl_objects2(sctx, cctx, &serverssl, in execute_test_ktls_sendfile()
1415 SSL_CTX_free(cctx); in execute_test_ktls_sendfile()
1533 SSL_CTX *cctx = NULL, *sctx = NULL; in test_large_app_data() local
1622 &sctx, &cctx, cert, privkey))) in test_large_app_data()
1627 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "DEFAULT:@SECLEVEL=0")) in test_large_app_data()
1633 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_large_app_data()
1680 SSL_CTX_free(cctx); in test_large_app_data()
1691 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_cleanse_plaintext() local
1703 &sctx, &cctx, cert, in execute_cleanse_plaintext()
1719 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in execute_cleanse_plaintext()
1725 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in execute_cleanse_plaintext()
1783 SSL_CTX_free(cctx); in execute_cleanse_plaintext()
1874 SSL_CTX *cctx = NULL, *sctx = NULL; in test_tlsext_status_type() local
1883 &sctx, &cctx, cert, privkey)) in test_tlsext_status_type()
1886 if (SSL_CTX_get_tlsext_status_type(cctx) != -1) in test_tlsext_status_type()
1891 clientssl = SSL_new(cctx); in test_tlsext_status_type()
1902 if (!SSL_CTX_set_tlsext_status_type(cctx, TLSEXT_STATUSTYPE_ocsp) in test_tlsext_status_type()
1903 || SSL_CTX_get_tlsext_status_type(cctx) != TLSEXT_STATUSTYPE_ocsp) in test_tlsext_status_type()
1906 clientssl = SSL_new(cctx); in test_tlsext_status_type()
1916 SSL_CTX_set_tlsext_status_cb(cctx, ocsp_client_cb); in test_tlsext_status_type()
1917 SSL_CTX_set_tlsext_status_arg(cctx, &cdummyarg); in test_tlsext_status_type()
1920 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1936 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1956 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1992 SSL_CTX_free(cctx); in test_tlsext_status_type()
2035 SSL_CTX *sctx = NULL, *cctx = NULL; in execute_test_session() local
2052 &sctx, &cctx, cert, privkey))) in execute_test_session()
2059 SSL_CTX_set_min_proto_version(cctx, maxprot); in execute_test_session()
2060 SSL_CTX_set_max_proto_version(cctx, maxprot); in execute_test_session()
2064 SSL_CTX_sess_set_new_cb(cctx, new_session_cb); in execute_test_session()
2065 SSL_CTX_sess_set_remove_cb(cctx, remove_session_cb); in execute_test_session()
2069 SSL_CTX_set_session_cache_mode(cctx, SSL_SESS_CACHE_CLIENT); in execute_test_session()
2071 SSL_CTX_set_session_cache_mode(cctx, in execute_test_session()
2080 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl1, &clientssl1, in execute_test_session()
2088 if (use_int_cache && !TEST_false(SSL_CTX_add_session(cctx, sess1))) in execute_test_session()
2097 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
2133 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
2162 if (!TEST_true(SSL_CTX_add_session(cctx, sess2)) in execute_test_session()
2163 || !TEST_true(SSL_CTX_remove_session(cctx, sess2))) in execute_test_session()
2169 if (!TEST_false(SSL_CTX_remove_session(cctx, sess2))) in execute_test_session()
2180 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl3, in execute_test_session()
2194 if (use_int_cache && !TEST_true(SSL_CTX_add_session(cctx, sess2))) in execute_test_session()
2200 SSL_CTX_sess_set_new_cb(cctx, NULL); in execute_test_session()
2201 SSL_CTX_sess_set_remove_cb(cctx, NULL); in execute_test_session()
2208 SSL_CTX_set_session_cache_mode(cctx, 0); in execute_test_session()
2230 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl1, &clientssl1, in execute_test_session()
2280 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
2343 SSL_CTX_free(cctx); in execute_test_session()
2440 SSL_CTX **cctx) in setup_ticket_test() argument
2446 sctx, cctx, cert, privkey)) in setup_ticket_test()
2456 SSL_CTX_set_session_cache_mode(*cctx, SSL_SESS_CACHE_CLIENT in setup_ticket_test()
2458 SSL_CTX_sess_set_new_cb(*cctx, new_cachesession_cb); in setup_ticket_test()
2463 static int check_resumption(int idx, SSL_CTX *sctx, SSL_CTX *cctx, int succ) in check_resumption() argument
2471 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in check_resumption()
2522 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tickets() local
2532 if (!setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_tickets()
2535 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tickets()
2550 SSL_CTX_free(cctx); in test_tickets()
2552 sctx = cctx = NULL; in test_tickets()
2563 if (!setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_tickets()
2566 if (!check_resumption(idx, sctx, cctx, 0)) in test_tickets()
2573 SSL_CTX_free(cctx); in test_tickets()
2574 sctx = cctx = NULL; in test_tickets()
2576 if (!setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_tickets()
2579 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tickets()
2609 if (!check_resumption(idx, sctx, cctx, 1)) in test_tickets()
2622 SSL_CTX_free(cctx); in test_tickets()
2639 SSL_CTX *sctx = NULL, *cctx = NULL; in test_psk_tickets() local
2646 &sctx, &cctx, NULL, NULL)) in test_psk_tickets()
2652 SSL_CTX_set_session_cache_mode(cctx, SSL_SESS_CACHE_CLIENT in test_psk_tickets()
2654 SSL_CTX_set_psk_use_session_callback(cctx, use_session_cb); in test_psk_tickets()
2656 SSL_CTX_sess_set_new_cb(cctx, new_session_cb); in test_psk_tickets()
2662 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_psk_tickets()
2684 SSL_CTX_free(cctx); in test_psk_tickets()
2694 SSL_CTX *sctx = NULL, *cctx = NULL; in test_extra_tickets() local
2711 if (!TEST_ptr(bretry) || !setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_extra_tickets()
2715 SSL_CTX_sess_set_new_cb(cctx, new_session_cb); in test_extra_tickets()
2717 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_extra_tickets()
2848 SSL_CTX_free(cctx); in test_extra_tickets()
2850 sctx = cctx = NULL; in test_extra_tickets()
2905 SSL_CTX *sctx = NULL, *cctx = NULL; in test_ssl_set_bio() local
2934 &sctx, &cctx, cert, privkey))) in test_ssl_set_bio()
2945 SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION); in test_ssl_set_bio()
2948 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_set_bio()
3023 SSL_CTX_free(cctx); in test_ssl_set_bio()
3143 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_sigalgs() local
3159 &sctx, &cctx, cert, privkey))) in test_set_sigalgs()
3162 SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION); in test_set_sigalgs()
3168 ret = SSL_CTX_set1_sigalgs(cctx, curr->list, curr->listlen); in test_set_sigalgs()
3170 ret = SSL_CTX_set1_sigalgs_list(cctx, curr->liststr); in test_set_sigalgs()
3185 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_set_sigalgs()
3218 SSL_CTX_free(cctx); in test_set_sigalgs()
3401 static int setupearly_data_test(SSL_CTX **cctx, SSL_CTX **sctx, SSL **clientssl, in setupearly_data_test() argument
3409 sctx, cctx, cert, privkey))) in setupearly_data_test()
3417 SSL_CTX_set_read_ahead(*cctx, 1); in setupearly_data_test()
3421 SSL_CTX_set_psk_use_session_callback(*cctx, use_session_cb); in setupearly_data_test()
3428 if (!TEST_true(create_ssl_objects(*sctx, *cctx, serverssl, clientssl, in setupearly_data_test()
3484 if (!TEST_true(create_ssl_objects(*sctx, *cctx, serverssl, in setupearly_data_test()
3513 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_read_write() local
3522 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_read_write()
3676 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_early_data_read_write()
3723 SSL_CTX_free(cctx); in test_early_data_read_write()
3752 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_replay_int() local
3764 &sctx, &cctx, cert, privkey))) in test_early_data_replay_int()
3788 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_replay_int()
3807 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_early_data_replay_int()
3868 SSL_CTX_free(cctx); in test_early_data_replay_int()
3904 SSL_CTX *cctx = NULL, *sctx = NULL; in early_data_skip_helper() local
3917 &sctx, &cctx, cert, privkey))) in early_data_skip_helper()
3922 SSL_CTX_set_security_level(cctx, 0); in early_data_skip_helper()
3926 || !TEST_true(SSL_CTX_set_ciphersuites(cctx, ciphersuites[cipher]))) in early_data_skip_helper()
3929 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in early_data_skip_helper()
4072 SSL_CTX_free(cctx); in early_data_skip_helper()
4127 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_not_sent() local
4134 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_not_sent()
4178 SSL_CTX_free(cctx); in test_early_data_not_sent()
4210 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_psk() local
4229 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_psk()
4384 SSL_CTX_free(cctx); in test_early_data_psk()
4398 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_psk_with_all_ciphers() local
4436 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_psk_with_all_ciphers()
4498 SSL_CTX_free(cctx); in test_early_data_psk_with_all_ciphers()
4508 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_not_expected() local
4515 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_not_expected()
4557 SSL_CTX_free(cctx); in test_early_data_not_expected()
4569 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_tls1_2() local
4575 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_tls1_2()
4631 SSL_CTX_free(cctx); in test_early_data_tls1_2()
4653 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_ciphersuite() local
4659 &sctx, &cctx, cert, privkey)) in test_set_ciphersuite()
4666 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "AES256-GCM-SHA384"))) in test_set_ciphersuite()
4672 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_set_ciphersuite()
4677 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_set_ciphersuite()
4682 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_set_ciphersuite()
4713 SSL_CTX_free(cctx); in test_set_ciphersuite()
4720 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ciphersuite_change() local
4729 &sctx, &cctx, cert, privkey)) in test_ciphersuite_change()
4734 || !TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
4736 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
4752 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
4754 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
4774 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, "TLS_AES_256_GCM_SHA384")) in test_ciphersuite_change()
4775 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
4792 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, "TLS_AES_256_GCM_SHA384")) in test_ciphersuite_change()
4793 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
4806 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
4810 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
4844 SSL_CTX_free(cctx); in test_ciphersuite_change()
4876 SSL_CTX *sctx = NULL, *cctx = NULL; in test_key_exchange() local
4962 max_version, &sctx, &cctx, cert, in test_key_exchange()
4970 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_key_exchange()
4985 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_key_exchange()
4991 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_exchange()
5028 SSL_CTX_free(cctx); in test_key_exchange()
5104 SSL_CTX *sctx = NULL, *cctx = NULL; in test_negotiated_group() local
5140 max_version, &sctx, &cctx, cert, in test_negotiated_group()
5153 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_negotiated_group()
5158 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_negotiated_group()
5184 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_negotiated_group()
5230 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_negotiated_group()
5251 SSL_CTX_free(cctx); in test_negotiated_group()
5266 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tls13_ciphersuite() local
5321 &sctx, &cctx, cert, privkey))) in test_tls13_ciphersuite()
5326 || !TEST_true(SSL_CTX_set_ciphersuites(cctx, t13_cipher))) in test_tls13_ciphersuite()
5330 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_tls13_ciphersuite()
5336 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tls13_ciphersuite()
5385 SSL_CTX_free(cctx); in test_tls13_ciphersuite()
5386 cctx = NULL; in test_tls13_ciphersuite()
5395 SSL_CTX_free(cctx); in test_tls13_ciphersuite()
5408 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tls13_psk() local
5421 &sctx, &cctx, idx == 3 ? NULL : cert, in test_tls13_psk()
5432 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_tls13_psk()
5441 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_tls13_psk()
5453 SSL_CTX_set_psk_use_session_callback(cctx, use_session_cb); in test_tls13_psk()
5458 SSL_CTX_set_psk_client_callback(cctx, psk_client_cb); in test_tls13_psk()
5473 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5504 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5547 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5594 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5632 SSL_CTX_free(cctx); in test_tls13_psk()
5678 SSL_CTX *sctx = NULL, *cctx = NULL; in test_stateless() local
5684 &sctx, &cctx, cert, privkey))) in test_stateless()
5688 SSL_CTX_clear_options(cctx, SSL_OP_ENABLE_MIDDLEBOX_COMPAT); in test_stateless()
5690 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
5714 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
5731 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
5756 SSL_CTX_free(cctx); in test_stateless()
5893 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_custom_exts() local
5914 &sctx, &cctx, cert, privkey))) in test_custom_exts()
5925 SSL_CTX_set_options(cctx, SSL_OP_NO_TLSv1_3); in test_custom_exts()
5937 if (!TEST_int_eq(SSL_CTX_use_certificate_file(cctx, cert, in test_custom_exts()
5939 || !TEST_int_eq(SSL_CTX_use_PrivateKey_file(cctx, privkey, in test_custom_exts()
5941 || !TEST_int_eq(SSL_CTX_check_private_key(cctx), 1)) in test_custom_exts()
5958 if (!TEST_true(SSL_CTX_add_client_custom_ext(cctx, TEST_EXT_TYPE1, in test_custom_exts()
5964 if (!TEST_true(SSL_CTX_add_custom_ext(cctx, TEST_EXT_TYPE1, context, in test_custom_exts()
5971 if (!TEST_false(SSL_CTX_add_client_custom_ext(cctx, TEST_EXT_TYPE1, in test_custom_exts()
5975 || !TEST_false(SSL_CTX_add_custom_ext(cctx, TEST_EXT_TYPE1, in test_custom_exts()
6019 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_custom_exts()
6067 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_custom_exts()
6112 SSL_CTX_free(cctx); in test_custom_exts()
6163 SSL_CTX *sctx = NULL, *cctx = NULL; in test_serverinfo_custom() local
6210 &sctx, &cctx, cert, privkey))) in test_serverinfo_custom()
6222 if (!TEST_true(SSL_CTX_add_custom_ext(cctx, TLSEXT_TYPE_signed_certificate_timestamp, in test_serverinfo_custom()
6227 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_serverinfo_custom()
6243 SSL_CTX_free(cctx); in test_serverinfo_custom()
6259 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_export_key_mat() local
6296 &sctx, &cctx, cert, privkey))) in test_export_key_mat()
6300 SSL_CTX_set_max_proto_version(cctx, protocols[tst]); in test_export_key_mat()
6301 SSL_CTX_set_min_proto_version(cctx, protocols[tst]); in test_export_key_mat()
6303 (!SSL_CTX_set_cipher_list(cctx, "DEFAULT:@SECLEVEL=0") in test_export_key_mat()
6307 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_export_key_mat()
6411 SSL_CTX_free(cctx); in test_export_key_mat()
6428 SSL_CTX *cctx = NULL, *sctx = NULL; in test_export_key_mat_early() local
6437 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, &serverssl, in test_export_key_mat_early()
6489 SSL_CTX_free(cctx); in test_export_key_mat_early()
6500 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update() local
6510 &sctx, &cctx, cert, privkey)) in test_key_update()
6511 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update()
6546 SSL_CTX_free(cctx); in test_key_update()
6559 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_peer_in_write() local
6573 &sctx, &cctx, cert, privkey)) in test_key_update_peer_in_write()
6574 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_peer_in_write()
6629 SSL_CTX_free(cctx); in test_key_update_peer_in_write()
6645 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_peer_in_read() local
6657 &sctx, &cctx, cert, privkey)) in test_key_update_peer_in_read()
6658 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_peer_in_read()
6715 SSL_CTX_free(cctx); in test_key_update_peer_in_read()
6728 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_local_in_write() local
6742 &sctx, &cctx, cert, privkey)) in test_key_update_local_in_write()
6743 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_local_in_write()
6804 SSL_CTX_free(cctx); in test_key_update_local_in_write()
6819 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_local_in_read() local
6831 &sctx, &cctx, cert, privkey)) in test_key_update_local_in_read()
6832 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_local_in_read()
6889 SSL_CTX_free(cctx); in test_key_update_local_in_read()
6897 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_clear() local
6909 &sctx, &cctx, cert, privkey)) in test_ssl_clear()
6911 && !TEST_true(SSL_CTX_set_max_proto_version(cctx, in test_ssl_clear()
6913 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ssl_clear()
6928 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_clear()
6944 SSL_CTX_free(cctx); in test_ssl_clear()
7064 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pha_key_update() local
7070 &sctx, &cctx, cert, privkey))) in test_pha_key_update()
7075 || !TEST_true(SSL_CTX_set_min_proto_version(cctx, TLS1_3_VERSION)) in test_pha_key_update()
7076 || !TEST_true(SSL_CTX_set_max_proto_version(cctx, TLS1_3_VERSION))) in test_pha_key_update()
7079 SSL_CTX_set_post_handshake_auth(cctx, 1); in test_pha_key_update()
7081 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_pha_key_update()
7114 SSL_CTX_free(cctx); in test_pha_key_update()
7268 SSL_CTX *cctx = NULL, *sctx = NULL; in test_srp() local
7293 &sctx, &cctx, cert, privkey))) in test_srp()
7297 || !TEST_true(SSL_CTX_set_cipher_list(cctx, "SRP-AES-128-CBC-SHA")) in test_srp()
7299 || !TEST_true(SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION)) in test_srp()
7300 || !TEST_int_gt(SSL_CTX_set_srp_username(cctx, userid), 0)) in test_srp()
7304 if (!TEST_int_gt(SSL_CTX_set_srp_password(cctx, "badpass"), 0)) in test_srp()
7307 if (!TEST_int_gt(SSL_CTX_set_srp_password(cctx, password), 0)) in test_srp()
7311 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_srp()
7332 SSL_CTX_free(cctx); in test_srp()
7488 SSL_CTX *cctx = NULL, *sctx = NULL; in test_info_callback() local
7523 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_info_callback()
7563 tlsvers, tlsvers, &sctx, &cctx, cert, in test_info_callback()
7574 SSL_CTX_set_info_callback((tst % 2) == 0 ? sctx : cctx, in test_info_callback()
7577 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_info_callback()
7594 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_info_callback()
7610 SSL_CTX_free(cctx); in test_info_callback()
7616 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_pending() local
7627 &sctx, &cctx, cert, privkey))) in test_ssl_pending()
7634 &sctx, &cctx, cert, privkey))) in test_ssl_pending()
7648 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_ssl_pending()
7657 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_pending()
7681 SSL_CTX_free(cctx); in test_ssl_pending()
7773 SSL_CTX *cctx = NULL, *sctx = NULL; in int_test_ssl_get_shared_ciphers() local
7790 cctx = SSL_CTX_new_ex(tmplibctx, NULL, TLS_client_method()); in int_test_ssl_get_shared_ciphers()
7791 if (!TEST_ptr(cctx)) in int_test_ssl_get_shared_ciphers()
7803 &sctx, &cctx, cert, privkey))) in int_test_ssl_get_shared_ciphers()
7806 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in int_test_ssl_get_shared_ciphers()
7809 && !TEST_true(SSL_CTX_set_ciphersuites(cctx, in int_test_ssl_get_shared_ciphers()
7819 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in int_test_ssl_get_shared_ciphers()
7841 SSL_CTX_free(cctx); in int_test_ssl_get_shared_ciphers()
8016 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ticket_callbacks() local
8076 &sctx, &cctx, cert, privkey))) in test_ticket_callbacks()
8100 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ticket_callbacks()
8127 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_ticket_callbacks()
8160 SSL_CTX_free(cctx); in test_ticket_callbacks()
8176 SSL_CTX *cctx = NULL, *sctx = NULL; in test_incorrect_shutdown() local
8184 &sctx, &cctx, cert, privkey))) in test_incorrect_shutdown()
8190 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_incorrect_shutdown()
8215 SSL_CTX_free(cctx); in test_incorrect_shutdown()
8235 SSL_CTX *cctx = NULL, *sctx = NULL; in test_shutdown() local
8257 &sctx, &cctx, cert, privkey))) in test_shutdown()
8261 SSL_CTX_set_post_handshake_auth(cctx, 1); in test_shutdown()
8263 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_shutdown()
8377 SSL_CTX_free(cctx); in test_shutdown()
8486 SSL_CTX *cctx = NULL, *sctx = NULL, *snictx = NULL; in test_cert_cb_int() local
8500 &sctx, &cctx, NULL, NULL))) in test_cert_cb_int()
8518 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_cert_cb_int()
8553 SSL_CTX_free(cctx); in test_cert_cb_int()
8612 SSL_CTX *cctx = NULL, *sctx = NULL; in test_client_cert_cb() local
8630 &sctx, &cctx, cert, privkey))) in test_client_cert_cb()
8637 SSL_CTX_set_client_cert_cb(cctx, client_cert_cb); in test_client_cert_cb()
8642 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_client_cert_cb()
8654 SSL_CTX_free(cctx); in test_client_cert_cb()
8669 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ca_names_int() local
8693 &sctx, &cctx, cert, privkey))) in test_ca_names_int()
8708 SSL_CTX_set0_CA_list(cctx, sk2); in test_ca_names_int()
8721 SSL_CTX_set_client_CA_list(cctx, sk2); in test_ca_names_int()
8725 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ca_names_int()
8769 SSL_CTX_free(cctx); in test_ca_names_int()
8819 SSL_CTX *cctx = NULL, *sctx = NULL; in test_multiblock_write() local
8848 max_version, &sctx, &cctx, cert, in test_multiblock_write()
8855 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_multiblock_write()
8861 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipherlist))) in test_multiblock_write()
8886 SSL_CTX_free(cctx); in test_multiblock_write()
9025 SSL_CTX *sctx = NULL, *cctx = NULL; in test_session_cache_overflow() local
9045 &sctx, &cctx, cert, privkey)) in test_session_cache_overflow()
9054 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_session_cache_overflow()
9088 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_session_cache_overflow()
9112 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_session_cache_overflow()
9128 SSL_CTX_free(cctx); in test_session_cache_overflow()
9149 SSL_CTX *cctx = NULL, *sctx = NULL; in test_servername() local
9169 &sctx, &cctx, cert, privkey)) in test_servername()
9170 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_servername()
9208 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_servername()
9284 SSL_CTX_free(cctx); in test_servername()
9303 SSL_CTX *cctx = NULL, *sctx = NULL; in test_sigalgs_available() local
9347 cctx = SSL_CTX_new_ex(clientctx, NULL, TLS_client_method()); in test_sigalgs_available()
9349 if (!TEST_ptr(cctx) || !TEST_ptr(sctx)) in test_sigalgs_available()
9357 &sctx, &cctx, cert, privkey))) in test_sigalgs_available()
9364 &sctx, &cctx, cert2, privkey2))) in test_sigalgs_available()
9370 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_sigalgs_available()
9374 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_sigalgs_available()
9380 if (!SSL_CTX_set1_sigalgs_list(cctx, in test_sigalgs_available()
9388 if (!SSL_CTX_set1_sigalgs_list(cctx, "rsa_pss_rsae_sha256:ECDSA+SHA256") in test_sigalgs_available()
9403 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_sigalgs_available()
9429 SSL_CTX_free(cctx); in test_sigalgs_available()
9444 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pluggable_group() local
9459 &sctx, &cctx, cert, privkey)) in test_pluggable_group()
9460 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_pluggable_group()
9483 SSL_CTX_free(cctx); in test_pluggable_group()
9494 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_dup() local
9503 &sctx, &cctx, cert, privkey))) in test_ssl_dup()
9506 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_dup()
9554 SSL_CTX_free(cctx); in test_ssl_dup()
9657 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_tmp_dh() local
9688 &sctx, &cctx, cert, privkey))) in test_set_tmp_dh()
9710 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_set_tmp_dh()
9754 SSL_CTX_free(cctx); in test_set_tmp_dh()
9765 SSL_CTX *cctx = NULL, *sctx = NULL; in test_dh_auto() local
9824 &sctx, &cctx, thiscert, thiskey))) in test_dh_auto()
9827 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_dh_auto()
9861 SSL_CTX_free(cctx); in test_dh_auto()
9878 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_sni_tls13() local
9892 &sctx2, &cctx, cert, privkey))) in test_sni_tls13()
9904 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_sni_tls13()
9921 SSL_CTX_free(cctx); in test_sni_tls13()
9932 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ticket_lifetime() local
9950 &sctx, &cctx, cert, privkey))) in test_ticket_lifetime()
9953 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ticket_lifetime()
9983 SSL_CTX_free(cctx); in test_ticket_lifetime()
10272 SSL_CONF_CTX *cctx = NULL; in test_load_dhfile() local
10278 || !TEST_ptr(cctx = SSL_CONF_CTX_new())) in test_load_dhfile()
10281 SSL_CONF_CTX_set_ssl_ctx(cctx, ctx); in test_load_dhfile()
10282 SSL_CONF_CTX_set_flags(cctx, in test_load_dhfile()
10287 if (!TEST_int_eq(SSL_CONF_cmd(cctx, "DHParameters", dhfile), 2)) in test_load_dhfile()
10292 SSL_CONF_CTX_free(cctx); in test_load_dhfile()
10322 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pipelining() local
10341 TLS1_2_VERSION, &sctx, &cctx, cert, in test_pipelining()
10353 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_pipelining()
10487 SSL_CTX_free(cctx); in test_pipelining()
10519 SSL_CTX *cctx = NULL, *sctx = NULL; in test_handshake_retry() local
10538 &sctx, &cctx, cert, privkey))) in test_handshake_retry()
10558 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_handshake_retry()
10589 SSL_CTX_free(cctx); in test_handshake_retry()
10598 SSL_CTX *cctx; member
10622 if (!TEST_true(create_ssl_objects(cbdata->sctx, cbdata->cctx, &serverssl, in resume_servername_cb()
10656 SSL_CTX *sctx = NULL, *cctx = NULL; in test_multi_resume() local
10677 max_version, &sctx, &cctx, cert, in test_multi_resume()
10697 cbdata.cctx = cctx; in test_multi_resume()
10703 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_multi_resume()
10763 SSL_CTX_free(cctx); in test_multi_resume()
10967 SSL_CTX *sctx = NULL, *cctx = NULL; in test_npn() local
10973 &sctx, &cctx, cert, privkey))) in test_npn()
10977 SSL_CTX_set_next_proto_select_cb(cctx, npn_select_cb, &idx); in test_npn()
10979 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_npn()
11022 SSL_CTX_free(cctx); in test_npn()
11065 SSL_CTX *sctx = NULL, *cctx = NULL; in test_alpn() local
11073 &sctx, &cctx, cert, privkey))) in test_alpn()
11078 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_alpn()
11125 SSL_CTX_free(cctx); in test_alpn()