Lines Matching refs:serverssl
319 SSL *clientssl = NULL, *serverssl = NULL; in test_keylog() local
357 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog()
359 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_keylog()
379 if (!TEST_true(test_keylog_output(server_log_buffer, serverssl, in test_keylog()
380 SSL_get_session(serverssl), &expected))) in test_keylog()
386 SSL_free(serverssl); in test_keylog()
399 SSL *clientssl = NULL, *serverssl = NULL; in test_keylog_no_master_key() local
435 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog_no_master_key()
437 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_keylog_no_master_key()
454 || !TEST_true(test_keylog_output(server_log_buffer, serverssl, in test_keylog_no_master_key()
455 SSL_get_session(serverssl), in test_keylog_no_master_key()
462 SSL_shutdown(serverssl); in test_keylog_no_master_key()
463 SSL_free(serverssl); in test_keylog_no_master_key()
465 serverssl = clientssl = NULL; in test_keylog_no_master_key()
473 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog_no_master_key()
478 || !TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_keylog_no_master_key()
481 || !TEST_int_eq(SSL_get_early_data_status(serverssl), in test_keylog_no_master_key()
483 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_keylog_no_master_key()
493 || !TEST_true(test_keylog_output(server_log_buffer, serverssl, in test_keylog_no_master_key()
494 SSL_get_session(serverssl), in test_keylog_no_master_key()
502 SSL_free(serverssl); in test_keylog_no_master_key()
556 SSL *clientssl = NULL, *serverssl = NULL; in test_client_hello_cb() local
570 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_client_hello_cb()
572 || !TEST_false(create_ssl_connection(serverssl, clientssl, in test_client_hello_cb()
578 || !TEST_int_eq(SSL_get_error(serverssl, -1), in test_client_hello_cb()
580 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_client_hello_cb()
587 SSL_free(serverssl); in test_client_hello_cb()
604 SSL *clientssl = NULL, *serverssl = NULL; in test_ccs_change_cipher() local
620 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
623 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ccs_change_cipher()
625 || !TEST_ptr(sesspre = SSL_get0_session(serverssl)) in test_ccs_change_cipher()
629 shutdown_ssl_connection(serverssl, clientssl); in test_ccs_change_cipher()
630 serverssl = clientssl = NULL; in test_ccs_change_cipher()
634 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
638 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ccs_change_cipher()
641 || !TEST_true(SSL_session_reused(serverssl)) in test_ccs_change_cipher()
642 || !TEST_ptr(sesspost = SSL_get0_session(serverssl)) in test_ccs_change_cipher()
647 shutdown_ssl_connection(serverssl, clientssl); in test_ccs_change_cipher()
648 serverssl = clientssl = NULL; in test_ccs_change_cipher()
654 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
657 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ccs_change_cipher()
659 || !TEST_ptr(sesspre = SSL_get0_session(serverssl)) in test_ccs_change_cipher()
673 if (SSL_read_ex(serverssl, &buf, sizeof(buf), &readbytes) > 0) { in test_ccs_change_cipher()
676 } else if (!TEST_int_eq(SSL_get_error(serverssl, 0), in test_ccs_change_cipher()
684 || !TEST_false(SSL_session_reused(serverssl)) in test_ccs_change_cipher()
685 || !TEST_ptr(sesspost = SSL_get0_session(serverssl)) in test_ccs_change_cipher()
691 shutdown_ssl_connection(serverssl, clientssl); in test_ccs_change_cipher()
692 serverssl = clientssl = NULL; in test_ccs_change_cipher()
697 SSL_free(serverssl); in test_ccs_change_cipher()
713 SSL *clientssl = NULL, *serverssl = NULL; in execute_test_large_message() local
759 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in execute_test_large_message()
761 || !TEST_true(create_ssl_connection(serverssl, clientssl, in execute_test_large_message()
769 if (!TEST_true(SSL_clear(serverssl))) in execute_test_large_message()
775 SSL_free(serverssl); in execute_test_large_message()
860 SSL *clientssl = NULL, *serverssl = NULL; in test_tlsext_status_type() local
905 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
907 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_tlsext_status_type()
912 SSL_free(serverssl); in test_tlsext_status_type()
914 serverssl = NULL; in test_tlsext_status_type()
921 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
924 || !TEST_false(create_ssl_connection(serverssl, clientssl, in test_tlsext_status_type()
929 SSL_free(serverssl); in test_tlsext_status_type()
931 serverssl = NULL; in test_tlsext_status_type()
941 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
965 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_tlsext_status_type()
974 SSL_free(serverssl); in test_tlsext_status_type()
1404 SSL *serverssl = NULL, *clientssl = NULL; in check_resumption() local
1410 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in check_resumption()
1417 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in check_resumption()
1438 && (!post_handshake_verify(serverssl, clientssl) in check_resumption()
1443 SSL_shutdown(serverssl); in check_resumption()
1444 SSL_free(serverssl); in check_resumption()
1446 serverssl = clientssl = NULL; in check_resumption()
1455 SSL_free(serverssl); in check_resumption()
1462 SSL *serverssl = NULL, *clientssl = NULL; in test_tickets() local
1474 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tickets()
1478 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_tickets()
1485 SSL_shutdown(serverssl); in test_tickets()
1486 SSL_free(serverssl); in test_tickets()
1490 clientssl = serverssl = NULL; in test_tickets()
1518 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tickets()
1524 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_tickets()
1531 if (!post_handshake_verify(serverssl, clientssl) in test_tickets()
1536 SSL_shutdown(serverssl); in test_tickets()
1537 SSL_free(serverssl); in test_tickets()
1539 serverssl = clientssl = NULL; in test_tickets()
1554 SSL_free(serverssl); in test_tickets()
1579 SSL *serverssl = NULL, *clientssl = NULL; in test_psk_tickets() local
1601 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_psk_tickets()
1609 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_psk_tickets()
1620 SSL_free(serverssl); in test_psk_tickets()
1686 SSL *serverssl = NULL, *clientssl = NULL; in test_ssl_set_bio() local
1725 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_set_bio()
1762 && !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ssl_set_bio()
1798 SSL_free(serverssl); in test_ssl_set_bio()
1923 SSL *clientssl = NULL, *serverssl = NULL; in test_set_sigalgs() local
1968 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_set_sigalgs()
1990 if (!TEST_int_eq(create_ssl_connection(serverssl, clientssl, in test_set_sigalgs()
1998 SSL_free(serverssl); in test_set_sigalgs()
2175 SSL **serverssl, SSL_SESSION **sess, int idx) in setupearly_data_test() argument
2200 if (!TEST_true(create_ssl_objects(*sctx, *cctx, serverssl, clientssl, in setupearly_data_test()
2245 if (!TEST_true(create_ssl_connection(*serverssl, *clientssl, in setupearly_data_test()
2251 SSL_shutdown(*serverssl); in setupearly_data_test()
2252 SSL_free(*serverssl); in setupearly_data_test()
2254 *serverssl = *clientssl = NULL; in setupearly_data_test()
2256 if (!TEST_true(create_ssl_objects(*sctx, *cctx, serverssl, in setupearly_data_test()
2267 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_read_write() local
2275 &serverssl, &sess, idx))) in test_early_data_read_write()
2282 || !TEST_int_eq(SSL_read_early_data(serverssl, buf, in test_early_data_read_write()
2286 || !TEST_int_eq(SSL_get_early_data_status(serverssl), in test_early_data_read_write()
2294 if (!TEST_true(SSL_write_early_data(serverssl, MSG2, strlen(MSG2), in test_early_data_read_write()
2308 if (!TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_read_write()
2315 if (!TEST_true(SSL_write_early_data(serverssl, MSG4, strlen(MSG4), in test_early_data_read_write()
2338 rbio = SSL_get_rbio(serverssl); in test_early_data_read_write()
2351 if (!TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_read_write()
2361 if (!TEST_true(SSL_write_early_data(serverssl, MSG6, strlen(MSG6), in test_early_data_read_write()
2373 if (!TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_read_write()
2382 if (!TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_read_write()
2404 if (!TEST_true(SSL_write_ex(serverssl, MSG7, strlen(MSG7), &written)) in test_early_data_read_write()
2416 SSL_shutdown(serverssl); in test_early_data_read_write()
2417 SSL_free(serverssl); in test_early_data_read_write()
2419 serverssl = clientssl = NULL; in test_early_data_read_write()
2420 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_early_data_read_write()
2429 || !TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_read_write()
2436 || !TEST_int_gt(SSL_accept(serverssl), 0)) in test_early_data_read_write()
2444 if (!TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_read_write()
2453 || !TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_read_write()
2464 SSL_free(serverssl); in test_early_data_read_write()
2497 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_replay_int() local
2532 &serverssl, &sess, idx))) in test_early_data_replay_int()
2539 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)) in test_early_data_replay_int()
2544 SSL_shutdown(serverssl); in test_early_data_replay_int()
2545 SSL_free(serverssl); in test_early_data_replay_int()
2547 serverssl = clientssl = NULL; in test_early_data_replay_int()
2549 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_early_data_replay_int()
2561 if (!TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_replay_int()
2568 || !TEST_int_eq(SSL_get_early_data_status(serverssl), in test_early_data_replay_int()
2573 if (!TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_replay_int()
2582 || !TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_replay_int()
2585 || !TEST_int_eq(SSL_get_early_data_status(serverssl), in test_early_data_replay_int()
2591 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)) in test_early_data_replay_int()
2603 SSL_free(serverssl); in test_early_data_replay_int()
2633 SSL *clientssl = NULL, *serverssl = NULL; in early_data_skip_helper() local
2640 &serverssl, &sess, idx))) in early_data_skip_helper()
2645 if (!TEST_true(SSL_set1_groups_list(serverssl, "P-256"))) in early_data_skip_helper()
2664 && !TEST_true(SSL_set_recv_max_early_data(serverssl, 0))) in early_data_skip_helper()
2674 if (!TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in early_data_skip_helper()
2678 || !TEST_int_eq(SSL_get_early_data_status(serverssl), in early_data_skip_helper()
2694 || !TEST_false(SSL_read_ex(serverssl, buf, sizeof(buf), in early_data_skip_helper()
2732 if (!TEST_false(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in early_data_skip_helper()
2733 || !TEST_int_eq(SSL_get_error(serverssl, 0), SSL_ERROR_SSL)) in early_data_skip_helper()
2753 || !TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in early_data_skip_helper()
2764 SSL_free(serverssl); in early_data_skip_helper()
2815 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_not_sent() local
2822 &serverssl, &sess, idx))) in test_early_data_not_sent()
2831 if (!TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_not_sent()
2835 || !TEST_int_eq(SSL_get_early_data_status(serverssl), in test_early_data_not_sent()
2844 || !TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_not_sent()
2846 || !SSL_write_ex(serverssl, MSG2, strlen(MSG2), &written) in test_early_data_not_sent()
2861 SSL_free(serverssl); in test_early_data_not_sent()
2897 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_psk() local
2916 &serverssl, &sess, 2))) in test_early_data_psk()
3044 if (!TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_psk()
3048 || !TEST_int_eq(SSL_get_early_data_status(serverssl), edstatus) in test_early_data_psk()
3060 SSL_free(serverssl); in test_early_data_psk()
3078 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_psk_with_all_ciphers() local
3112 &serverssl, &sess, 2))) in test_early_data_psk_with_all_ciphers()
3116 || !TEST_true(SSL_set_ciphersuites(serverssl, cipher_str[idx]))) in test_early_data_psk_with_all_ciphers()
3135 if (!TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_psk_with_all_ciphers()
3139 || !TEST_int_eq(SSL_get_early_data_status(serverssl), in test_early_data_psk_with_all_ciphers()
3142 || !TEST_int_eq(SSL_accept(serverssl), 1)) in test_early_data_psk_with_all_ciphers()
3150 if (!TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_psk_with_all_ciphers()
3162 if (serverssl != NULL) in test_early_data_psk_with_all_ciphers()
3163 SSL_shutdown(serverssl); in test_early_data_psk_with_all_ciphers()
3164 SSL_free(serverssl); in test_early_data_psk_with_all_ciphers()
3178 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_not_expected() local
3185 &serverssl, &sess, idx))) in test_early_data_not_expected()
3197 if (!TEST_int_le(SSL_accept(serverssl), 0) in test_early_data_not_expected()
3199 || !TEST_int_eq(SSL_get_early_data_status(serverssl), in test_early_data_not_expected()
3201 || !TEST_int_gt(SSL_accept(serverssl), 0) in test_early_data_not_expected()
3211 if (!TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_not_expected()
3222 SSL_free(serverssl); in test_early_data_not_expected()
3238 SSL *clientssl = NULL, *serverssl = NULL; in test_early_data_tls1_2() local
3244 &serverssl, NULL, idx))) in test_early_data_tls1_2()
3258 if (!TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_tls1_2()
3268 || !TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_early_data_tls1_2()
3272 || !TEST_int_eq(SSL_get_early_data_status(serverssl), in test_early_data_tls1_2()
3281 || !TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_tls1_2()
3283 || !TEST_true(SSL_write_ex(serverssl, MSG2, strlen(MSG2), &written)) in test_early_data_tls1_2()
3295 SSL_free(serverssl); in test_early_data_tls1_2()
3321 SSL *clientssl = NULL, *serverssl = NULL; in test_set_ciphersuite() local
3349 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_set_ciphersuite()
3371 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) in test_set_ciphersuite()
3377 SSL_free(serverssl); in test_set_ciphersuite()
3388 SSL *clientssl = NULL, *serverssl = NULL; in test_ciphersuite_change() local
3399 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
3401 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ciphersuite_change()
3409 SSL_shutdown(serverssl); in test_ciphersuite_change()
3410 SSL_free(serverssl); in test_ciphersuite_change()
3412 serverssl = clientssl = NULL; in test_ciphersuite_change()
3418 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
3421 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ciphersuite_change()
3429 SSL_shutdown(serverssl); in test_ciphersuite_change()
3430 SSL_free(serverssl); in test_ciphersuite_change()
3432 serverssl = clientssl = NULL; in test_ciphersuite_change()
3440 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
3443 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ciphersuite_change()
3451 SSL_shutdown(serverssl); in test_ciphersuite_change()
3452 SSL_free(serverssl); in test_ciphersuite_change()
3454 serverssl = clientssl = NULL; in test_ciphersuite_change()
3458 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
3460 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ciphersuite_change()
3466 SSL_shutdown(serverssl); in test_ciphersuite_change()
3467 SSL_free(serverssl); in test_ciphersuite_change()
3469 serverssl = clientssl = NULL; in test_ciphersuite_change()
3475 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
3483 || !TEST_false(create_ssl_connection(serverssl, clientssl, in test_ciphersuite_change()
3496 if (!TEST_false(create_ssl_connection(serverssl, clientssl, in test_ciphersuite_change()
3506 SSL_free(serverssl); in test_ciphersuite_change()
3524 SSL *serverssl = NULL, *clientssl = NULL; in test_tls13_ciphersuite() local
3587 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tls13_ciphersuite()
3592 if (!TEST_true(SSL_set_ciphersuites(serverssl, t13_cipher)) in test_tls13_ciphersuite()
3596 if (!TEST_true(SSL_set_cipher_list(serverssl, t12_cipher)) in test_tls13_ciphersuite()
3603 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_tls13_ciphersuite()
3608 serverssl)); in test_tls13_ciphersuite()
3630 SSL_free(serverssl); in test_tls13_ciphersuite()
3631 serverssl = NULL; in test_tls13_ciphersuite()
3643 SSL_free(serverssl); in test_tls13_ciphersuite()
3660 SSL *serverssl = NULL, *clientssl = NULL; in test_tls13_psk() local
3714 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
3716 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_tls13_psk()
3719 || !TEST_false(SSL_session_reused(serverssl))) in test_tls13_psk()
3740 shutdown_ssl_connection(serverssl, clientssl); in test_tls13_psk()
3741 serverssl = clientssl = NULL; in test_tls13_psk()
3745 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
3764 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)) in test_tls13_psk()
3766 || !TEST_true(SSL_session_reused(serverssl))) in test_tls13_psk()
3783 shutdown_ssl_connection(serverssl, clientssl); in test_tls13_psk()
3784 serverssl = clientssl = NULL; in test_tls13_psk()
3788 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
3793 if (!TEST_true(SSL_set1_groups_list(serverssl, "P-256"))) in test_tls13_psk()
3800 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)) in test_tls13_psk()
3802 || !TEST_true(SSL_session_reused(serverssl))) in test_tls13_psk()
3819 shutdown_ssl_connection(serverssl, clientssl); in test_tls13_psk()
3820 serverssl = clientssl = NULL; in test_tls13_psk()
3830 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
3832 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_tls13_psk()
3835 || !TEST_false(SSL_session_reused(serverssl))) in test_tls13_psk()
3856 shutdown_ssl_connection(serverssl, clientssl); in test_tls13_psk()
3857 serverssl = clientssl = NULL; in test_tls13_psk()
3865 SSL_free(serverssl); in test_tls13_psk()
3915 SSL *serverssl = NULL, *clientssl = NULL; in test_stateless() local
3926 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
3929 || !TEST_false(create_ssl_connection(serverssl, clientssl, in test_stateless()
3935 || !TEST_int_eq(SSL_stateless(serverssl), -1)) in test_stateless()
3950 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
3953 || !TEST_false(create_ssl_connection(serverssl, clientssl, in test_stateless()
3956 || !TEST_int_eq(SSL_stateless(serverssl), 0)) in test_stateless()
3967 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
3970 || !TEST_false(create_ssl_connection(serverssl, clientssl, in test_stateless()
3973 || !TEST_int_eq(SSL_stateless(serverssl), 0) in test_stateless()
3975 || !TEST_false(create_ssl_connection(serverssl, clientssl, in test_stateless()
3978 || !TEST_int_eq(SSL_stateless(serverssl), 1) in test_stateless()
3980 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_stateless()
3984 shutdown_ssl_connection(serverssl, clientssl); in test_stateless()
3985 serverssl = clientssl = NULL; in test_stateless()
3989 SSL_free(serverssl); in test_stateless()
4130 SSL *clientssl = NULL, *serverssl = NULL; in test_custom_exts() local
4255 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_custom_exts()
4257 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_custom_exts()
4292 SSL_shutdown(serverssl); in test_custom_exts()
4293 SSL_free(serverssl); in test_custom_exts()
4295 serverssl = clientssl = NULL; in test_custom_exts()
4303 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_custom_exts()
4306 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_custom_exts()
4344 SSL_free(serverssl); in test_custom_exts()
4420 SSL *clientssl = NULL, *serverssl = NULL; in test_export_key_mat() local
4461 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_export_key_mat()
4474 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_export_key_mat()
4510 || !TEST_int_eq(SSL_export_keying_material(serverssl, skeymat1, in test_export_key_mat()
4516 || !TEST_int_eq(SSL_export_keying_material(serverssl, skeymat2, in test_export_key_mat()
4521 || !TEST_int_eq(SSL_export_keying_material(serverssl, skeymat3, in test_export_key_mat()
4561 SSL_free(serverssl); in test_export_key_mat()
4583 SSL *clientssl = NULL, *serverssl = NULL; in test_export_key_mat_early() local
4591 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, &serverssl, in test_export_key_mat_early()
4597 || !TEST_int_eq(SSL_read_early_data(serverssl, buf, sizeof(buf), in test_export_key_mat_early()
4600 || !TEST_int_eq(SSL_get_early_data_status(serverssl), in test_export_key_mat_early()
4611 serverssl, skeymat1, sizeof(skeymat1), label, in test_export_key_mat_early()
4614 serverssl, skeymat2, sizeof(skeymat2), label, in test_export_key_mat_early()
4640 SSL_free(serverssl); in test_export_key_mat_early()
4655 SSL *clientssl = NULL, *serverssl = NULL; in test_key_update() local
4665 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update()
4667 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_key_update()
4684 || !TEST_int_eq(SSL_read(serverssl, buf, sizeof(buf)), in test_key_update()
4688 if (!TEST_int_eq(SSL_write(serverssl, mess, strlen(mess)), strlen(mess)) in test_key_update()
4697 SSL_free(serverssl); in test_key_update()
4714 SSL *clientssl = NULL, *serverssl = NULL; in test_key_update_in_write() local
4728 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_in_write()
4730 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_key_update_in_write()
4734 peerupdate = tst == 0 ? clientssl : serverssl; in test_key_update_in_write()
4735 peerwrite = tst == 0 ? serverssl : clientssl; in test_key_update_in_write()
4780 SSL_free(serverssl); in test_key_update_in_write()
4794 SSL *clientssl = NULL, *serverssl = NULL; in test_ssl_clear() local
4809 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ssl_clear()
4811 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ssl_clear()
4816 SSL_shutdown(serverssl); in test_ssl_clear()
4817 SSL_free(serverssl); in test_ssl_clear()
4818 serverssl = NULL; in test_ssl_clear()
4824 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_clear()
4826 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ssl_clear()
4832 SSL_shutdown(serverssl); in test_ssl_clear()
4837 SSL_free(serverssl); in test_ssl_clear()
4956 SSL *clientssl = NULL, *serverssl = NULL; in test_pha_key_update() local
4972 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_pha_key_update()
4976 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_pha_key_update()
4980 SSL_set_verify(serverssl, SSL_VERIFY_PEER, NULL); in test_pha_key_update()
4981 if (!TEST_true(SSL_verify_client_post_handshake(serverssl))) in test_pha_key_update()
4988 if (!TEST_int_eq(SSL_do_handshake(serverssl), 1)) in test_pha_key_update()
4992 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_pha_key_update()
4997 SSL_shutdown(serverssl); in test_pha_key_update()
5002 SSL_free(serverssl); in test_pha_key_update()
5160 SSL *clientssl = NULL, *serverssl = NULL; in test_srp() local
5202 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_srp()
5206 ret = create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE); in test_srp()
5220 SSL_free(serverssl); in test_srp()
5380 SSL *clientssl = NULL, *serverssl = NULL; in test_info_callback() local
5414 &serverssl, &sess, 0))) in test_info_callback()
5420 SSL_set_info_callback((tst % 2) == 0 ? serverssl : clientssl, in test_info_callback()
5427 || !TEST_int_eq(SSL_read_early_data(serverssl, buf, in test_info_callback()
5431 || !TEST_int_eq(SSL_get_early_data_status(serverssl), in test_info_callback()
5433 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_info_callback()
5456 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_info_callback()
5458 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_info_callback()
5467 SSL_shutdown(serverssl); in test_info_callback()
5468 SSL_free(serverssl); in test_info_callback()
5470 serverssl = clientssl = NULL; in test_info_callback()
5473 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_info_callback()
5476 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_info_callback()
5485 SSL_free(serverssl); in test_info_callback()
5496 SSL *clientssl = NULL, *serverssl = NULL; in test_ssl_pending() local
5520 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_pending()
5522 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ssl_pending()
5528 || !TEST_int_eq(SSL_pending(serverssl), 0) in test_ssl_pending()
5529 || !TEST_false(SSL_has_pending(serverssl)) in test_ssl_pending()
5530 || !TEST_true(SSL_write_ex(serverssl, msg, sizeof(msg), &written)) in test_ssl_pending()
5541 SSL_free(serverssl); in test_ssl_pending()
5618 SSL *clientssl = NULL, *serverssl = NULL; in test_ssl_get_shared_ciphers() local
5642 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_get_shared_ciphers()
5644 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ssl_get_shared_ciphers()
5648 if (!TEST_ptr(SSL_get_shared_ciphers(serverssl, buf, sizeof(buf))) in test_ssl_get_shared_ciphers()
5657 SSL_free(serverssl); in test_ssl_get_shared_ciphers()
5758 SSL *clientssl = NULL, *serverssl = NULL; in test_ticket_callbacks() local
5828 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ticket_callbacks()
5830 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ticket_callbacks()
5849 SSL_shutdown(serverssl); in test_ticket_callbacks()
5850 SSL_free(serverssl); in test_ticket_callbacks()
5852 serverssl = clientssl = NULL; in test_ticket_callbacks()
5855 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_ticket_callbacks()
5858 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ticket_callbacks()
5883 SSL_free(serverssl); in test_ticket_callbacks()
5907 SSL *clientssl = NULL, *serverssl = NULL; in test_shutdown() local
5934 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_shutdown()
5939 if (!TEST_true(create_bare_ssl_connection(serverssl, clientssl, in test_shutdown()
5944 } else if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_shutdown()
5959 if (!TEST_false(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_shutdown()
5960 || !TEST_int_eq(SSL_get_error(serverssl, 0), in test_shutdown()
5962 || !TEST_int_eq(SSL_get_shutdown(serverssl), in test_shutdown()
5968 || !TEST_true(SSL_write(serverssl, msg, sizeof(msg)))) in test_shutdown()
5971 && !TEST_true(SSL_key_update(serverssl, in test_shutdown()
5975 SSL_set_verify(serverssl, SSL_VERIFY_PEER, NULL); in test_shutdown()
5976 if (!TEST_true(SSL_verify_client_post_handshake(serverssl))) in test_shutdown()
5980 && !TEST_true(SSL_write(serverssl, msg, sizeof(msg)))) in test_shutdown()
5982 if (!TEST_int_eq(SSL_shutdown(serverssl), 1)) in test_shutdown()
6008 if (!TEST_int_eq(SSL_shutdown(serverssl), 0) in test_shutdown()
6013 || !TEST_false(SSL_write_ex(serverssl, msg, sizeof(msg), &written)) in test_shutdown()
6017 || !TEST_int_eq(SSL_shutdown(serverssl), 1)) in test_shutdown()
6045 SSL_free(serverssl); in test_shutdown()
6154 SSL *clientssl = NULL, *serverssl = NULL; in test_cert_cb_int() local
6181 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_cert_cb_int()
6203 ret = create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE); in test_cert_cb_int()
6213 SSL_free(serverssl); in test_cert_cb_int()
6280 SSL *clientssl = NULL, *serverssl = NULL; in test_client_cert_cb() local
6309 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_client_cert_cb()
6311 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_client_cert_cb()
6318 SSL_free(serverssl); in test_client_cert_cb()
6337 SSL *clientssl = NULL, *serverssl = NULL; in test_ca_names_int() local
6392 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ca_names_int()
6394 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ca_names_int()
6402 sktmp = SSL_get0_peer_CA_list(serverssl); in test_ca_names_int()
6433 SSL_free(serverssl); in test_ca_names_int()
6475 SSL *clientssl = NULL, *serverssl = NULL; in test_servername() local
6495 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_servername()
6511 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) in test_servername()
6516 || !TEST_str_eq(SSL_get_servername(serverssl, in test_servername()
6526 || !TEST_int_eq(SSL_shutdown(serverssl), 0)) in test_servername()
6530 SSL_free(serverssl); in test_servername()
6531 clientssl = serverssl = NULL; in test_servername()
6533 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_servername()
6589 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) in test_servername()
6593 || !TEST_true(SSL_session_reused(serverssl)) in test_servername()
6597 || !TEST_str_eq(SSL_get_servername(serverssl, in test_servername()
6606 SSL_free(serverssl); in test_servername()
6618 SSL *clientssl = NULL, *serverssl = NULL, *client2ssl = NULL; in test_ssl_dup() local
6629 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_dup()
6660 if (!TEST_true(create_ssl_connection(serverssl, client2ssl, SSL_ERROR_NONE))) in test_ssl_dup()
6673 SSL_free(serverssl); in test_ssl_dup()
6692 SSL *clientssl = NULL, *serverssl = NULL; in test_sni_tls13() local
6717 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_sni_tls13()
6719 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_sni_tls13()
6730 SSL_free(serverssl); in test_sni_tls13()