Lines Matching refs:NULL

64 static OSSL_LIB_CTX *libctx = NULL;
65 static OSSL_PROVIDER *defctxnull = NULL;
69 static SSL_SESSION *clientpsk = NULL;
70 static SSL_SESSION *serverpsk = NULL;
83 static char *certsdir = NULL;
84 static char *cert = NULL;
85 static char *privkey = NULL;
86 static char *cert2 = NULL;
87 static char *privkey2 = NULL;
88 static char *cert1024 = NULL;
89 static char *privkey1024 = NULL;
90 static char *cert3072 = NULL;
91 static char *privkey3072 = NULL;
92 static char *cert4096 = NULL;
93 static char *privkey4096 = NULL;
94 static char *cert8192 = NULL;
95 static char *privkey8192 = NULL;
96 static char *srpvfile = NULL;
97 static char *tmpfilename = NULL;
98 static char *dhfile = NULL;
116 static X509 *ocspcert = NULL;
142 if (hostname != NULL && (strcmp(hostname, "goodhost") == 0 in hostname_cb()
206 char *token = NULL; in test_keylog_output()
221 for (token = strtok(buffer, " \n"); token != NULL; in test_keylog_output()
222 token = strtok(NULL, " \n")) { in test_keylog_output()
229 if (!TEST_ptr(token = strtok(NULL, " \n"))) in test_keylog_output()
233 if (!TEST_ptr(token = strtok(NULL, " \n"))) in test_keylog_output()
252 if (!TEST_ptr(token = strtok(NULL, " \n"))) in test_keylog_output()
261 if (!TEST_ptr(token = strtok(NULL, " \n"))) in test_keylog_output()
307 if (!TEST_ptr(token = strtok(NULL, " \n"))) in test_keylog_output()
316 if (!TEST_ptr(token = strtok(NULL, " \n"))) in test_keylog_output()
350 SSL_CTX *cctx = NULL, *sctx = NULL; in test_keylog()
351 SSL *clientssl = NULL, *serverssl = NULL; in test_keylog()
377 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL) in test_keylog()
378 || !TEST_true(SSL_CTX_get_keylog_callback(sctx) == NULL)) in test_keylog()
391 &clientssl, NULL, NULL)) in test_keylog()
431 SSL_CTX *cctx = NULL, *sctx = NULL; in test_keylog_no_master_key()
432 SSL *clientssl = NULL, *serverssl = NULL; in test_keylog_no_master_key()
433 SSL_SESSION *sess = NULL; in test_keylog_no_master_key()
454 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL) in test_keylog_no_master_key()
455 || !TEST_true(SSL_CTX_get_keylog_callback(sctx) == NULL)) in test_keylog_no_master_key()
470 &clientssl, NULL, NULL)) in test_keylog_no_master_key()
499 serverssl = clientssl = NULL; in test_keylog_no_master_key()
508 &clientssl, NULL, NULL)) in test_keylog_no_master_key()
511 || !TEST_true(SSL_write_early_data(clientssl, NULL, 0, &written)) in test_keylog_no_master_key()
553 || (ssl = X509_STORE_CTX_get_ex_data(ctx, idx)) == NULL) in verify_retry_cb()
572 X509 *crt1 = NULL, *crt2 = NULL; in test_client_cert_verify_cb()
574 SSL_CTX *cctx = NULL, *sctx = NULL; in test_client_cert_verify_cb()
575 SSL *clientssl = NULL, *serverssl = NULL; in test_client_cert_verify_cb()
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()
592 &clientssl, NULL, NULL))) in test_client_cert_verify_cb()
608 crt1 = NULL; in test_client_cert_verify_cb()
611 crt2 = NULL; in test_client_cert_verify_cb()
623 if (clientssl != NULL) { in test_client_cert_verify_cb()
627 if (serverssl != NULL) { in test_client_cert_verify_cb()
646 SSL_CTX *ssl_ctx = NULL; in test_ssl_build_cert_chain()
647 SSL *ssl = NULL; in test_ssl_build_cert_chain()
651 if (!TEST_ptr(ssl_ctx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method()))) in test_ssl_build_cert_chain()
686 SSL_CTX *ctx = NULL; in test_ssl_ctx_build_cert_chain()
690 if (!TEST_ptr(ctx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method()))) in test_ssl_ctx_build_cert_chain()
754 SSL_CTX *cctx = NULL, *sctx = NULL; in test_client_hello_cb()
755 SSL *clientssl = NULL, *serverssl = NULL; in test_client_hello_cb()
770 &clientssl, NULL, NULL)) in test_client_hello_cb()
796 SSL_CTX *cctx = NULL, *sctx = NULL; in test_no_ems()
797 SSL *clientssl = NULL, *serverssl = NULL; in test_no_ems()
809 if (!create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, NULL)) { in test_no_ems()
853 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ccs_change_cipher()
854 SSL *clientssl = NULL, *serverssl = NULL; in test_ccs_change_cipher()
855 SSL_SESSION *sess = NULL, *sesspre, *sesspost; in test_ccs_change_cipher()
871 NULL, NULL)) in test_ccs_change_cipher()
880 serverssl = clientssl = NULL; in test_ccs_change_cipher()
885 NULL, NULL)) in test_ccs_change_cipher()
898 serverssl = clientssl = NULL; in test_ccs_change_cipher()
905 NULL, NULL)) in test_ccs_change_cipher()
942 serverssl = clientssl = NULL; in test_ccs_change_cipher()
962 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_large_message()
963 SSL *clientssl = NULL, *serverssl = NULL; in execute_test_large_message()
996 NULL, NULL)) in execute_test_large_message()
1133 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_ktls()
1134 SSL *clientssl = NULL, *serverssl = NULL; in execute_test_ktls()
1139 unsigned char *buf = NULL; in execute_test_ktls()
1144 if (!TEST_true(create_test_sockets(&cfd, &sfd, SOCK_STREAM, NULL))) in execute_test_ktls()
1153 if (is_fips && strstr(cipher, "CHACHA") != NULL) { in execute_test_ktls()
1291 serverssl = clientssl = NULL; in execute_test_ktls()
1306 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_test_ktls_sendfile()
1307 SSL *clientssl = NULL, *serverssl = NULL; in execute_test_ktls_sendfile()
1309 BIO *out = NULL, *in = NULL; in execute_test_ktls_sendfile()
1320 || !TEST_true(create_test_sockets(&cfd, &sfd, SOCK_STREAM, NULL))) in execute_test_ktls_sendfile()
1329 if (is_fips && strstr(cipher, "CHACHA") != NULL) { in execute_test_ktls_sendfile()
1389 out = NULL; in execute_test_ktls_sendfile()
1433 serverssl = clientssl = NULL; in execute_test_ktls_sendfile()
1551 SSL_CTX *cctx = NULL, *sctx = NULL; in test_large_app_data()
1552 SSL *clientssl = NULL, *serverssl = NULL; in test_large_app_data()
1554 unsigned char *msg, *buf = NULL; in test_large_app_data()
1654 &clientssl, NULL, NULL))) in test_large_app_data()
1711 SSL_CTX *cctx = NULL, *sctx = NULL; in execute_cleanse_plaintext()
1712 SSL *clientssl = NULL, *serverssl = NULL; in execute_cleanse_plaintext()
1747 NULL, NULL))) in execute_cleanse_plaintext()
1850 unsigned char *copy = NULL; in ocsp_server_cb()
1851 STACK_OF(OCSP_RESPID) *ids = NULL; in ocsp_server_cb()
1852 OCSP_RESPID *id = NULL; in ocsp_server_cb()
1857 if (ids == NULL || sk_OCSP_RESPID_num(ids) != 1) in ocsp_server_cb()
1861 if (id == NULL || !OCSP_RESPID_match_ex(id, ocspcert, libctx, NULL)) in ocsp_server_cb()
1898 SSL_CTX *cctx = NULL, *sctx = NULL; in test_tlsext_status_type()
1899 SSL *clientssl = NULL, *serverssl = NULL; in test_tlsext_status_type()
1901 STACK_OF(OCSP_RESPID) *ids = NULL; in test_tlsext_status_type()
1902 OCSP_RESPID *id = NULL; in test_tlsext_status_type()
1903 BIO *certbio = NULL; in test_tlsext_status_type()
1926 clientssl = NULL; in test_tlsext_status_type()
1938 clientssl = NULL; in test_tlsext_status_type()
1949 &clientssl, NULL, NULL)) in test_tlsext_status_type()
1957 serverssl = NULL; in test_tlsext_status_type()
1958 clientssl = NULL; in test_tlsext_status_type()
1965 &clientssl, NULL, NULL)) in test_tlsext_status_type()
1974 serverssl = NULL; in test_tlsext_status_type()
1975 clientssl = NULL; in test_tlsext_status_type()
1985 &clientssl, NULL, NULL))) in test_tlsext_status_type()
1995 || !TEST_ptr(ocspcert = X509_new_ex(libctx, NULL)) in test_tlsext_status_type()
1996 || !TEST_ptr(PEM_read_bio_X509(certbio, &ocspcert, NULL, NULL)) in test_tlsext_status_type()
1997 || !TEST_true(OCSP_RESPID_set_by_key_ex(id, ocspcert, libctx, NULL)) in test_tlsext_status_type()
2000 id = NULL; in test_tlsext_status_type()
2003 ids = NULL; in test_tlsext_status_type()
2006 certbio = NULL; in test_tlsext_status_type()
2025 ocspcert = NULL; in test_tlsext_status_type()
2050 static SSL_SESSION *get_sess_val = NULL;
2063 SSL_CTX *sctx = NULL, *cctx = NULL; in execute_test_session()
2064 SSL *serverssl1 = NULL, *clientssl1 = NULL; in execute_test_session()
2065 SSL *serverssl2 = NULL, *clientssl2 = NULL; in execute_test_session()
2067 SSL *serverssl3 = NULL, *clientssl3 = NULL; in execute_test_session()
2069 SSL_SESSION *sess1 = NULL, *sess2 = NULL; in execute_test_session()
2109 NULL, NULL)) in execute_test_session()
2126 &clientssl2, NULL, NULL)) in execute_test_session()
2158 serverssl2 = clientssl2 = NULL; in execute_test_session()
2162 &clientssl2, NULL, NULL)) in execute_test_session()
2209 &clientssl3, NULL, NULL)) in execute_test_session()
2228 SSL_CTX_sess_set_new_cb(cctx, NULL); in execute_test_session()
2229 SSL_CTX_sess_set_remove_cb(cctx, NULL); in execute_test_session()
2233 get_sess_val = NULL; in execute_test_session()
2245 serverssl1 = clientssl1 = NULL; in execute_test_session()
2248 serverssl2 = clientssl2 = NULL; in execute_test_session()
2250 sess1 = NULL; in execute_test_session()
2252 sess2 = NULL; in execute_test_session()
2259 NULL, NULL)) in execute_test_session()
2297 || !TEST_true(sess2->owner != NULL) in execute_test_session()
2298 || !TEST_true(tmp->owner == NULL) in execute_test_session()
2309 &clientssl2, NULL, NULL)) in execute_test_session()
2452 SSL_set_verify(sssl, SSL_VERIFY_PEER, NULL); in post_handshake_verify()
2458 || !TEST_int_le(SSL_read(cssl, NULL, 0), 0) in post_handshake_verify()
2459 || !TEST_int_le(SSL_read(sssl, NULL, 0), 0) in post_handshake_verify()
2493 SSL *serverssl = NULL, *clientssl = NULL; in check_resumption()
2500 &clientssl, NULL, NULL)) in check_resumption()
2535 serverssl = clientssl = NULL; in check_resumption()
2537 sesscache[i] = NULL; in check_resumption()
2550 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tickets()
2551 SSL *serverssl = NULL, *clientssl = NULL; in test_tickets()
2564 &clientssl, NULL, NULL))) in test_tickets()
2579 clientssl = serverssl = NULL; in test_tickets()
2580 sctx = cctx = NULL; in test_tickets()
2602 sctx = cctx = NULL; in test_tickets()
2608 &clientssl, NULL, NULL))) in test_tickets()
2628 serverssl = clientssl = NULL; in test_tickets()
2647 sesscache[j] = NULL; in test_tickets()
2667 SSL_CTX *sctx = NULL, *cctx = NULL; in test_psk_tickets()
2668 SSL *serverssl = NULL, *clientssl = NULL; in test_psk_tickets()
2674 &sctx, &cctx, NULL, NULL)) in test_psk_tickets()
2691 NULL, NULL))) in test_psk_tickets()
2715 clientpsk = serverpsk = NULL; in test_psk_tickets()
2722 SSL_CTX *sctx = NULL, *cctx = NULL; in test_extra_tickets()
2723 SSL *serverssl = NULL, *clientssl = NULL; in test_extra_tickets()
2725 BIO *tmp = NULL; in test_extra_tickets()
2746 &clientssl, NULL, NULL))) in test_extra_tickets()
2818 tmp = NULL; in test_extra_tickets()
2822 bretry = NULL; in test_extra_tickets()
2829 tmp = NULL; in test_extra_tickets()
2877 clientssl = serverssl = NULL; in test_extra_tickets()
2878 sctx = cctx = NULL; in test_extra_tickets()
2908 *res = NULL; in setupbio()
2933 SSL_CTX *sctx = NULL, *cctx = NULL; in test_ssl_set_bio()
2934 BIO *bio1 = NULL; in test_ssl_set_bio()
2935 BIO *bio2 = NULL; in test_ssl_set_bio()
2936 BIO *irbio = NULL, *iwbio = NULL, *nrbio = NULL, *nwbio = NULL; in test_ssl_set_bio()
2937 SSL *serverssl = NULL, *clientssl = NULL; in test_ssl_set_bio()
2977 NULL, NULL))) in test_ssl_set_bio()
3006 if (irbio != NULL) in test_ssl_set_bio()
3008 if (iwbio != NULL && iwbio != irbio) in test_ssl_set_bio()
3026 if (nrbio != NULL in test_ssl_set_bio()
3030 if (nwbio != NULL in test_ssl_set_bio()
3059 BIO *sslbio = NULL, *membio1 = NULL, *membio2 = NULL; in execute_test_ssl_bio()
3061 SSL *ssl = NULL; in execute_test_ssl_bio()
3064 if (!TEST_ptr(ctx = SSL_CTX_new_ex(libctx, NULL, TLS_method())) in execute_test_ssl_bio()
3080 ssl = NULL; in execute_test_ssl_bio()
3088 ssl = NULL; in execute_test_ssl_bio()
3149 {validlist1, OSSL_NELEM(validlist1), NULL, 1, 1},
3151 {validlist2, OSSL_NELEM(validlist2), NULL, 1, 1},
3152 {validlist3, OSSL_NELEM(validlist3), NULL, 1, 0},
3154 {NULL, 0, "RSA+SHA256", 1, 1},
3155 {NULL, 0, "RSA+SHA256:?Invalid", 1, 1},
3157 {NULL, 0, "RSA+SHA256:ECDSA+SHA512", 1, 1},
3158 {NULL, 0, "ECDSA+SHA512", 1, 0},
3160 {invalidlist1, OSSL_NELEM(invalidlist1), NULL, 0, 0},
3161 {invalidlist2, OSSL_NELEM(invalidlist2), NULL, 0, 0},
3162 {invalidlist3, OSSL_NELEM(invalidlist3), NULL, 0, 0},
3163 {invalidlist4, OSSL_NELEM(invalidlist4), NULL, 0, 0},
3164 {NULL, 0, "RSA", 0, 0},
3165 {NULL, 0, "SHA256", 0, 0},
3166 {NULL, 0, "RSA+SHA256:SHA256", 0, 0},
3167 {NULL, 0, "Invalid", 0, 0}
3172 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_sigalgs()
3173 SSL *clientssl = NULL, *serverssl = NULL; in test_set_sigalgs()
3196 if (curr->list != NULL) in test_set_sigalgs()
3215 &clientssl, NULL, NULL))) in test_set_sigalgs()
3221 if (curr->list != NULL) in test_set_sigalgs()
3263 if (md != NULL) in use_session_cb()
3269 if (md == NULL) in use_session_cb()
3278 if (clientpsk != NULL) in use_session_cb()
3305 if (clientpsk == NULL) in psk_client_cb()
3309 if (SSL_SESSION_get_master_key(clientpsk, NULL, 0) > max_psk_len) in psk_client_cb()
3327 if (serverpsk == NULL) in find_session_cb()
3334 *sess = NULL; in find_session_cb()
3356 if (serverpsk == NULL) in psk_server_cb()
3365 if (SSL_SESSION_get_master_key(serverpsk, NULL, 0) > max_psk_len) in psk_server_cb()
3397 if (sess == NULL) in ed_gen_cb()
3421 if (*sctx == NULL in setupearly_data_test()
3429 SSL_CTX_set_session_ticket_cb(*sctx, ed_gen_cb, NULL, NULL); in setupearly_data_test()
3448 NULL, NULL))) in setupearly_data_test()
3472 clientpsk = NULL; in setupearly_data_test()
3477 if (sess != NULL) { in setupearly_data_test()
3481 clientpsk = serverpsk = NULL; in setupearly_data_test()
3489 if (sess == NULL) in setupearly_data_test()
3501 *serverssl = *clientssl = NULL; in setupearly_data_test()
3512 clientssl, NULL, NULL)) in setupearly_data_test()
3540 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_read_write()
3541 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_read_write()
3543 SSL_SESSION *sess = NULL; in test_early_data_read_write()
3708 serverssl = clientssl = NULL; in test_early_data_read_write()
3710 &clientssl, NULL, NULL)) in test_early_data_read_write()
3752 clientpsk = serverpsk = NULL; in test_early_data_read_write()
3785 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_replay_int()
3786 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_replay_int()
3788 SSL_SESSION *sess = NULL; in test_early_data_replay_int()
3838 serverssl = clientssl = NULL; in test_early_data_replay_int()
3841 &clientssl, NULL, NULL)) in test_early_data_replay_int()
3897 clientpsk = serverpsk = NULL; in test_early_data_replay_int()
3925 NULL,
3943 SSL_CTX *cctx = NULL, *sctx = NULL; in early_data_skip_helper()
3944 SSL *clientssl = NULL, *serverssl = NULL; in early_data_skip_helper()
3946 SSL_SESSION *sess = NULL; in early_data_skip_helper()
3953 if (ciphersuites[cipher] == NULL) in early_data_skip_helper()
3999 if (!TEST_true(SSL_SESSION_set_time_ex(sess, time(NULL) - 20))) in early_data_skip_helper()
4110 clientpsk = serverpsk = NULL; in early_data_skip_helper()
4170 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_not_sent()
4171 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_not_sent()
4173 SSL_SESSION *sess = NULL; in test_early_data_not_sent()
4217 clientpsk = serverpsk = NULL; in test_early_data_not_sent()
4253 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_psk()
4254 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_psk()
4256 SSL_SESSION *sess = NULL; in test_early_data_psk()
4361 SSL_CTX_set_alpn_select_cb(sctx, alpn_select_cb, NULL); in test_early_data_psk()
4378 SSL_CTX_set_alpn_select_cb(sctx, alpn_select_cb, NULL); in test_early_data_psk()
4423 clientpsk = serverpsk = NULL; in test_early_data_psk()
4443 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_psk_with_all_ciphers()
4444 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_psk_with_all_ciphers()
4446 SSL_SESSION *sess = NULL; in test_early_data_psk_with_all_ciphers()
4457 NULL, in test_early_data_psk_with_all_ciphers()
4465 NULL, in test_early_data_psk_with_all_ciphers()
4466 NULL in test_early_data_psk_with_all_ciphers()
4475 NULL, in test_early_data_psk_with_all_ciphers()
4483 NULL, in test_early_data_psk_with_all_ciphers()
4484 NULL in test_early_data_psk_with_all_ciphers()
4488 if (cipher_str[idx] == NULL) in test_early_data_psk_with_all_ciphers()
4561 clientpsk = serverpsk = NULL; in test_early_data_psk_with_all_ciphers()
4562 if (clientssl != NULL) in test_early_data_psk_with_all_ciphers()
4564 if (serverssl != NULL) in test_early_data_psk_with_all_ciphers()
4579 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_not_expected()
4580 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_not_expected()
4582 SSL_SESSION *sess = NULL; in test_early_data_not_expected()
4624 clientpsk = serverpsk = NULL; in test_early_data_not_expected()
4640 SSL_CTX *cctx = NULL, *sctx = NULL; in test_early_data_tls1_2()
4641 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_tls1_2()
4647 &serverssl, NULL, idx, in test_early_data_tls1_2()
4698 clientpsk = serverpsk = NULL; in test_early_data_tls1_2()
4724 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_ciphersuite()
4725 SSL *clientssl = NULL, *serverssl = NULL; in test_set_ciphersuite()
4754 &clientssl, NULL, NULL))) in test_set_ciphersuite()
4791 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ciphersuite_change()
4792 SSL *clientssl = NULL, *serverssl = NULL; in test_ciphersuite_change()
4793 SSL_SESSION *clntsess = NULL; in test_ciphersuite_change()
4795 const SSL_CIPHER *aes_128_gcm_sha256 = NULL; in test_ciphersuite_change()
4810 NULL, NULL)) in test_ciphersuite_change()
4822 serverssl = clientssl = NULL; in test_ciphersuite_change()
4828 &clientssl, NULL, NULL)) in test_ciphersuite_change()
4841 serverssl = clientssl = NULL; in test_ciphersuite_change()
4849 NULL, NULL)) in test_ciphersuite_change()
4857 clntsess = NULL; in test_ciphersuite_change()
4862 serverssl = clientssl = NULL; in test_ciphersuite_change()
4867 &clientssl, NULL, NULL)) in test_ciphersuite_change()
4877 serverssl = clientssl = NULL; in test_ciphersuite_change()
4884 NULL, NULL)) in test_ciphersuite_change()
4953 SSL_CTX *sctx = NULL, *cctx = NULL; in test_key_exchange()
4954 SSL *serverssl = NULL, *clientssl = NULL; in test_key_exchange()
4960 char *kexch_name0 = NULL; in test_key_exchange()
5071 NULL, NULL))) in test_key_exchange()
5186 SSL_CTX *sctx = NULL, *cctx = NULL; in test_negotiated_group()
5187 SSL *serverssl = NULL, *clientssl = NULL; in test_negotiated_group()
5188 SSL_SESSION *origsess = NULL; in test_negotiated_group()
5241 NULL, NULL))) in test_negotiated_group()
5263 serverssl = clientssl = NULL; in test_negotiated_group()
5267 NULL, NULL)) in test_negotiated_group()
5286 serverssl = clientssl = NULL; in test_negotiated_group()
5313 NULL, NULL)) in test_negotiated_group()
5348 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tls13_ciphersuite()
5349 SSL *serverssl = NULL, *clientssl = NULL; in test_tls13_ciphersuite()
5372 const char *t13_cipher = NULL; in test_tls13_ciphersuite()
5373 const char *t12_cipher = NULL; in test_tls13_ciphersuite()
5423 if (t12_cipher != NULL) { in test_tls13_ciphersuite()
5432 &clientssl, NULL, NULL))) in test_tls13_ciphersuite()
5439 if (t12_cipher != NULL) { in test_tls13_ciphersuite()
5469 if (max_ver == TLS1_2_VERSION && t12_cipher != NULL in test_tls13_ciphersuite()
5475 serverssl = NULL; in test_tls13_ciphersuite()
5477 clientssl = NULL; in test_tls13_ciphersuite()
5479 sctx = NULL; in test_tls13_ciphersuite()
5481 cctx = NULL; in test_tls13_ciphersuite()
5503 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tls13_psk()
5504 SSL *serverssl = NULL, *clientssl = NULL; in test_tls13_psk()
5505 const SSL_CIPHER *cipher = NULL; in test_tls13_psk()
5516 &sctx, &cctx, idx == 3 ? NULL : cert, in test_tls13_psk()
5517 idx == 3 ? NULL : privkey))) in test_tls13_psk()
5569 NULL, NULL)) in test_tls13_psk()
5595 serverssl = clientssl = NULL; in test_tls13_psk()
5600 NULL, NULL))) in test_tls13_psk()
5638 serverssl = clientssl = NULL; in test_tls13_psk()
5643 NULL, NULL))) in test_tls13_psk()
5679 serverssl = clientssl = NULL; in test_tls13_psk()
5690 NULL, NULL)) in test_tls13_psk()
5716 serverssl = clientssl = NULL; in test_tls13_psk()
5723 clientpsk = serverpsk = NULL; in test_tls13_psk()
5744 SSL_CTX *sctx = NULL, *cctx = NULL; in test_tls13_no_dhe_kex()
5745 SSL *serverssl = NULL, *clientssl = NULL; in test_tls13_no_dhe_kex()
5778 &clientssl, NULL, NULL))) in test_tls13_no_dhe_kex()
5795 clientssl = serverssl = NULL; in test_tls13_no_dhe_kex()
5796 cctx = NULL; in test_tls13_no_dhe_kex()
5805 NULL, &cctx, cert, privkey))) in test_tls13_no_dhe_kex()
5811 &clientssl, NULL, NULL)) in test_tls13_no_dhe_kex()
5835 sesscache[j] = NULL; in test_tls13_no_dhe_kex()
5886 SSL_CTX *sctx = NULL, *cctx = NULL; in test_stateless()
5887 SSL *serverssl = NULL, *clientssl = NULL; in test_stateless()
5899 NULL, NULL)) in test_stateless()
5912 clientssl = NULL; in test_stateless()
5923 NULL, NULL)) in test_stateless()
5933 clientssl = NULL; in test_stateless()
5940 NULL, NULL)) in test_stateless()
5957 serverssl = clientssl = NULL; in test_stateless()
5994 || (data = OPENSSL_malloc(sizeof(*data))) == NULL) in old_add_cb()
6040 || (data = OPENSSL_malloc(sizeof(*data))) == NULL) in new_add_cb()
6077 if (SSL_set_SSL_CTX(s, ctx) == NULL) { in sni_cb()
6101 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_custom_exts()
6102 SSL *clientssl = NULL, *serverssl = NULL; in test_custom_exts()
6106 SSL_SESSION *sess = NULL; in test_custom_exts()
6126 && !TEST_true(create_ssl_ctx_pair(libctx, TLS_server_method(), NULL, in test_custom_exts()
6128 &sctx2, NULL, cert, privkey))) in test_custom_exts()
6135 if (sctx2 != NULL) in test_custom_exts()
6201 if (sctx2 != NULL in test_custom_exts()
6228 &clientssl, NULL, NULL)) in test_custom_exts()
6267 serverssl = clientssl = NULL; in test_custom_exts()
6276 NULL, NULL)) in test_custom_exts()
6371 SSL_CTX *sctx = NULL, *cctx = NULL; in test_serverinfo_custom()
6372 SSL *clientssl = NULL, *serverssl = NULL; in test_serverinfo_custom()
6384 const unsigned char *si = NULL; in test_serverinfo_custom()
6432 NULL, NULL, NULL, in test_serverinfo_custom()
6436 NULL, NULL)) in test_serverinfo_custom()
6467 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_export_key_mat()
6468 SSL *clientssl = NULL, *serverssl = NULL; in test_export_key_mat()
6471 const unsigned char *emptycontext = NULL; in test_export_key_mat()
6517 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_export_key_mat()
6518 NULL))) in test_export_key_mat()
6567 NULL, 0, 0), 1) in test_export_key_mat()
6590 NULL, 0, 0), 1) in test_export_key_mat()
6662 SSL_CTX *cctx = NULL, *sctx = NULL; in test_export_key_mat_early()
6663 SSL *clientssl = NULL, *serverssl = NULL; in test_export_key_mat_early()
6664 SSL_SESSION *sess = NULL; in test_export_key_mat_early()
6665 const unsigned char *emptycontext = NULL; in test_export_key_mat_early()
6676 if (!TEST_true(SSL_write_early_data(clientssl, NULL, 0, &written)) in test_export_key_mat_early()
6719 clientpsk = serverpsk = NULL; in test_export_key_mat_early()
6734 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update()
6735 SSL *clientssl = NULL, *serverssl = NULL; in test_key_update()
6746 NULL, NULL)) in test_key_update()
6793 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_peer_in_write()
6794 SSL *clientssl = NULL, *serverssl = NULL; in test_key_update_peer_in_write()
6799 BIO *tmp = NULL; in test_key_update_peer_in_write()
6800 SSL *peerupdate = NULL, *peerwrite = NULL; in test_key_update_peer_in_write()
6809 NULL, NULL)) in test_key_update_peer_in_write()
6824 tmp = NULL; in test_key_update_peer_in_write()
6828 bretry = NULL; in test_key_update_peer_in_write()
6839 tmp = NULL; in test_key_update_peer_in_write()
6888 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_peer_in_read()
6889 SSL *clientssl = NULL, *serverssl = NULL; in test_key_update_peer_in_read()
6893 BIO *lbio = NULL, *pbio = NULL; in test_key_update_peer_in_read()
6894 SSL *local = NULL, *peer = NULL; in test_key_update_peer_in_read()
6902 NULL, NULL)) in test_key_update_peer_in_read()
6971 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_local_in_write()
6972 SSL *clientssl = NULL, *serverssl = NULL; in test_key_update_local_in_write()
6977 BIO *tmp = NULL; in test_key_update_local_in_write()
6978 SSL *local = NULL, *peer = NULL; in test_key_update_local_in_write()
6987 NULL, NULL)) in test_key_update_local_in_write()
6998 tmp = NULL; in test_key_update_local_in_write()
7002 bretry = NULL; in test_key_update_local_in_write()
7011 tmp = NULL; in test_key_update_local_in_write()
7062 SSL_CTX *cctx = NULL, *sctx = NULL; in test_key_update_local_in_read()
7063 SSL *clientssl = NULL, *serverssl = NULL; in test_key_update_local_in_read()
7067 BIO *lbio = NULL, *pbio = NULL; in test_key_update_local_in_read()
7068 SSL *local = NULL, *peer = NULL; in test_key_update_local_in_read()
7076 NULL, NULL)) in test_key_update_local_in_read()
7152 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_clear()
7153 SSL *clientssl = NULL, *serverssl = NULL; in test_ssl_clear()
7180 &clientssl, NULL, NULL)) in test_ssl_clear()
7227 if (!TEST_true(SSL_set_session(serverssl, NULL))) in test_ssl_clear()
7230 clientssl = NULL; in test_ssl_clear()
7239 serverssl = NULL; in test_ssl_clear()
7243 NULL, NULL)) in test_ssl_clear()
7327 SSL_CTX *ctx = NULL; in test_max_fragment_len_ext()
7328 SSL *con = NULL; in test_max_fragment_len_ext()
7332 if (!TEST_true(create_ssl_ctx_pair(libctx, NULL, TLS_client_method(), in test_max_fragment_len_ext()
7333 TLS1_VERSION, 0, NULL, &ctx, NULL, in test_max_fragment_len_ext()
7334 NULL))) in test_max_fragment_len_ext()
7378 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pha_key_update()
7379 SSL *clientssl = NULL, *serverssl = NULL; in test_pha_key_update()
7396 NULL, NULL))) in test_pha_key_update()
7403 SSL_set_verify(serverssl, SSL_VERIFY_PEER, NULL); in test_pha_key_update()
7435 static SRP_VBASE *vbase = NULL;
7441 SRP_user_pwd *user = NULL; in ssl_srp_cb()
7444 if (username == NULL) { in ssl_srp_cb()
7450 if (user == NULL) { in ssl_srp_cb()
7470 char *gNid = NULL; in create_new_vfile()
7472 TXT_DB *db = NULL; in create_new_vfile()
7474 BIO *out = NULL, *dummy = BIO_new_mem_buf("", 0); in create_new_vfile()
7481 &row[DB_srpverifier], NULL, NULL, libctx, NULL); in create_new_vfile()
7507 row = NULL; in create_new_vfile()
7514 if (row != NULL) { in create_new_vfile()
7528 BIGNUM *verifier = NULL, *salt = NULL; in create_new_vbase()
7529 const SRP_gN *lgN = NULL; in create_new_vbase()
7530 SRP_user_pwd *user_pwd = NULL; in create_new_vbase()
7533 lgN = SRP_get_default_gN(NULL); in create_new_vbase()
7538 lgN->N, lgN->g, libctx, NULL))) in create_new_vbase()
7553 verifier = salt = NULL; in create_new_vbase()
7557 user_pwd = NULL; in create_new_vbase()
7582 SSL_CTX *cctx = NULL, *sctx = NULL; in test_srp()
7583 SSL *clientssl = NULL, *serverssl = NULL; in test_srp()
7586 vbase = SRP_VBASE_new(NULL); in test_srp()
7626 NULL, NULL))) in test_srp()
7642 vbase = NULL; in test_srp()
7662 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT"},
7665 {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWSD"}, {SSL_CB_LOOP, "TRCKE"},
7668 {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL},
7669 {SSL_CB_ALERT, NULL}, {SSL_CB_HANDSHAKE_START, NULL},
7672 {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWFIN"}, {SSL_CB_LOOP, "TRCCS"},
7673 {SSL_CB_LOOP, "TRFIN"}, {SSL_CB_HANDSHAKE_DONE, NULL},
7674 {SSL_CB_EXIT, NULL}, {0, NULL},
7677 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT"},
7678 {SSL_CB_LOOP, "TWCH"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWCH"},
7681 {SSL_CB_LOOP, "TWFIN"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWFIN"},
7683 {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, {SSL_CB_ALERT, NULL},
7684 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT"},
7685 {SSL_CB_LOOP, "TWCH"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWCH"},
7688 {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL}, {0, NULL},
7691 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT"},
7695 {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TED"}, {SSL_CB_LOOP, "TRFIN"},
7696 {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_LOOP, "TWST"},
7697 {SSL_CB_LOOP, "TWST"}, {SSL_CB_EXIT, NULL}, {SSL_CB_ALERT, NULL},
7698 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT"},
7701 {SSL_CB_LOOP, "TED"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TED"},
7702 {SSL_CB_LOOP, "TRFIN"}, {SSL_CB_HANDSHAKE_DONE, NULL},
7703 {SSL_CB_LOOP, "TWST"}, {SSL_CB_EXIT, NULL}, {0, NULL},
7706 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT"},
7707 {SSL_CB_LOOP, "TWCH"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWCH"},
7710 {SSL_CB_LOOP, "TWFIN"}, {SSL_CB_HANDSHAKE_DONE, NULL},
7711 {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "SSLOK"}, {SSL_CB_LOOP, "SSLOK"},
7712 {SSL_CB_LOOP, "TRST"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "SSLOK"},
7713 {SSL_CB_LOOP, "SSLOK"}, {SSL_CB_LOOP, "TRST"}, {SSL_CB_EXIT, NULL},
7714 {SSL_CB_ALERT, NULL}, {SSL_CB_HANDSHAKE_START, NULL},
7715 {SSL_CB_LOOP, "PINIT"}, {SSL_CB_LOOP, "TWCH"}, {SSL_CB_EXIT, NULL},
7718 {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL},
7720 {SSL_CB_EXIT, NULL}, {0, NULL},
7723 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT"},
7726 {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL},
7727 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "TED"},
7729 {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_LOOP, "TWST"},
7730 {SSL_CB_EXIT, NULL}, {0, NULL},
7733 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT"},
7735 {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL},
7736 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "TED"},
7739 {SSL_CB_LOOP, "TWFIN"}, {SSL_CB_HANDSHAKE_DONE, NULL},
7740 {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "SSLOK"}, {SSL_CB_LOOP, "SSLOK"},
7741 {SSL_CB_LOOP, "TRST"}, {SSL_CB_EXIT, NULL}, {0, NULL},
7744 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT"},
7748 {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TED"}, {SSL_CB_LOOP, "TRFIN"},
7749 {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_LOOP, "TWST"},
7750 {SSL_CB_LOOP, "TWST"}, {SSL_CB_EXIT, NULL}, {SSL_CB_ALERT, NULL},
7751 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT"},
7754 {SSL_CB_LOOP, "TED"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TED"},
7755 {SSL_CB_LOOP, "TRFIN"}, {SSL_CB_HANDSHAKE_DONE, NULL},
7756 {SSL_CB_LOOP, "TWST"}, {SSL_CB_EXIT, NULL}, {0, NULL},
7759 {SSL_CB_HANDSHAKE_START, NULL}, {SSL_CB_LOOP, "PINIT"},
7760 {SSL_CB_LOOP, "TWCH"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "TWCH"},
7763 {SSL_CB_LOOP, "TWFIN"}, {SSL_CB_HANDSHAKE_DONE, NULL},
7764 {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "SSLOK"}, {SSL_CB_LOOP, "SSLOK"},
7765 {SSL_CB_LOOP, "TRST"}, {SSL_CB_EXIT, NULL}, {SSL_CB_LOOP, "SSLOK"},
7766 {SSL_CB_LOOP, "SSLOK"}, {SSL_CB_LOOP, "TRST"}, {SSL_CB_EXIT, NULL},
7767 {SSL_CB_ALERT, NULL}, {SSL_CB_HANDSHAKE_START, NULL},
7768 {SSL_CB_LOOP, "PINIT"}, {SSL_CB_LOOP, "TWCH"}, {SSL_CB_EXIT, NULL},
7771 {SSL_CB_HANDSHAKE_DONE, NULL}, {SSL_CB_EXIT, NULL},
7773 {SSL_CB_EXIT, NULL}, {0, NULL},
7775 {0, NULL},
7836 SSL_CTX *cctx = NULL, *sctx = NULL; in test_info_callback()
7837 SSL *clientssl = NULL, *serverssl = NULL; in test_info_callback()
7838 SSL_SESSION *clntsess = NULL; in test_info_callback()
7865 SSL_SESSION *sess = NULL; in test_info_callback()
7930 &clientssl, NULL, NULL)) in test_info_callback()
7943 serverssl = clientssl = NULL; in test_info_callback()
7946 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_info_callback()
7947 NULL)) in test_info_callback()
7968 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_pending()
7969 SSL *clientssl = NULL, *serverssl = NULL; in test_ssl_pending()
8010 NULL, NULL)) in test_ssl_pending()
8055 NULL,
8057 NULL,
8067 NULL,
8069 NULL,
8077 NULL,
8079 NULL,
8086 NULL,
8088 NULL,
8102 NULL,
8104 NULL,
8125 SSL_CTX *cctx = NULL, *sctx = NULL; in int_test_ssl_get_shared_ciphers()
8126 SSL *clientssl = NULL, *serverssl = NULL; in int_test_ssl_get_shared_ciphers()
8142 cctx = SSL_CTX_new_ex(tmplibctx, NULL, TLS_client_method()); in int_test_ssl_get_shared_ciphers()
8146 sctx = SSL_CTX_new_ex(tmplibctx, NULL, TLS_server_method()); in int_test_ssl_get_shared_ciphers()
8160 || (shared_ciphers_data[tst].clnttls13ciphers != NULL in int_test_ssl_get_shared_ciphers()
8165 || (shared_ciphers_data[tst].srvrtls13ciphers != NULL in int_test_ssl_get_shared_ciphers()
8172 NULL, NULL)) in int_test_ssl_get_shared_ciphers()
8279 aes128cbc = EVP_CIPHER_fetch(libctx, "AES-128-CBC", NULL); in tick_key_cb()
8282 sha256 = EVP_MD_fetch(libctx, "SHA-256", NULL); in tick_key_cb()
8290 if (aes128cbc == NULL in tick_key_cb()
8291 || sha256 == NULL in tick_key_cb()
8292 || !EVP_CipherInit_ex(ctx, aes128cbc, NULL, tick_aes_key, iv, enc) in tick_key_cb()
8294 NULL)) in tick_key_cb()
8321 aes128cbc = EVP_CIPHER_fetch(libctx, "AES-128-CBC", NULL); in tick_key_evp_cb()
8330 if (aes128cbc == NULL in tick_key_evp_cb()
8331 || !EVP_CipherInit_ex(ctx, aes128cbc, NULL, tick_aes_key, iv, enc) in tick_key_evp_cb()
8368 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ticket_callbacks()
8369 SSL *clientssl = NULL, *serverssl = NULL; in test_ticket_callbacks()
8370 SSL_SESSION *clntsess = NULL; in test_ticket_callbacks()
8439 NULL))) in test_ticket_callbacks()
8453 NULL, NULL)) in test_ticket_callbacks()
8476 serverssl = clientssl = NULL; in test_ticket_callbacks()
8479 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_ticket_callbacks()
8480 NULL)) in test_ticket_callbacks()
8528 SSL_CTX *cctx = NULL, *sctx = NULL; in test_incorrect_shutdown()
8529 SSL *clientssl = NULL, *serverssl = NULL; in test_incorrect_shutdown()
8543 NULL, NULL))) in test_incorrect_shutdown()
8587 SSL_CTX *cctx = NULL, *sctx = NULL; in test_shutdown()
8588 SSL *clientssl = NULL, *serverssl = NULL; in test_shutdown()
8616 NULL, NULL))) in test_shutdown()
8622 || !TEST_ptr_ne(sess = SSL_get_session(clientssl), NULL) in test_shutdown()
8627 || !TEST_ptr_ne(sess = SSL_get_session(clientssl), NULL) in test_shutdown()
8656 SSL_set_verify(serverssl, SSL_VERIFY_PEER, NULL); in test_shutdown()
8696 || !TEST_ptr_ne(sess = SSL_get_session(clientssl), NULL) in test_shutdown()
8707 || !TEST_ptr_ne(sess = SSL_get_session(clientssl), NULL) in test_shutdown()
8740 SSL_CTX *cctx = NULL, *sctx = NULL; in test_async_shutdown()
8741 SSL *clientssl = NULL, *serverssl = NULL; in test_async_shutdown()
8743 BIO *bretry = BIO_new(bio_s_always_retry()), *tmp = NULL; in test_async_shutdown()
8754 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_async_shutdown()
8755 NULL))) in test_async_shutdown()
8767 tmp = NULL; in test_async_shutdown()
8771 bretry = NULL; in test_async_shutdown()
8784 tmp = NULL; in test_async_shutdown()
8816 BIO *in = NULL; in cert_cb()
8817 EVP_PKEY *pkey = NULL; in cert_cb()
8818 X509 *x509 = NULL, *rootx = NULL; in cert_cb()
8819 STACK_OF(X509) *chain = NULL; in cert_cb()
8820 char *rootfile = NULL, *ecdsacert = NULL, *ecdsakey = NULL; in cert_cb()
8832 if (ctx != NULL && !TEST_ptr(SSL_set_SSL_CTX(s, ctx))) in cert_cb()
8855 || !TEST_ptr(rootx = X509_new_ex(libctx, NULL)) in cert_cb()
8856 || !TEST_ptr(PEM_read_bio_X509(in, &rootx, NULL, NULL)) in cert_cb()
8859 rootx = NULL; in cert_cb()
8863 || !TEST_ptr(x509 = X509_new_ex(libctx, NULL)) in cert_cb()
8864 || !TEST_ptr(PEM_read_bio_X509(in, &x509, NULL, NULL))) in cert_cb()
8869 || !TEST_ptr(pkey = PEM_read_bio_PrivateKey_ex(in, NULL, in cert_cb()
8870 NULL, NULL, in cert_cb()
8871 libctx, NULL))) in cert_cb()
8882 if (!SSL_use_cert_and_key(s, x509, pkey, NULL, 1)) in cert_cb()
8914 SSL_CTX *cctx = NULL, *sctx = NULL, *snictx = NULL; in test_cert_cb_int()
8915 SSL *clientssl = NULL, *serverssl = NULL; in test_cert_cb_int()
8928 &sctx, &cctx, NULL, NULL))) in test_cert_cb_int()
8939 snictx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method()); in test_cert_cb_int()
8947 NULL, NULL))) in test_cert_cb_int()
9006 BIO *in = NULL; in client_cert_cb()
9007 BIO *priv_in = NULL; in client_cert_cb()
9017 if (!TEST_ptr(xcert = X509_new_ex(libctx, NULL)) in client_cert_cb()
9018 || !TEST_ptr(PEM_read_bio_X509(in, &xcert, NULL, NULL)) in client_cert_cb()
9020 || !TEST_ptr(privpkey = PEM_read_bio_PrivateKey_ex(priv_in, NULL, in client_cert_cb()
9021 NULL, NULL, in client_cert_cb()
9022 libctx, NULL))) in client_cert_cb()
9040 SSL_CTX *cctx = NULL, *sctx = NULL; in test_client_cert_cb()
9041 SSL *clientssl = NULL, *serverssl = NULL; in test_client_cert_cb()
9071 NULL, NULL)) in test_client_cert_cb()
9097 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ca_names_int()
9098 SSL *clientssl = NULL, *serverssl = NULL; in test_ca_names_int()
9101 X509_NAME *name[] = { NULL, NULL, NULL, NULL }; in test_ca_names_int()
9103 STACK_OF(X509_NAME) *sk1 = NULL, *sk2 = NULL; in test_ca_names_int()
9104 const STACK_OF(X509_NAME) *sktmp = NULL; in test_ca_names_int()
9124 SSL_CTX_set_verify(sctx, SSL_VERIFY_PEER, NULL); in test_ca_names_int()
9137 sk1 = sk2 = NULL; in test_ca_names_int()
9150 sk1 = sk2 = NULL; in test_ca_names_int()
9154 NULL, NULL)) in test_ca_names_int()
9247 SSL_CTX *cctx = NULL, *sctx = NULL; in test_multiblock_write()
9248 SSL *clientssl = NULL, *serverssl = NULL; in test_multiblock_write()
9259 EVP_CIPHER *ciph = NULL; in test_multiblock_write()
9266 if (ciph == NULL) { in test_multiblock_write()
9284 NULL, NULL))) in test_multiblock_write()
9328 SSL_SESSION *early = NULL; in test_session_timeout()
9329 SSL_SESSION *middle = NULL; in test_session_timeout()
9330 SSL_SESSION *late = NULL; in test_session_timeout()
9333 time_t now = time(NULL); in test_session_timeout()
9336 if (!TEST_ptr(ctx = SSL_CTX_new_ex(libctx, NULL, TLS_method())) in test_session_timeout()
9453 SSL_CTX *sctx = NULL, *cctx = NULL; in test_session_cache_overflow()
9454 SSL *serverssl = NULL, *clientssl = NULL; in test_session_cache_overflow()
9456 SSL_SESSION *sess = NULL; in test_session_cache_overflow()
9478 get_sess_val = NULL; in test_session_cache_overflow()
9483 NULL, NULL))) in test_session_cache_overflow()
9499 sess = NULL; in test_session_cache_overflow()
9502 sess = NULL; in test_session_cache_overflow()
9509 serverssl = clientssl = NULL; in test_session_cache_overflow()
9517 NULL, NULL))) in test_session_cache_overflow()
9538 serverssl = clientssl = NULL; in test_session_cache_overflow()
9541 NULL, NULL))) in test_session_cache_overflow()
9577 SSL_CTX *cctx = NULL, *sctx = NULL; in test_servername()
9578 SSL *clientssl = NULL, *serverssl = NULL; in test_servername()
9580 SSL_SESSION *sess = NULL; in test_servername()
9581 const char *sexpectedhost = NULL, *cexpectedhost = NULL; in test_servername()
9599 NULL, NULL))) in test_servername()
9627 || !TEST_ptr_ne(sess = SSL_get1_session(clientssl), NULL) in test_servername()
9634 clientssl = serverssl = NULL; in test_servername()
9636 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_servername()
9637 NULL))) in test_servername()
9665 sexpectedhost = cexpectedhost = NULL; in test_servername()
9684 sexpectedhost = NULL; in test_servername()
9720 SSL_CTX *ctx = NULL; in test_unknown_sigalgs_groups()
9722 if (!TEST_ptr(ctx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method()))) in test_unknown_sigalgs_groups()
9789 SSL_CTX *cctx = NULL, *sctx = NULL; in test_sigalgs_available()
9790 SSL *clientssl = NULL, *serverssl = NULL; in test_sigalgs_available()
9794 OSSL_PROVIDER *filterprov = NULL; in test_sigalgs_available()
9838 cctx = SSL_CTX_new_ex(clientctx, NULL, TLS_client_method()); in test_sigalgs_available()
9839 sctx = SSL_CTX_new_ex(serverctx, NULL, TLS_server_method()); in test_sigalgs_available()
9895 NULL, NULL))) in test_sigalgs_available()
9902 if (!TEST_int_eq(SSL_get_shared_sigalgs(serverssl, 0, &sig, &hash, NULL, in test_sigalgs_available()
9903 NULL, NULL), in test_sigalgs_available()
9935 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pluggable_group()
9936 SSL *clientssl = NULL, *serverssl = NULL; in test_pluggable_group()
9952 NULL, NULL))) in test_pluggable_group()
9993 (idx == 0) ? "xorhmacsig" : "xorhmacsha2sig", NULL); in create_cert_key()
9994 EVP_PKEY *pkey = NULL; in create_cert_key()
9996 X509_NAME *name = NULL; in create_cert_key()
9997 BIO *keybio = NULL, *certbio = NULL; in create_cert_key()
10019 || !TEST_true(PEM_write_bio_PrivateKey(keybio, pkey, NULL, NULL, 0, NULL, NULL)) in create_cert_key()
10043 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pluggable_signature()
10044 SSL *clientssl = NULL, *serverssl = NULL; in test_pluggable_signature()
10064 NULL, NULL))) in test_pluggable_signature()
10108 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ssl_dup()
10109 SSL *clientssl = NULL, *serverssl = NULL, *client2ssl = NULL; in test_ssl_dup()
10111 BIO *rbio = NULL, *wbio = NULL; in test_ssl_dup()
10121 NULL, NULL))) in test_ssl_dup()
10134 rbio = NULL; in test_ssl_dup()
10140 rbio = NULL; in test_ssl_dup()
10194 SSL_CTX *cctx = NULL, *sctx = NULL; in test_session_secret_cb()
10195 SSL *clientssl = NULL, *serverssl = NULL; in test_session_secret_cb()
10196 SSL_SESSION *secret_sess = NULL; in test_session_secret_cb()
10208 NULL, NULL))) in test_session_secret_cb()
10223 serverssl = clientssl = NULL; in test_session_secret_cb()
10227 NULL, NULL))) in test_session_secret_cb()
10234 if (!TEST_true(SSL_SESSION_set1_id(secret_sess, NULL, 0))) in test_session_secret_cb()
10240 NULL)) in test_session_secret_cb()
10242 NULL)) in test_session_secret_cb()
10263 static EVP_PKEY *tmp_dh_params = NULL;
10268 if (tmp_dh_params == NULL) { in get_tmp_dh_params()
10269 BIGNUM *p = NULL; in get_tmp_dh_params()
10270 OSSL_PARAM_BLD *tmpl = NULL; in get_tmp_dh_params()
10271 EVP_PKEY_CTX *pctx = NULL; in get_tmp_dh_params()
10272 OSSL_PARAM *params = NULL; in get_tmp_dh_params()
10273 EVP_PKEY *dhpkey = NULL; in get_tmp_dh_params()
10275 p = BN_get_rfc3526_prime_2048(NULL); in get_tmp_dh_params()
10279 pctx = EVP_PKEY_CTX_new_from_name(libctx, "DH", NULL); in get_tmp_dh_params()
10309 if (tmp_dh_params != NULL && !EVP_PKEY_up_ref(tmp_dh_params)) in get_tmp_dh_params()
10310 return NULL; in get_tmp_dh_params()
10320 DH *ret = NULL; in tmp_dh_callback()
10323 return NULL; in tmp_dh_callback()
10359 SSL_CTX *cctx = NULL, *sctx = NULL; in test_set_tmp_dh()
10360 SSL *clientssl = NULL, *serverssl = NULL; in test_set_tmp_dh()
10364 EVP_PKEY *dhpkey = NULL; in test_set_tmp_dh()
10366 DH *dh = NULL; in test_set_tmp_dh()
10401 dhpkey = NULL; in test_set_tmp_dh()
10413 NULL, NULL))) in test_set_tmp_dh()
10423 dhpkey = NULL; in test_set_tmp_dh()
10467 SSL_CTX *cctx = SSL_CTX_new_ex(libctx, NULL, TLS_client_method()); in test_dh_auto()
10468 SSL_CTX *sctx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method()); in test_dh_auto()
10469 SSL *clientssl = NULL, *serverssl = NULL; in test_dh_auto()
10471 EVP_PKEY *tmpkey = NULL; in test_dh_auto()
10472 char *thiscert = NULL, *thiskey = NULL; in test_dh_auto()
10532 if (!TEST_true(create_ssl_ctx_pair(libctx, NULL, in test_dh_auto()
10533 NULL, in test_dh_auto()
10540 NULL, NULL))) in test_dh_auto()
10590 SSL_CTX *cctx = NULL, *sctx = NULL, *sctx2 = NULL; in test_sni_tls13()
10591 SSL *clientssl = NULL, *serverssl = NULL; in test_sni_tls13()
10598 sctx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method()); in test_sni_tls13()
10617 &clientssl, NULL, NULL)) in test_sni_tls13()
10644 SSL_CTX *cctx = NULL, *sctx = NULL; in test_ticket_lifetime()
10645 SSL *clientssl = NULL, *serverssl = NULL; in test_ticket_lifetime()
10666 &clientssl, NULL, NULL))) in test_ticket_lifetime()
10704 SSL_CTX *ctx = NULL; in test_set_alpn()
10705 SSL *ssl = NULL; in test_set_alpn()
10716 ctx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method()); in test_set_alpn()
10721 if (!TEST_false(SSL_CTX_set_alpn_protos(ctx, NULL, 2))) in test_set_alpn()
10744 if (!TEST_false(SSL_set_alpn_protos(ssl, NULL, 2))) in test_set_alpn()
10776 SSL_CTX *ctx = NULL; in test_set_verify_cert_store_ssl_ctx()
10778 X509_STORE *store = NULL, *new_store = NULL, in test_set_verify_cert_store_ssl_ctx()
10779 *cstore = NULL, *new_cstore = NULL; in test_set_verify_cert_store_ssl_ctx()
10782 ctx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method()); in test_set_verify_cert_store_ssl_ctx()
10825 if (!TEST_true(SSL_CTX_set1_verify_cert_store(ctx, NULL))) in test_set_verify_cert_store_ssl_ctx()
10828 if (!TEST_true(SSL_CTX_set1_chain_cert_store(ctx, NULL))) in test_set_verify_cert_store_ssl_ctx()
10855 SSL_CTX *ctx = NULL; in test_set_verify_cert_store_ssl()
10856 SSL *ssl = NULL; in test_set_verify_cert_store_ssl()
10858 X509_STORE *store = NULL, *new_store = NULL, in test_set_verify_cert_store_ssl()
10859 *cstore = NULL, *new_cstore = NULL; in test_set_verify_cert_store_ssl()
10862 ctx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method()); in test_set_verify_cert_store_ssl()
10910 if (!TEST_true(SSL_set1_verify_cert_store(ssl, NULL))) in test_set_verify_cert_store_ssl()
10913 if (!TEST_true(SSL_set1_chain_cert_store(ssl, NULL))) in test_set_verify_cert_store_ssl()
10941 SSL_CTX *ctx = NULL; in test_inherit_verify_param()
10942 X509_VERIFY_PARAM *cp = NULL; in test_inherit_verify_param()
10943 SSL *ssl = NULL; in test_inherit_verify_param()
10944 X509_VERIFY_PARAM *sp = NULL; in test_inherit_verify_param()
10947 ctx = SSL_CTX_new_ex(libctx, NULL, TLS_server_method()); in test_inherit_verify_param()
10983 SSL_CTX *ctx = NULL; in test_load_dhfile()
10984 SSL_CONF_CTX *cctx = NULL; in test_load_dhfile()
10986 if (dhfile == NULL) in test_load_dhfile()
10989 if (!TEST_ptr(ctx = SSL_CTX_new_ex(libctx, NULL, TLS_client_method())) in test_load_dhfile()
11017 SSL_CTX *cctx = NULL, *sctx = NULL; in test_read_ahead_key_change()
11018 SSL *clientssl = NULL, *serverssl = NULL; in test_read_ahead_key_change()
11033 &clientssl, NULL, NULL))) in test_read_ahead_key_change()
11117 SSL_CTX *cctx = NULL, *sctx = NULL; in test_tls13_record_padding()
11118 SSL *clientssl = NULL, *serverssl = NULL; in test_tls13_record_padding()
11150 &clientssl, NULL, NULL))) in test_tls13_record_padding()
11237 SSL_CTX *cctx = NULL, *sctx = NULL; in test_pipelining()
11238 SSL *clientssl = NULL, *serverssl = NULL, *peera, *peerb; in test_pipelining()
11245 unsigned char *buf = NULL; in test_pipelining()
11246 ENGINE *e = NULL; in test_pipelining()
11250 if (e == NULL) in test_pipelining()
11262 if (e == NULL) in test_pipelining()
11269 &clientssl, NULL, NULL))) in test_pipelining()
11403 if (e != NULL) { in test_pipelining()
11417 const char *verstr = NULL; in check_version_string()
11453 SSL_CTX *cctx = NULL, *sctx = NULL; in test_version()
11454 SSL *clientssl = NULL, *serverssl = NULL; in test_version()
11525 &clientssl, NULL, NULL))) in test_version()
11569 SSL_CTX *cctx = NULL, *sctx = NULL; in test_rstate_string()
11570 SSL *clientssl = NULL, *serverssl = NULL; in test_rstate_string()
11589 &clientssl, NULL, NULL))) in test_rstate_string()
11653 SSL_CTX *cctx = NULL, *sctx = NULL; in test_handshake_retry()
11654 SSL *clientssl = NULL, *serverssl = NULL; in test_handshake_retry()
11656 BIO *tmp = NULL, *bretry = BIO_new(bio_s_always_retry()); in test_handshake_retry()
11687 SSL_CTX_set_verify(sctx, SSL_VERIFY_PEER, NULL); in test_handshake_retry()
11693 &clientssl, NULL, NULL))) in test_handshake_retry()
11698 tmp = NULL; in test_handshake_retry()
11702 bretry = NULL; in test_handshake_retry()
11713 tmp = NULL; in test_handshake_retry()
11735 SSL_CTX *cctx = NULL, *sctx = NULL; in test_data_retry()
11736 SSL *clientssl = NULL, *serverssl = NULL; in test_data_retry()
11740 BIO *tmp = NULL; in test_data_retry()
11756 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_data_retry()
11757 NULL))) in test_data_retry()
11773 tmp = NULL; in test_data_retry()
11776 bretry = NULL; in test_data_retry()
11789 NULL))) in test_data_retry()
11841 SSL *serverssl = NULL, *clientssl = NULL; in resume_servername_cb()
11853 &clientssl, NULL, NULL)) in resume_servername_cb()
11885 SSL_CTX *sctx = NULL, *cctx = NULL; in test_multi_resume()
11886 SSL *serverssl = NULL, *clientssl = NULL; in test_multi_resume()
11887 SSL_SESSION *sess = NULL; in test_multi_resume()
11933 NULL, NULL)) in test_multi_resume()
11959 if (sess == NULL || (idx == 0 && (i % 3) == 2)) { in test_multi_resume()
11970 sess = NULL; in test_multi_resume()
11980 serverssl = clientssl = NULL; in test_multi_resume()
12101 client = NULL; in test_select_next_proto()
12108 server = NULL; in test_select_next_proto()
12195 SSL_CTX *sctx = NULL, *cctx = NULL; in test_npn()
12196 SSL *serverssl = NULL, *clientssl = NULL; in test_npn()
12207 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_npn()
12208 NULL))) in test_npn()
12293 SSL_CTX *sctx = NULL, *cctx = NULL; in test_alpn()
12294 SSL *serverssl = NULL, *clientssl = NULL; in test_alpn()
12306 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_alpn()
12307 NULL))) in test_alpn()
12311 prots = NULL; in test_alpn()
12369 defctxnull = OSSL_PROVIDER_load(NULL, "null"); in setup_tests()
12375 if (!TEST_false(OSSL_PROVIDER_available(NULL, "default")) in setup_tests()
12376 || !TEST_false(OSSL_PROVIDER_available(NULL, "fips"))) in setup_tests()
12405 OSSL_PROVIDER *prov = NULL; in setup_tests()
12411 if (prov != NULL) { in setup_tests()
12431 if (getenv("OPENSSL_TEST_GETCOUNTS") != NULL) { in setup_tests()
12448 if (cert == NULL) in setup_tests()
12452 if (privkey == NULL) in setup_tests()
12456 if (cert2 == NULL) in setup_tests()
12460 if (privkey2 == NULL) in setup_tests()
12464 if (cert1024 == NULL) in setup_tests()
12468 if (privkey1024 == NULL) in setup_tests()
12472 if (cert3072 == NULL) in setup_tests()
12476 if (privkey3072 == NULL) in setup_tests()
12480 if (cert4096 == NULL) in setup_tests()
12484 if (privkey4096 == NULL) in setup_tests()
12488 if (cert8192 == NULL) in setup_tests()
12492 if (privkey8192 == NULL) in setup_tests()