Lines Matching refs:cctx

362     SSL_CTX *cctx = NULL, *sctx = NULL;  in test_keylog()  local
378 &sctx, &cctx, cert, privkey))) in test_keylog()
382 SSL_CTX_set_options(cctx, SSL_OP_NO_TLSv1_3); in test_keylog()
386 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "RSA"))) in test_keylog()
389 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL) in test_keylog()
392 SSL_CTX_set_keylog_callback(cctx, client_keylog_callback); in test_keylog()
393 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) in test_keylog()
402 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog()
434 SSL_CTX_free(cctx); in test_keylog()
443 SSL_CTX *cctx = NULL, *sctx = NULL; in test_keylog_no_master_key() local
461 &sctx, &cctx, cert, privkey)) in test_keylog_no_master_key()
466 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL) in test_keylog_no_master_key()
470 SSL_CTX_set_keylog_callback(cctx, client_keylog_callback); in test_keylog_no_master_key()
471 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) in test_keylog_no_master_key()
481 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog_no_master_key()
519 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog_no_master_key()
551 SSL_CTX_free(cctx); in test_keylog_no_master_key()
577 SSL_CTX *cctx = NULL, *sctx = NULL; in test_client_cert_verify_cb() local
583 &sctx, &cctx, NULL, NULL))) in test_client_cert_verify_cb()
590 if (!TEST_true(SSL_CTX_load_verify_locations(cctx, root, NULL))) in test_client_cert_verify_cb()
592 SSL_CTX_set_verify(cctx, SSL_VERIFY_PEER, NULL); in test_client_cert_verify_cb()
593 SSL_CTX_set_cert_verify_callback(cctx, verify_retry_cb, NULL); in test_client_cert_verify_cb()
594 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_client_cert_verify_cb()
635 SSL_CTX_free(cctx); in test_client_cert_verify_cb()
745 SSL_CTX *cctx = NULL, *sctx = NULL; in test_client_hello_cb() local
751 &sctx, &cctx, cert, privkey))) in test_client_hello_cb()
756 SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION); in test_client_hello_cb()
758 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_client_hello_cb()
760 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_client_hello_cb()
780 SSL_CTX_free(cctx); in test_client_hello_cb()
787 SSL_CTX *cctx = NULL, *sctx = NULL; in test_no_ems() local
793 &sctx, &cctx, cert, privkey)) { in test_no_ems()
800 if (!create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, NULL)) { in test_no_ems()
825 SSL_CTX_free(cctx); in test_no_ems()
838 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ccs_change_cipher() local
853 &sctx, &cctx, cert, privkey)) in test_ccs_change_cipher()
855 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
869 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
889 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
935 SSL_CTX_free(cctx); in test_ccs_change_cipher()
947 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_large_message() local
967 max_version, &sctx, &cctx, cert, in execute_test_large_message()
978 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in execute_test_large_message()
989 SSL_CTX_set_read_ahead(cctx, 1); in execute_test_large_message()
1011 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in execute_test_large_message()
1031 SSL_CTX_free(cctx); in execute_test_large_message()
1146 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_ktls() local
1170 &sctx, &cctx, cert, privkey))) in execute_test_ktls()
1174 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, cipher)) in execute_test_ktls()
1178 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipher)) in execute_test_ktls()
1183 if (!TEST_true(create_ssl_objects2(sctx, cctx, &serverssl, in execute_test_ktls()
1263 SSL_CTX_free(cctx); in execute_test_ktls()
1278 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_ktls_sendfile() local
1309 &sctx, &cctx, cert, privkey))) in execute_test_ktls_sendfile()
1313 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, cipher)) in execute_test_ktls_sendfile()
1317 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipher)) in execute_test_ktls_sendfile()
1322 if (!TEST_true(create_ssl_objects2(sctx, cctx, &serverssl, in execute_test_ktls_sendfile()
1394 SSL_CTX_free(cctx); in execute_test_ktls_sendfile()
1505 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_cleanse_plaintext() local
1517 &sctx, &cctx, cert, in execute_cleanse_plaintext()
1535 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in execute_cleanse_plaintext()
1541 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in execute_cleanse_plaintext()
1599 SSL_CTX_free(cctx); in execute_cleanse_plaintext()
1686 SSL_CTX *cctx = NULL, *sctx = NULL; in test_tlsext_status_type() local
1695 &sctx, &cctx, cert, privkey)) in test_tlsext_status_type()
1698 if (SSL_CTX_get_tlsext_status_type(cctx) != -1) in test_tlsext_status_type()
1703 clientssl = SSL_new(cctx); in test_tlsext_status_type()
1714 if (!SSL_CTX_set_tlsext_status_type(cctx, TLSEXT_STATUSTYPE_ocsp) in test_tlsext_status_type()
1715 || SSL_CTX_get_tlsext_status_type(cctx) != TLSEXT_STATUSTYPE_ocsp) in test_tlsext_status_type()
1718 clientssl = SSL_new(cctx); in test_tlsext_status_type()
1728 SSL_CTX_set_tlsext_status_cb(cctx, ocsp_client_cb); in test_tlsext_status_type()
1729 SSL_CTX_set_tlsext_status_arg(cctx, &cdummyarg); in test_tlsext_status_type()
1732 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1748 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1768 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1804 SSL_CTX_free(cctx); in test_tlsext_status_type()
1847 SSL_CTX *sctx = NULL, *cctx = NULL; in execute_test_session() local
1864 &sctx, &cctx, cert, privkey))) in execute_test_session()
1871 SSL_CTX_set_min_proto_version(cctx, maxprot); in execute_test_session()
1872 SSL_CTX_set_max_proto_version(cctx, maxprot); in execute_test_session()
1876 SSL_CTX_sess_set_new_cb(cctx, new_session_cb); in execute_test_session()
1877 SSL_CTX_sess_set_remove_cb(cctx, remove_session_cb); in execute_test_session()
1881 SSL_CTX_set_session_cache_mode(cctx, SSL_SESS_CACHE_CLIENT); in execute_test_session()
1883 SSL_CTX_set_session_cache_mode(cctx, in execute_test_session()
1892 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl1, &clientssl1, in execute_test_session()
1900 if (use_int_cache && !TEST_false(SSL_CTX_add_session(cctx, sess1))) in execute_test_session()
1909 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
1945 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
1974 if (!TEST_true(SSL_CTX_add_session(cctx, sess2)) in execute_test_session()
1975 || !TEST_true(SSL_CTX_remove_session(cctx, sess2))) in execute_test_session()
1981 if (!TEST_false(SSL_CTX_remove_session(cctx, sess2))) in execute_test_session()
1992 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl3, in execute_test_session()
2006 if (use_int_cache && !TEST_true(SSL_CTX_add_session(cctx, sess2))) in execute_test_session()
2012 SSL_CTX_sess_set_new_cb(cctx, NULL); in execute_test_session()
2013 SSL_CTX_sess_set_remove_cb(cctx, NULL); in execute_test_session()
2020 SSL_CTX_set_session_cache_mode(cctx, 0); in execute_test_session()
2042 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl1, &clientssl1, in execute_test_session()
2090 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
2127 SSL_CTX_free(cctx); in execute_test_session()
2225 SSL_CTX **cctx) in setup_ticket_test() argument
2231 sctx, cctx, cert, privkey)) in setup_ticket_test()
2241 SSL_CTX_set_session_cache_mode(*cctx, SSL_SESS_CACHE_CLIENT in setup_ticket_test()
2243 SSL_CTX_sess_set_new_cb(*cctx, new_cachesession_cb); in setup_ticket_test()
2248 static int check_resumption(int idx, SSL_CTX *sctx, SSL_CTX *cctx, int succ) in check_resumption() argument
2256 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in check_resumption()
2307 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tickets() local
2317 if (!setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_tickets()
2320 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tickets()
2335 SSL_CTX_free(cctx); in test_tickets()
2337 sctx = cctx = NULL; in test_tickets()
2348 if (!setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_tickets()
2351 if (!check_resumption(idx, sctx, cctx, 0)) in test_tickets()
2358 SSL_CTX_free(cctx); in test_tickets()
2359 sctx = cctx = NULL; in test_tickets()
2361 if (!setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_tickets()
2364 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tickets()
2394 if (!check_resumption(idx, sctx, cctx, 1)) in test_tickets()
2407 SSL_CTX_free(cctx); in test_tickets()
2424 SSL_CTX *sctx = NULL, *cctx = NULL; in test_psk_tickets() local
2431 &sctx, &cctx, NULL, NULL)) in test_psk_tickets()
2437 SSL_CTX_set_session_cache_mode(cctx, SSL_SESS_CACHE_CLIENT in test_psk_tickets()
2439 SSL_CTX_set_psk_use_session_callback(cctx, use_session_cb); in test_psk_tickets()
2441 SSL_CTX_sess_set_new_cb(cctx, new_session_cb); in test_psk_tickets()
2447 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_psk_tickets()
2469 SSL_CTX_free(cctx); in test_psk_tickets()
2479 SSL_CTX *sctx = NULL, *cctx = NULL; in test_extra_tickets() local
2496 if (!TEST_ptr(bretry) || !setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_extra_tickets()
2500 SSL_CTX_sess_set_new_cb(cctx, new_session_cb); in test_extra_tickets()
2502 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_extra_tickets()
2633 SSL_CTX_free(cctx); in test_extra_tickets()
2635 sctx = cctx = NULL; in test_extra_tickets()
2690 SSL_CTX *sctx = NULL, *cctx = NULL; in test_ssl_set_bio() local
2719 &sctx, &cctx, cert, privkey))) in test_ssl_set_bio()
2730 SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION); in test_ssl_set_bio()
2733 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_set_bio()
2808 SSL_CTX_free(cctx); in test_ssl_set_bio()
2928 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_sigalgs() local
2944 &sctx, &cctx, cert, privkey))) in test_set_sigalgs()
2947 SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION); in test_set_sigalgs()
2953 ret = SSL_CTX_set1_sigalgs(cctx, curr->list, curr->listlen); in test_set_sigalgs()
2955 ret = SSL_CTX_set1_sigalgs_list(cctx, curr->liststr); in test_set_sigalgs()
2970 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_set_sigalgs()
3003 SSL_CTX_free(cctx); in test_set_sigalgs()
3176 static int setupearly_data_test(SSL_CTX **cctx, SSL_CTX **sctx, SSL **clientssl, in setupearly_data_test() argument
3183 sctx, cctx, cert, privkey))) in setupearly_data_test()
3191 SSL_CTX_set_read_ahead(*cctx, 1); in setupearly_data_test()
3195 SSL_CTX_set_psk_use_session_callback(*cctx, use_session_cb); in setupearly_data_test()
3202 if (!TEST_true(create_ssl_objects(*sctx, *cctx, serverssl, clientssl, in setupearly_data_test()
3258 if (!TEST_true(create_ssl_objects(*sctx, *cctx, serverssl, in setupearly_data_test()
3268 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_read_write() local
3276 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_read_write()
3422 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_early_data_read_write()
3469 SSL_CTX_free(cctx); in test_early_data_read_write()
3498 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_replay_int() local
3509 &sctx, &cctx, cert, privkey))) in test_early_data_replay_int()
3533 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_replay_int()
3551 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_early_data_replay_int()
3608 SSL_CTX_free(cctx); in test_early_data_replay_int()
3634 SSL_CTX *cctx = NULL, *sctx = NULL; in early_data_skip_helper() local
3641 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in early_data_skip_helper()
3774 SSL_CTX_free(cctx); in early_data_skip_helper()
3821 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_not_sent() local
3828 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_not_sent()
3871 SSL_CTX_free(cctx); in test_early_data_not_sent()
3903 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_psk() local
3922 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_psk()
4070 SSL_CTX_free(cctx); in test_early_data_psk()
4084 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_psk_with_all_ciphers() local
4121 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_psk_with_all_ciphers()
4183 SSL_CTX_free(cctx); in test_early_data_psk_with_all_ciphers()
4193 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_not_expected() local
4200 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_not_expected()
4241 SSL_CTX_free(cctx); in test_early_data_not_expected()
4253 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_tls1_2() local
4259 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_tls1_2()
4314 SSL_CTX_free(cctx); in test_early_data_tls1_2()
4336 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_ciphersuite() local
4342 &sctx, &cctx, cert, privkey)) in test_set_ciphersuite()
4349 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "AES256-GCM-SHA384"))) in test_set_ciphersuite()
4355 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_set_ciphersuite()
4360 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_set_ciphersuite()
4365 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_set_ciphersuite()
4396 SSL_CTX_free(cctx); in test_set_ciphersuite()
4403 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ciphersuite_change() local
4412 &sctx, &cctx, cert, privkey)) in test_ciphersuite_change()
4417 || !TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
4421 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
4437 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
4439 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
4459 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, "TLS_AES_256_GCM_SHA384")) in test_ciphersuite_change()
4460 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
4477 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, "TLS_AES_256_GCM_SHA384")) in test_ciphersuite_change()
4478 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
4491 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
4495 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
4529 SSL_CTX_free(cctx); in test_ciphersuite_change()
4561 SSL_CTX *sctx = NULL, *cctx = NULL; in test_key_exchange() local
4643 max_version, &sctx, &cctx, cert, in test_key_exchange()
4651 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_key_exchange()
4666 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_key_exchange()
4672 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_exchange()
4709 SSL_CTX_free(cctx); in test_key_exchange()
4785 SSL_CTX *sctx = NULL, *cctx = NULL; in test_negotiated_group() local
4818 max_version, &sctx, &cctx, cert, in test_negotiated_group()
4831 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_negotiated_group()
4836 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_negotiated_group()
4862 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_negotiated_group()
4908 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_negotiated_group()
4929 SSL_CTX_free(cctx); in test_negotiated_group()
4944 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tls13_ciphersuite() local
5002 &sctx, &cctx, cert, privkey))) in test_tls13_ciphersuite()
5007 SSL_CTX_set_security_level(cctx, 0); in test_tls13_ciphersuite()
5012 || !TEST_true(SSL_CTX_set_ciphersuites(cctx, t13_cipher))) in test_tls13_ciphersuite()
5016 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_tls13_ciphersuite()
5022 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tls13_ciphersuite()
5071 SSL_CTX_free(cctx); in test_tls13_ciphersuite()
5072 cctx = NULL; in test_tls13_ciphersuite()
5081 SSL_CTX_free(cctx); in test_tls13_ciphersuite()
5094 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tls13_psk() local
5107 &sctx, &cctx, idx == 3 ? NULL : cert, in test_tls13_psk()
5118 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_tls13_psk()
5127 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_tls13_psk()
5139 SSL_CTX_set_psk_use_session_callback(cctx, use_session_cb); in test_tls13_psk()
5144 SSL_CTX_set_psk_client_callback(cctx, psk_client_cb); in test_tls13_psk()
5159 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5190 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5233 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5280 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5318 SSL_CTX_free(cctx); in test_tls13_psk()
5364 SSL_CTX *sctx = NULL, *cctx = NULL; in test_stateless() local
5370 &sctx, &cctx, cert, privkey))) in test_stateless()
5374 SSL_CTX_clear_options(cctx, SSL_OP_ENABLE_MIDDLEBOX_COMPAT); in test_stateless()
5376 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
5400 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
5417 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
5442 SSL_CTX_free(cctx); in test_stateless()
5579 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_custom_exts() local
5600 &sctx, &cctx, cert, privkey))) in test_custom_exts()
5611 SSL_CTX_set_options(cctx, SSL_OP_NO_TLSv1_3); in test_custom_exts()
5623 if (!TEST_int_eq(SSL_CTX_use_certificate_file(cctx, cert, in test_custom_exts()
5625 || !TEST_int_eq(SSL_CTX_use_PrivateKey_file(cctx, privkey, in test_custom_exts()
5627 || !TEST_int_eq(SSL_CTX_check_private_key(cctx), 1)) in test_custom_exts()
5644 if (!TEST_true(SSL_CTX_add_client_custom_ext(cctx, TEST_EXT_TYPE1, in test_custom_exts()
5650 if (!TEST_true(SSL_CTX_add_custom_ext(cctx, TEST_EXT_TYPE1, context, in test_custom_exts()
5657 if (!TEST_false(SSL_CTX_add_client_custom_ext(cctx, TEST_EXT_TYPE1, in test_custom_exts()
5661 || !TEST_false(SSL_CTX_add_custom_ext(cctx, TEST_EXT_TYPE1, in test_custom_exts()
5705 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_custom_exts()
5753 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_custom_exts()
5798 SSL_CTX_free(cctx); in test_custom_exts()
5869 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_export_key_mat() local
5906 &sctx, &cctx, cert, privkey))) in test_export_key_mat()
5910 SSL_CTX_set_max_proto_version(cctx, protocols[tst]); in test_export_key_mat()
5911 SSL_CTX_set_min_proto_version(cctx, protocols[tst]); in test_export_key_mat()
5913 (!SSL_CTX_set_cipher_list(cctx, "DEFAULT:@SECLEVEL=0") in test_export_key_mat()
5917 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_export_key_mat()
6021 SSL_CTX_free(cctx); in test_export_key_mat()
6038 SSL_CTX *cctx = NULL, *sctx = NULL; in test_export_key_mat_early() local
6047 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, &serverssl, in test_export_key_mat_early()
6099 SSL_CTX_free(cctx); in test_export_key_mat_early()
6110 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update() local
6120 &sctx, &cctx, cert, privkey)) in test_key_update()
6121 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update()
6156 SSL_CTX_free(cctx); in test_key_update()
6169 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_peer_in_write() local
6183 &sctx, &cctx, cert, privkey)) in test_key_update_peer_in_write()
6184 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_peer_in_write()
6239 SSL_CTX_free(cctx); in test_key_update_peer_in_write()
6255 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_peer_in_read() local
6267 &sctx, &cctx, cert, privkey)) in test_key_update_peer_in_read()
6268 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_peer_in_read()
6325 SSL_CTX_free(cctx); in test_key_update_peer_in_read()
6338 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_local_in_write() local
6352 &sctx, &cctx, cert, privkey)) in test_key_update_local_in_write()
6353 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_local_in_write()
6414 SSL_CTX_free(cctx); in test_key_update_local_in_write()
6429 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_local_in_read() local
6441 &sctx, &cctx, cert, privkey)) in test_key_update_local_in_read()
6442 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_local_in_read()
6499 SSL_CTX_free(cctx); in test_key_update_local_in_read()
6507 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_clear() local
6519 &sctx, &cctx, cert, privkey)) in test_ssl_clear()
6521 && !TEST_true(SSL_CTX_set_max_proto_version(cctx, in test_ssl_clear()
6523 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ssl_clear()
6538 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_clear()
6554 SSL_CTX_free(cctx); in test_ssl_clear()
6674 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pha_key_update() local
6680 &sctx, &cctx, cert, privkey))) in test_pha_key_update()
6685 || !TEST_true(SSL_CTX_set_min_proto_version(cctx, TLS1_3_VERSION)) in test_pha_key_update()
6686 || !TEST_true(SSL_CTX_set_max_proto_version(cctx, TLS1_3_VERSION))) in test_pha_key_update()
6689 SSL_CTX_set_post_handshake_auth(cctx, 1); in test_pha_key_update()
6691 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_pha_key_update()
6724 SSL_CTX_free(cctx); in test_pha_key_update()
6878 SSL_CTX *cctx = NULL, *sctx = NULL; in test_srp() local
6903 &sctx, &cctx, cert, privkey))) in test_srp()
6907 || !TEST_true(SSL_CTX_set_cipher_list(cctx, "SRP-AES-128-CBC-SHA")) in test_srp()
6909 || !TEST_true(SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION)) in test_srp()
6910 || !TEST_int_gt(SSL_CTX_set_srp_username(cctx, userid), 0)) in test_srp()
6914 if (!TEST_int_gt(SSL_CTX_set_srp_password(cctx, "badpass"), 0)) in test_srp()
6917 if (!TEST_int_gt(SSL_CTX_set_srp_password(cctx, password), 0)) in test_srp()
6921 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_srp()
6942 SSL_CTX_free(cctx); in test_srp()
7098 SSL_CTX *cctx = NULL, *sctx = NULL; in test_info_callback() local
7132 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_info_callback()
7164 tlsvers, tlsvers, &sctx, &cctx, cert, in test_info_callback()
7175 SSL_CTX_set_info_callback((tst % 2) == 0 ? sctx : cctx, in test_info_callback()
7178 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_info_callback()
7195 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_info_callback()
7211 SSL_CTX_free(cctx); in test_info_callback()
7217 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_pending() local
7228 &sctx, &cctx, cert, privkey))) in test_ssl_pending()
7235 &sctx, &cctx, cert, privkey))) in test_ssl_pending()
7249 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_ssl_pending()
7258 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_pending()
7282 SSL_CTX_free(cctx); in test_ssl_pending()
7374 SSL_CTX *cctx = NULL, *sctx = NULL; in int_test_ssl_get_shared_ciphers() local
7391 cctx = SSL_CTX_new_ex(tmplibctx, NULL, TLS_client_method()); in int_test_ssl_get_shared_ciphers()
7392 if (!TEST_ptr(cctx)) in int_test_ssl_get_shared_ciphers()
7404 &sctx, &cctx, cert, privkey))) in int_test_ssl_get_shared_ciphers()
7407 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in int_test_ssl_get_shared_ciphers()
7410 && !TEST_true(SSL_CTX_set_ciphersuites(cctx, in int_test_ssl_get_shared_ciphers()
7420 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in int_test_ssl_get_shared_ciphers()
7442 SSL_CTX_free(cctx); in int_test_ssl_get_shared_ciphers()
7592 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ticket_callbacks() local
7649 &sctx, &cctx, cert, privkey))) in test_ticket_callbacks()
7673 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ticket_callbacks()
7700 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_ticket_callbacks()
7731 SSL_CTX_free(cctx); in test_ticket_callbacks()
7747 SSL_CTX *cctx = NULL, *sctx = NULL; in test_incorrect_shutdown() local
7755 &sctx, &cctx, cert, privkey))) in test_incorrect_shutdown()
7761 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_incorrect_shutdown()
7786 SSL_CTX_free(cctx); in test_incorrect_shutdown()
7806 SSL_CTX *cctx = NULL, *sctx = NULL; in test_shutdown() local
7828 &sctx, &cctx, cert, privkey))) in test_shutdown()
7832 SSL_CTX_set_post_handshake_auth(cctx, 1); in test_shutdown()
7834 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_shutdown()
7948 SSL_CTX_free(cctx); in test_shutdown()
8057 SSL_CTX *cctx = NULL, *sctx = NULL, *snictx = NULL; in test_cert_cb_int() local
8071 &sctx, &cctx, NULL, NULL))) in test_cert_cb_int()
8085 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_cert_cb_int()
8120 SSL_CTX_free(cctx); in test_cert_cb_int()
8179 SSL_CTX *cctx = NULL, *sctx = NULL; in test_client_cert_cb() local
8197 &sctx, &cctx, cert, privkey))) in test_client_cert_cb()
8204 SSL_CTX_set_client_cert_cb(cctx, client_cert_cb); in test_client_cert_cb()
8209 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_client_cert_cb()
8221 SSL_CTX_free(cctx); in test_client_cert_cb()
8236 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ca_names_int() local
8260 &sctx, &cctx, cert, privkey))) in test_ca_names_int()
8275 SSL_CTX_set0_CA_list(cctx, sk2); in test_ca_names_int()
8288 SSL_CTX_set_client_CA_list(cctx, sk2); in test_ca_names_int()
8292 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ca_names_int()
8336 SSL_CTX_free(cctx); in test_ca_names_int()
8386 SSL_CTX *cctx = NULL, *sctx = NULL; in test_multiblock_write() local
8415 max_version, &sctx, &cctx, cert, in test_multiblock_write()
8422 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_multiblock_write()
8428 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipherlist))) in test_multiblock_write()
8453 SSL_CTX_free(cctx); in test_multiblock_write()
8596 SSL_CTX *cctx = NULL, *sctx = NULL; in test_servername() local
8616 &sctx, &cctx, cert, privkey)) in test_servername()
8617 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_servername()
8655 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_servername()
8731 SSL_CTX_free(cctx); in test_servername()
8750 SSL_CTX *cctx = NULL, *sctx = NULL; in test_sigalgs_available() local
8794 cctx = SSL_CTX_new_ex(clientctx, NULL, TLS_client_method()); in test_sigalgs_available()
8796 if (!TEST_ptr(cctx) || !TEST_ptr(sctx)) in test_sigalgs_available()
8804 &sctx, &cctx, cert, privkey))) in test_sigalgs_available()
8811 &sctx, &cctx, cert2, privkey2))) in test_sigalgs_available()
8817 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_sigalgs_available()
8821 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_sigalgs_available()
8827 if (!SSL_CTX_set1_sigalgs_list(cctx, in test_sigalgs_available()
8835 if (!SSL_CTX_set1_sigalgs_list(cctx, "rsa_pss_rsae_sha256:ECDSA+SHA256") in test_sigalgs_available()
8850 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_sigalgs_available()
8876 SSL_CTX_free(cctx); in test_sigalgs_available()
8891 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pluggable_group() local
8915 &sctx, &cctx, cert, privkey)) in test_pluggable_group()
8916 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_pluggable_group()
8937 SSL_CTX_free(cctx); in test_pluggable_group()
8948 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_dup() local
8957 &sctx, &cctx, cert, privkey))) in test_ssl_dup()
8960 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_dup()
9008 SSL_CTX_free(cctx); in test_ssl_dup()
9111 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_tmp_dh() local
9142 &sctx, &cctx, cert, privkey))) in test_set_tmp_dh()
9164 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_set_tmp_dh()
9208 SSL_CTX_free(cctx); in test_set_tmp_dh()
9219 SSL_CTX *cctx = SSL_CTX_new_ex(libctx, NULL, TLS_client_method()); in test_dh_auto() local
9228 if (!TEST_ptr(sctx) || !TEST_ptr(cctx)) in test_dh_auto()
9242 SSL_CTX_set_security_level(cctx, 1); in test_dh_auto()
9288 &sctx, &cctx, thiscert, thiskey))) in test_dh_auto()
9291 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_dh_auto()
9325 SSL_CTX_free(cctx); in test_dh_auto()
9342 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_sni_tls13() local
9356 &sctx2, &cctx, cert, privkey))) in test_sni_tls13()
9368 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_sni_tls13()
9385 SSL_CTX_free(cctx); in test_sni_tls13()