• Home
  • Raw
  • Download

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()
956 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_large_message() local
976 max_version, &sctx, &cctx, cert, in execute_test_large_message()
987 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in execute_test_large_message()
998 SSL_CTX_set_read_ahead(cctx, 1); in execute_test_large_message()
1020 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in execute_test_large_message()
1040 SSL_CTX_free(cctx); in execute_test_large_message()
1155 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_ktls() local
1179 &sctx, &cctx, cert, privkey))) in execute_test_ktls()
1183 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, cipher)) in execute_test_ktls()
1187 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipher)) in execute_test_ktls()
1192 if (!TEST_true(create_ssl_objects2(sctx, cctx, &serverssl, in execute_test_ktls()
1272 SSL_CTX_free(cctx); in execute_test_ktls()
1287 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_ktls_sendfile() local
1318 &sctx, &cctx, cert, privkey))) in execute_test_ktls_sendfile()
1322 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, cipher)) in execute_test_ktls_sendfile()
1326 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipher)) in execute_test_ktls_sendfile()
1331 if (!TEST_true(create_ssl_objects2(sctx, cctx, &serverssl, in execute_test_ktls_sendfile()
1403 SSL_CTX_free(cctx); in execute_test_ktls_sendfile()
1521 SSL_CTX *cctx = NULL, *sctx = NULL; in test_large_app_data() local
1610 &sctx, &cctx, cert, privkey))) in test_large_app_data()
1615 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "DEFAULT:@SECLEVEL=0")) in test_large_app_data()
1621 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_large_app_data()
1668 SSL_CTX_free(cctx); in test_large_app_data()
1677 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_cleanse_plaintext() local
1689 &sctx, &cctx, cert, in execute_cleanse_plaintext()
1707 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in execute_cleanse_plaintext()
1713 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in execute_cleanse_plaintext()
1771 SSL_CTX_free(cctx); in execute_cleanse_plaintext()
1858 SSL_CTX *cctx = NULL, *sctx = NULL; in test_tlsext_status_type() local
1867 &sctx, &cctx, cert, privkey)) in test_tlsext_status_type()
1870 if (SSL_CTX_get_tlsext_status_type(cctx) != -1) in test_tlsext_status_type()
1875 clientssl = SSL_new(cctx); in test_tlsext_status_type()
1886 if (!SSL_CTX_set_tlsext_status_type(cctx, TLSEXT_STATUSTYPE_ocsp) in test_tlsext_status_type()
1887 || SSL_CTX_get_tlsext_status_type(cctx) != TLSEXT_STATUSTYPE_ocsp) in test_tlsext_status_type()
1890 clientssl = SSL_new(cctx); in test_tlsext_status_type()
1900 SSL_CTX_set_tlsext_status_cb(cctx, ocsp_client_cb); in test_tlsext_status_type()
1901 SSL_CTX_set_tlsext_status_arg(cctx, &cdummyarg); in test_tlsext_status_type()
1904 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1920 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1940 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1976 SSL_CTX_free(cctx); in test_tlsext_status_type()
2019 SSL_CTX *sctx = NULL, *cctx = NULL; in execute_test_session() local
2036 &sctx, &cctx, cert, privkey))) in execute_test_session()
2043 SSL_CTX_set_min_proto_version(cctx, maxprot); in execute_test_session()
2044 SSL_CTX_set_max_proto_version(cctx, maxprot); in execute_test_session()
2048 SSL_CTX_sess_set_new_cb(cctx, new_session_cb); in execute_test_session()
2049 SSL_CTX_sess_set_remove_cb(cctx, remove_session_cb); in execute_test_session()
2053 SSL_CTX_set_session_cache_mode(cctx, SSL_SESS_CACHE_CLIENT); in execute_test_session()
2055 SSL_CTX_set_session_cache_mode(cctx, in execute_test_session()
2064 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl1, &clientssl1, in execute_test_session()
2072 if (use_int_cache && !TEST_false(SSL_CTX_add_session(cctx, sess1))) in execute_test_session()
2081 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
2117 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
2146 if (!TEST_true(SSL_CTX_add_session(cctx, sess2)) in execute_test_session()
2147 || !TEST_true(SSL_CTX_remove_session(cctx, sess2))) in execute_test_session()
2153 if (!TEST_false(SSL_CTX_remove_session(cctx, sess2))) in execute_test_session()
2164 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl3, in execute_test_session()
2178 if (use_int_cache && !TEST_true(SSL_CTX_add_session(cctx, sess2))) in execute_test_session()
2184 SSL_CTX_sess_set_new_cb(cctx, NULL); in execute_test_session()
2185 SSL_CTX_sess_set_remove_cb(cctx, NULL); in execute_test_session()
2192 SSL_CTX_set_session_cache_mode(cctx, 0); in execute_test_session()
2214 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl1, &clientssl1, in execute_test_session()
2264 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
2327 SSL_CTX_free(cctx); in execute_test_session()
2424 SSL_CTX **cctx) in setup_ticket_test() argument
2430 sctx, cctx, cert, privkey)) in setup_ticket_test()
2440 SSL_CTX_set_session_cache_mode(*cctx, SSL_SESS_CACHE_CLIENT in setup_ticket_test()
2442 SSL_CTX_sess_set_new_cb(*cctx, new_cachesession_cb); in setup_ticket_test()
2447 static int check_resumption(int idx, SSL_CTX *sctx, SSL_CTX *cctx, int succ) in check_resumption() argument
2455 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in check_resumption()
2506 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tickets() local
2516 if (!setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_tickets()
2519 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tickets()
2534 SSL_CTX_free(cctx); in test_tickets()
2536 sctx = cctx = NULL; in test_tickets()
2547 if (!setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_tickets()
2550 if (!check_resumption(idx, sctx, cctx, 0)) in test_tickets()
2557 SSL_CTX_free(cctx); in test_tickets()
2558 sctx = cctx = NULL; in test_tickets()
2560 if (!setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_tickets()
2563 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tickets()
2593 if (!check_resumption(idx, sctx, cctx, 1)) in test_tickets()
2606 SSL_CTX_free(cctx); in test_tickets()
2623 SSL_CTX *sctx = NULL, *cctx = NULL; in test_psk_tickets() local
2630 &sctx, &cctx, NULL, NULL)) in test_psk_tickets()
2636 SSL_CTX_set_session_cache_mode(cctx, SSL_SESS_CACHE_CLIENT in test_psk_tickets()
2638 SSL_CTX_set_psk_use_session_callback(cctx, use_session_cb); in test_psk_tickets()
2640 SSL_CTX_sess_set_new_cb(cctx, new_session_cb); in test_psk_tickets()
2646 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_psk_tickets()
2668 SSL_CTX_free(cctx); in test_psk_tickets()
2678 SSL_CTX *sctx = NULL, *cctx = NULL; in test_extra_tickets() local
2695 if (!TEST_ptr(bretry) || !setup_ticket_test(stateful, idx, &sctx, &cctx)) in test_extra_tickets()
2699 SSL_CTX_sess_set_new_cb(cctx, new_session_cb); in test_extra_tickets()
2701 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_extra_tickets()
2832 SSL_CTX_free(cctx); in test_extra_tickets()
2834 sctx = cctx = NULL; in test_extra_tickets()
2889 SSL_CTX *sctx = NULL, *cctx = NULL; in test_ssl_set_bio() local
2918 &sctx, &cctx, cert, privkey))) in test_ssl_set_bio()
2929 SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION); in test_ssl_set_bio()
2932 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_set_bio()
3007 SSL_CTX_free(cctx); in test_ssl_set_bio()
3127 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_sigalgs() local
3143 &sctx, &cctx, cert, privkey))) in test_set_sigalgs()
3146 SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION); in test_set_sigalgs()
3152 ret = SSL_CTX_set1_sigalgs(cctx, curr->list, curr->listlen); in test_set_sigalgs()
3154 ret = SSL_CTX_set1_sigalgs_list(cctx, curr->liststr); in test_set_sigalgs()
3169 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_set_sigalgs()
3202 SSL_CTX_free(cctx); in test_set_sigalgs()
3385 static int setupearly_data_test(SSL_CTX **cctx, SSL_CTX **sctx, SSL **clientssl, in setupearly_data_test() argument
3393 sctx, cctx, cert, privkey))) in setupearly_data_test()
3401 SSL_CTX_set_read_ahead(*cctx, 1); in setupearly_data_test()
3405 SSL_CTX_set_psk_use_session_callback(*cctx, use_session_cb); in setupearly_data_test()
3412 if (!TEST_true(create_ssl_objects(*sctx, *cctx, serverssl, clientssl, in setupearly_data_test()
3468 if (!TEST_true(create_ssl_objects(*sctx, *cctx, serverssl, in setupearly_data_test()
3478 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_read_write() local
3486 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_read_write()
3633 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_early_data_read_write()
3680 SSL_CTX_free(cctx); in test_early_data_read_write()
3709 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_replay_int() local
3720 &sctx, &cctx, cert, privkey))) in test_early_data_replay_int()
3744 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_replay_int()
3763 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_early_data_replay_int()
3820 SSL_CTX_free(cctx); in test_early_data_replay_int()
3856 SSL_CTX *cctx = NULL, *sctx = NULL; in early_data_skip_helper() local
3869 &sctx, &cctx, cert, privkey))) in early_data_skip_helper()
3874 SSL_CTX_set_security_level(cctx, 0); in early_data_skip_helper()
3878 || !TEST_true(SSL_CTX_set_ciphersuites(cctx, ciphersuites[cipher]))) in early_data_skip_helper()
3881 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in early_data_skip_helper()
4024 SSL_CTX_free(cctx); in early_data_skip_helper()
4079 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_not_sent() local
4086 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_not_sent()
4130 SSL_CTX_free(cctx); in test_early_data_not_sent()
4162 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_psk() local
4181 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_psk()
4330 SSL_CTX_free(cctx); in test_early_data_psk()
4344 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_psk_with_all_ciphers() local
4381 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_psk_with_all_ciphers()
4438 SSL_CTX_free(cctx); in test_early_data_psk_with_all_ciphers()
4448 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_not_expected() local
4455 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_not_expected()
4497 SSL_CTX_free(cctx); in test_early_data_not_expected()
4509 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_tls1_2() local
4515 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_tls1_2()
4571 SSL_CTX_free(cctx); in test_early_data_tls1_2()
4593 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_ciphersuite() local
4599 &sctx, &cctx, cert, privkey)) in test_set_ciphersuite()
4606 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "AES256-GCM-SHA384"))) in test_set_ciphersuite()
4612 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_set_ciphersuite()
4617 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_set_ciphersuite()
4622 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_set_ciphersuite()
4653 SSL_CTX_free(cctx); in test_set_ciphersuite()
4660 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ciphersuite_change() local
4669 &sctx, &cctx, cert, privkey)) in test_ciphersuite_change()
4674 || !TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
4676 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
4692 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
4694 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
4714 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, "TLS_AES_256_GCM_SHA384")) in test_ciphersuite_change()
4715 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
4732 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, "TLS_AES_256_GCM_SHA384")) in test_ciphersuite_change()
4733 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
4746 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
4750 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
4784 SSL_CTX_free(cctx); in test_ciphersuite_change()
4816 SSL_CTX *sctx = NULL, *cctx = NULL; in test_key_exchange() local
4898 max_version, &sctx, &cctx, cert, in test_key_exchange()
4906 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_key_exchange()
4921 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_key_exchange()
4927 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_exchange()
4964 SSL_CTX_free(cctx); in test_key_exchange()
5040 SSL_CTX *sctx = NULL, *cctx = NULL; in test_negotiated_group() local
5073 max_version, &sctx, &cctx, cert, in test_negotiated_group()
5086 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_negotiated_group()
5091 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_negotiated_group()
5117 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_negotiated_group()
5163 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_negotiated_group()
5184 SSL_CTX_free(cctx); in test_negotiated_group()
5199 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tls13_ciphersuite() local
5254 &sctx, &cctx, cert, privkey))) in test_tls13_ciphersuite()
5259 || !TEST_true(SSL_CTX_set_ciphersuites(cctx, t13_cipher))) in test_tls13_ciphersuite()
5263 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_tls13_ciphersuite()
5269 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tls13_ciphersuite()
5318 SSL_CTX_free(cctx); in test_tls13_ciphersuite()
5319 cctx = NULL; in test_tls13_ciphersuite()
5328 SSL_CTX_free(cctx); in test_tls13_ciphersuite()
5341 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tls13_psk() local
5354 &sctx, &cctx, idx == 3 ? NULL : cert, in test_tls13_psk()
5365 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_tls13_psk()
5374 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_tls13_psk()
5386 SSL_CTX_set_psk_use_session_callback(cctx, use_session_cb); in test_tls13_psk()
5391 SSL_CTX_set_psk_client_callback(cctx, psk_client_cb); in test_tls13_psk()
5406 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5437 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5480 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5527 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
5565 SSL_CTX_free(cctx); in test_tls13_psk()
5611 SSL_CTX *sctx = NULL, *cctx = NULL; in test_stateless() local
5617 &sctx, &cctx, cert, privkey))) in test_stateless()
5621 SSL_CTX_clear_options(cctx, SSL_OP_ENABLE_MIDDLEBOX_COMPAT); in test_stateless()
5623 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
5647 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
5664 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
5689 SSL_CTX_free(cctx); in test_stateless()
5826 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_custom_exts() local
5847 &sctx, &cctx, cert, privkey))) in test_custom_exts()
5858 SSL_CTX_set_options(cctx, SSL_OP_NO_TLSv1_3); in test_custom_exts()
5870 if (!TEST_int_eq(SSL_CTX_use_certificate_file(cctx, cert, in test_custom_exts()
5872 || !TEST_int_eq(SSL_CTX_use_PrivateKey_file(cctx, privkey, in test_custom_exts()
5874 || !TEST_int_eq(SSL_CTX_check_private_key(cctx), 1)) in test_custom_exts()
5891 if (!TEST_true(SSL_CTX_add_client_custom_ext(cctx, TEST_EXT_TYPE1, in test_custom_exts()
5897 if (!TEST_true(SSL_CTX_add_custom_ext(cctx, TEST_EXT_TYPE1, context, in test_custom_exts()
5904 if (!TEST_false(SSL_CTX_add_client_custom_ext(cctx, TEST_EXT_TYPE1, in test_custom_exts()
5908 || !TEST_false(SSL_CTX_add_custom_ext(cctx, TEST_EXT_TYPE1, in test_custom_exts()
5952 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_custom_exts()
6000 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_custom_exts()
6045 SSL_CTX_free(cctx); in test_custom_exts()
6096 SSL_CTX *sctx = NULL, *cctx = NULL; in test_serverinfo_custom() local
6143 &sctx, &cctx, cert, privkey))) in test_serverinfo_custom()
6155 if (!TEST_true(SSL_CTX_add_custom_ext(cctx, TLSEXT_TYPE_signed_certificate_timestamp, in test_serverinfo_custom()
6160 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_serverinfo_custom()
6176 SSL_CTX_free(cctx); in test_serverinfo_custom()
6192 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_export_key_mat() local
6229 &sctx, &cctx, cert, privkey))) in test_export_key_mat()
6233 SSL_CTX_set_max_proto_version(cctx, protocols[tst]); in test_export_key_mat()
6234 SSL_CTX_set_min_proto_version(cctx, protocols[tst]); in test_export_key_mat()
6236 (!SSL_CTX_set_cipher_list(cctx, "DEFAULT:@SECLEVEL=0") in test_export_key_mat()
6240 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_export_key_mat()
6344 SSL_CTX_free(cctx); in test_export_key_mat()
6361 SSL_CTX *cctx = NULL, *sctx = NULL; in test_export_key_mat_early() local
6370 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, &serverssl, in test_export_key_mat_early()
6422 SSL_CTX_free(cctx); in test_export_key_mat_early()
6433 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update() local
6443 &sctx, &cctx, cert, privkey)) in test_key_update()
6444 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update()
6479 SSL_CTX_free(cctx); in test_key_update()
6492 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_peer_in_write() local
6506 &sctx, &cctx, cert, privkey)) in test_key_update_peer_in_write()
6507 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_peer_in_write()
6562 SSL_CTX_free(cctx); in test_key_update_peer_in_write()
6578 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_peer_in_read() local
6590 &sctx, &cctx, cert, privkey)) in test_key_update_peer_in_read()
6591 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_peer_in_read()
6648 SSL_CTX_free(cctx); in test_key_update_peer_in_read()
6661 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_local_in_write() local
6675 &sctx, &cctx, cert, privkey)) in test_key_update_local_in_write()
6676 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_local_in_write()
6737 SSL_CTX_free(cctx); in test_key_update_local_in_write()
6752 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_local_in_read() local
6764 &sctx, &cctx, cert, privkey)) in test_key_update_local_in_read()
6765 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_local_in_read()
6822 SSL_CTX_free(cctx); in test_key_update_local_in_read()
6830 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_clear() local
6842 &sctx, &cctx, cert, privkey)) in test_ssl_clear()
6844 && !TEST_true(SSL_CTX_set_max_proto_version(cctx, in test_ssl_clear()
6846 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ssl_clear()
6861 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_clear()
6877 SSL_CTX_free(cctx); in test_ssl_clear()
6997 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pha_key_update() local
7003 &sctx, &cctx, cert, privkey))) in test_pha_key_update()
7008 || !TEST_true(SSL_CTX_set_min_proto_version(cctx, TLS1_3_VERSION)) in test_pha_key_update()
7009 || !TEST_true(SSL_CTX_set_max_proto_version(cctx, TLS1_3_VERSION))) in test_pha_key_update()
7012 SSL_CTX_set_post_handshake_auth(cctx, 1); in test_pha_key_update()
7014 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_pha_key_update()
7047 SSL_CTX_free(cctx); in test_pha_key_update()
7201 SSL_CTX *cctx = NULL, *sctx = NULL; in test_srp() local
7226 &sctx, &cctx, cert, privkey))) in test_srp()
7230 || !TEST_true(SSL_CTX_set_cipher_list(cctx, "SRP-AES-128-CBC-SHA")) in test_srp()
7232 || !TEST_true(SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION)) in test_srp()
7233 || !TEST_int_gt(SSL_CTX_set_srp_username(cctx, userid), 0)) in test_srp()
7237 if (!TEST_int_gt(SSL_CTX_set_srp_password(cctx, "badpass"), 0)) in test_srp()
7240 if (!TEST_int_gt(SSL_CTX_set_srp_password(cctx, password), 0)) in test_srp()
7244 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_srp()
7265 SSL_CTX_free(cctx); in test_srp()
7421 SSL_CTX *cctx = NULL, *sctx = NULL; in test_info_callback() local
7455 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_info_callback()
7488 tlsvers, tlsvers, &sctx, &cctx, cert, in test_info_callback()
7499 SSL_CTX_set_info_callback((tst % 2) == 0 ? sctx : cctx, in test_info_callback()
7502 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_info_callback()
7519 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_info_callback()
7535 SSL_CTX_free(cctx); in test_info_callback()
7541 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_pending() local
7552 &sctx, &cctx, cert, privkey))) in test_ssl_pending()
7559 &sctx, &cctx, cert, privkey))) in test_ssl_pending()
7573 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_ssl_pending()
7582 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_pending()
7606 SSL_CTX_free(cctx); in test_ssl_pending()
7698 SSL_CTX *cctx = NULL, *sctx = NULL; in int_test_ssl_get_shared_ciphers() local
7715 cctx = SSL_CTX_new_ex(tmplibctx, NULL, TLS_client_method()); in int_test_ssl_get_shared_ciphers()
7716 if (!TEST_ptr(cctx)) in int_test_ssl_get_shared_ciphers()
7728 &sctx, &cctx, cert, privkey))) in int_test_ssl_get_shared_ciphers()
7731 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in int_test_ssl_get_shared_ciphers()
7734 && !TEST_true(SSL_CTX_set_ciphersuites(cctx, in int_test_ssl_get_shared_ciphers()
7744 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in int_test_ssl_get_shared_ciphers()
7766 SSL_CTX_free(cctx); in int_test_ssl_get_shared_ciphers()
7941 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ticket_callbacks() local
8001 &sctx, &cctx, cert, privkey))) in test_ticket_callbacks()
8025 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ticket_callbacks()
8052 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_ticket_callbacks()
8085 SSL_CTX_free(cctx); in test_ticket_callbacks()
8101 SSL_CTX *cctx = NULL, *sctx = NULL; in test_incorrect_shutdown() local
8109 &sctx, &cctx, cert, privkey))) in test_incorrect_shutdown()
8115 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_incorrect_shutdown()
8140 SSL_CTX_free(cctx); in test_incorrect_shutdown()
8160 SSL_CTX *cctx = NULL, *sctx = NULL; in test_shutdown() local
8182 &sctx, &cctx, cert, privkey))) in test_shutdown()
8186 SSL_CTX_set_post_handshake_auth(cctx, 1); in test_shutdown()
8188 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_shutdown()
8302 SSL_CTX_free(cctx); in test_shutdown()
8411 SSL_CTX *cctx = NULL, *sctx = NULL, *snictx = NULL; in test_cert_cb_int() local
8425 &sctx, &cctx, NULL, NULL))) in test_cert_cb_int()
8443 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_cert_cb_int()
8478 SSL_CTX_free(cctx); in test_cert_cb_int()
8537 SSL_CTX *cctx = NULL, *sctx = NULL; in test_client_cert_cb() local
8555 &sctx, &cctx, cert, privkey))) in test_client_cert_cb()
8562 SSL_CTX_set_client_cert_cb(cctx, client_cert_cb); in test_client_cert_cb()
8567 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_client_cert_cb()
8579 SSL_CTX_free(cctx); in test_client_cert_cb()
8594 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ca_names_int() local
8618 &sctx, &cctx, cert, privkey))) in test_ca_names_int()
8633 SSL_CTX_set0_CA_list(cctx, sk2); in test_ca_names_int()
8646 SSL_CTX_set_client_CA_list(cctx, sk2); in test_ca_names_int()
8650 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ca_names_int()
8694 SSL_CTX_free(cctx); in test_ca_names_int()
8744 SSL_CTX *cctx = NULL, *sctx = NULL; in test_multiblock_write() local
8773 max_version, &sctx, &cctx, cert, in test_multiblock_write()
8780 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_multiblock_write()
8786 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, cipherlist))) in test_multiblock_write()
8811 SSL_CTX_free(cctx); in test_multiblock_write()
8950 SSL_CTX *sctx = NULL, *cctx = NULL; in test_session_cache_overflow() local
8970 &sctx, &cctx, cert, privkey)) in test_session_cache_overflow()
8979 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_session_cache_overflow()
9013 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_session_cache_overflow()
9037 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_session_cache_overflow()
9053 SSL_CTX_free(cctx); in test_session_cache_overflow()
9074 SSL_CTX *cctx = NULL, *sctx = NULL; in test_servername() local
9094 &sctx, &cctx, cert, privkey)) in test_servername()
9095 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_servername()
9133 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_servername()
9209 SSL_CTX_free(cctx); in test_servername()
9228 SSL_CTX *cctx = NULL, *sctx = NULL; in test_sigalgs_available() local
9272 cctx = SSL_CTX_new_ex(clientctx, NULL, TLS_client_method()); in test_sigalgs_available()
9274 if (!TEST_ptr(cctx) || !TEST_ptr(sctx)) in test_sigalgs_available()
9282 &sctx, &cctx, cert, privkey))) in test_sigalgs_available()
9289 &sctx, &cctx, cert2, privkey2))) in test_sigalgs_available()
9295 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_sigalgs_available()
9299 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_sigalgs_available()
9305 if (!SSL_CTX_set1_sigalgs_list(cctx, in test_sigalgs_available()
9313 if (!SSL_CTX_set1_sigalgs_list(cctx, "rsa_pss_rsae_sha256:ECDSA+SHA256") in test_sigalgs_available()
9328 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_sigalgs_available()
9354 SSL_CTX_free(cctx); in test_sigalgs_available()
9369 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pluggable_group() local
9393 &sctx, &cctx, cert, privkey)) in test_pluggable_group()
9394 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_pluggable_group()
9415 SSL_CTX_free(cctx); in test_pluggable_group()
9426 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_dup() local
9435 &sctx, &cctx, cert, privkey))) in test_ssl_dup()
9438 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_dup()
9486 SSL_CTX_free(cctx); in test_ssl_dup()
9589 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_tmp_dh() local
9620 &sctx, &cctx, cert, privkey))) in test_set_tmp_dh()
9642 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_set_tmp_dh()
9686 SSL_CTX_free(cctx); in test_set_tmp_dh()
9697 SSL_CTX *cctx = NULL, *sctx = NULL; in test_dh_auto() local
9756 &sctx, &cctx, thiscert, thiskey))) in test_dh_auto()
9759 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_dh_auto()
9793 SSL_CTX_free(cctx); in test_dh_auto()
9810 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_sni_tls13() local
9824 &sctx2, &cctx, cert, privkey))) in test_sni_tls13()
9836 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_sni_tls13()
9853 SSL_CTX_free(cctx); in test_sni_tls13()
9864 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ticket_lifetime() local
9882 &sctx, &cctx, cert, privkey))) in test_ticket_lifetime()
9885 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ticket_lifetime()
9915 SSL_CTX_free(cctx); in test_ticket_lifetime()
10204 SSL_CONF_CTX *cctx = NULL; in test_load_dhfile() local
10210 || !TEST_ptr(cctx = SSL_CONF_CTX_new())) in test_load_dhfile()
10213 SSL_CONF_CTX_set_ssl_ctx(cctx, ctx); in test_load_dhfile()
10214 SSL_CONF_CTX_set_flags(cctx, in test_load_dhfile()
10219 if (!TEST_int_eq(SSL_CONF_cmd(cctx, "DHParameters", dhfile), 2)) in test_load_dhfile()
10224 SSL_CONF_CTX_free(cctx); in test_load_dhfile()
10252 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pipelining() local
10276 TLS1_2_VERSION, &sctx, &cctx, cert, in test_pipelining()
10280 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_pipelining()
10414 SSL_CTX_free(cctx); in test_pipelining()
10427 SSL_CTX *cctx; member
10451 if (!TEST_true(create_ssl_objects(cbdata->sctx, cbdata->cctx, &serverssl, in resume_servername_cb()
10485 SSL_CTX *sctx = NULL, *cctx = NULL; in test_multi_resume() local
10506 max_version, &sctx, &cctx, cert, in test_multi_resume()
10526 cbdata.cctx = cctx; in test_multi_resume()
10532 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_multi_resume()
10592 SSL_CTX_free(cctx); in test_multi_resume()