Lines Matching refs:TEST_true
316 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_keylog()
327 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "RSA"))) in test_keylog()
330 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL) in test_keylog()
331 || !TEST_true(SSL_CTX_get_keylog_callback(sctx) == NULL)) in test_keylog()
334 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) in test_keylog()
338 if (!TEST_true(SSL_CTX_get_keylog_callback(sctx) in test_keylog()
343 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog()
345 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_keylog()
360 if (!TEST_true(test_keylog_output(client_log_buffer, clientssl, in test_keylog()
365 if (!TEST_true(test_keylog_output(server_log_buffer, serverssl, in test_keylog()
399 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_keylog_no_master_key()
402 || !TEST_true(SSL_CTX_set_max_early_data(sctx, in test_keylog_no_master_key()
406 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL) in test_keylog_no_master_key()
407 || !TEST_true(SSL_CTX_get_keylog_callback(sctx) == NULL)) in test_keylog_no_master_key()
411 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) in test_keylog_no_master_key()
416 if (!TEST_true(SSL_CTX_get_keylog_callback(sctx) in test_keylog_no_master_key()
421 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog_no_master_key()
423 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_keylog_no_master_key()
438 if (!TEST_true(test_keylog_output(client_log_buffer, clientssl, in test_keylog_no_master_key()
440 || !TEST_true(test_keylog_output(server_log_buffer, serverssl, in test_keylog_no_master_key()
459 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog_no_master_key()
461 || !TEST_true(SSL_set_session(clientssl, sess)) in test_keylog_no_master_key()
463 || !TEST_true(SSL_write_early_data(clientssl, NULL, 0, &written)) in test_keylog_no_master_key()
469 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_keylog_no_master_key()
471 || !TEST_true(SSL_session_reused(clientssl))) in test_keylog_no_master_key()
477 if (!TEST_true(test_keylog_output(client_log_buffer, clientssl, in test_keylog_no_master_key()
479 || !TEST_true(test_keylog_output(server_log_buffer, serverssl, in test_keylog_no_master_key()
545 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_client_hello_cb()
554 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_client_hello_cb()
556 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_client_hello_cb()
566 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_client_hello_cb()
601 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_ccs_change_cipher()
605 || !TEST_true(SSL_CTX_set_options(sctx, SSL_OP_NO_TICKET)) in test_ccs_change_cipher()
606 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
608 || !TEST_true(SSL_set_cipher_list(clientssl, "AES128-GCM-SHA256")) in test_ccs_change_cipher()
609 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ccs_change_cipher()
620 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
622 || !TEST_true(SSL_set_session(clientssl, sess)) in test_ccs_change_cipher()
623 || !TEST_true(SSL_set_cipher_list(clientssl, "AES256-GCM-SHA384:AES128-GCM-SHA256")) in test_ccs_change_cipher()
624 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ccs_change_cipher()
626 || !TEST_true(SSL_session_reused(clientssl)) in test_ccs_change_cipher()
627 || !TEST_true(SSL_session_reused(serverssl)) in test_ccs_change_cipher()
640 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ccs_change_cipher()
642 || !TEST_true(SSL_set_cipher_list(clientssl, "AES128-GCM-SHA256")) in test_ccs_change_cipher()
643 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ccs_change_cipher()
646 || !TEST_true(SSL_set_cipher_list(clientssl, "AES256-GCM-SHA384")) in test_ccs_change_cipher()
647 || !TEST_true(SSL_renegotiate(clientssl)) in test_ccs_change_cipher()
648 || !TEST_true(SSL_renegotiate_pending(clientssl))) in test_ccs_change_cipher()
714 if (!TEST_true(create_ssl_ctx_pair(smeth, cmeth, min_version, max_version, in execute_test_large_message()
745 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in execute_test_large_message()
747 || !TEST_true(create_ssl_connection(serverssl, clientssl, in execute_test_large_message()
755 if (!TEST_true(SSL_clear(serverssl))) in execute_test_large_message()
892 if (!TEST_true(create_ssl_ctx_pair(smeth, cmeth, prot, prot, &sctx, &cctx, in test_large_app_data()
896 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_large_app_data()
902 if (!TEST_true(SSL_set_options(serverssl, in test_large_app_data()
904 || !TEST_true(SSL_set_options(clientssl, in test_large_app_data()
914 if (!TEST_true(SSL_set_options(serverssl, SSL_OP_NO_ENCRYPT_THEN_MAC)) in test_large_app_data()
915 || !TEST_true(SSL_set_options(clientssl, in test_large_app_data()
920 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) in test_large_app_data()
923 if (!TEST_true(SSL_write_ex(clientssl, msg, SSL3_RT_MAX_PLAIN_LENGTH, in test_large_app_data()
929 if (!TEST_true(SSL_read_ex(serverssl, buf, SSL3_RT_MAX_PLAIN_LENGTH + 1, in test_large_app_data()
1015 || !TEST_true(SSL_set_tlsext_status_type(clientssl, in test_tlsext_status_type()
1042 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1044 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_tlsext_status_type()
1046 || !TEST_true(ocsp_client_called) in test_tlsext_status_type()
1047 || !TEST_true(ocsp_server_called)) in test_tlsext_status_type()
1058 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1078 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tlsext_status_type()
1091 || !TEST_true(OCSP_RESPID_set_by_key(id, ocspcert)) in test_tlsext_status_type()
1092 || !TEST_true(sk_OCSP_RESPID_push(ids, id))) in test_tlsext_status_type()
1102 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_tlsext_status_type()
1104 || !TEST_true(ocsp_client_called) in test_tlsext_status_type()
1105 || !TEST_true(ocsp_server_called)) in test_tlsext_status_type()
1172 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in execute_test_session()
1198 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl1, &clientssl1, in execute_test_session()
1200 || !TEST_true(create_ssl_connection(serverssl1, clientssl1, in execute_test_session()
1215 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
1217 || !TEST_true(SSL_set_session(clientssl2, sess1)) in execute_test_session()
1218 || !TEST_true(create_ssl_connection(serverssl2, clientssl2, in execute_test_session()
1220 || !TEST_true(SSL_session_reused(clientssl2))) in execute_test_session()
1251 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
1253 || !TEST_true(create_ssl_connection(serverssl2, clientssl2, in execute_test_session()
1270 if (!TEST_true(SSL_set_session(clientssl2, sess1))) in execute_test_session()
1280 if (!TEST_true(SSL_CTX_add_session(cctx, sess2)) in execute_test_session()
1281 || !TEST_true(SSL_CTX_remove_session(cctx, sess2))) in execute_test_session()
1298 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl3, in execute_test_session()
1300 || !TEST_true(SSL_set_session(clientssl3, sess1)) in execute_test_session()
1312 if (use_int_cache && !TEST_true(SSL_CTX_add_session(cctx, sess2))) in execute_test_session()
1348 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl1, &clientssl1, in execute_test_session()
1350 || !TEST_true(create_ssl_connection(serverssl1, clientssl1, in execute_test_session()
1387 || !TEST_true(SSL_CTX_remove_session(sctx, sess2))) in execute_test_session()
1396 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl2, in execute_test_session()
1398 || !TEST_true(SSL_set_session(clientssl2, sess1)) in execute_test_session()
1399 || !TEST_true(create_ssl_connection(serverssl2, clientssl2, in execute_test_session()
1401 || !TEST_true(SSL_session_reused(clientssl2))) in execute_test_session()
1501 if (!TEST_true(SSL_verify_client_post_handshake(sssl))) in post_handshake_verify()
1508 || !TEST_true(create_ssl_connection(sssl, cssl, in post_handshake_verify()
1520 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in setup_ticket_test()
1523 || !TEST_true(SSL_CTX_set_num_tickets(*sctx, idx)) in setup_ticket_test()
1524 || !TEST_true(SSL_CTX_set_session_id_context(*sctx, in setup_ticket_test()
1547 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in check_resumption()
1549 || !TEST_true(SSL_set_session(clientssl, sesscache[i]))) in check_resumption()
1554 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in check_resumption()
1563 if (!TEST_true(SSL_session_reused(clientssl)) in check_resumption()
1611 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tickets()
1615 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_tickets()
1655 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tickets()
1661 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_tickets()
1720 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_psk_tickets()
1723 || !TEST_true(SSL_CTX_set_session_id_context(sctx, in test_psk_tickets()
1738 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_psk_tickets()
1746 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_psk_tickets()
1846 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_ssl_set_bio()
1862 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_set_bio()
1899 && !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ssl_set_bio()
2073 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_set_sigalgs()
2105 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_set_sigalgs()
2295 || !TEST_true(SSL_SESSION_set1_master_key(sess, key, in create_a_psk()
2297 || !TEST_true(SSL_SESSION_set_cipher(sess, cipher)) in create_a_psk()
2298 || !TEST_true( in create_a_psk()
2315 && !TEST_true(create_ssl_ctx_pair(TLS_server_method(), in setupearly_data_test()
2321 if (!TEST_true(SSL_CTX_set_max_early_data(*sctx, SSL3_RT_MAX_PLAIN_LENGTH))) in setupearly_data_test()
2337 if (!TEST_true(create_ssl_objects(*sctx, *cctx, serverssl, clientssl, in setupearly_data_test()
2348 && !TEST_true(SSL_set_tlsext_host_name(*clientssl, "localhost"))) in setupearly_data_test()
2358 || !TEST_true(SSL_SESSION_set_max_early_data(clientpsk, in setupearly_data_test()
2360 || !TEST_true(SSL_SESSION_up_ref(clientpsk))) { in setupearly_data_test()
2368 if (!TEST_true(SSL_SESSION_up_ref(clientpsk))) { in setupearly_data_test()
2382 if (!TEST_true(create_ssl_connection(*serverssl, *clientssl, in setupearly_data_test()
2393 if (!TEST_true(create_ssl_objects(*sctx, *cctx, serverssl, in setupearly_data_test()
2395 || !TEST_true(SSL_set_session(*clientssl, *sess))) in setupearly_data_test()
2411 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_read_write()
2416 if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), in test_early_data_read_write()
2431 if (!TEST_true(SSL_write_early_data(serverssl, MSG2, strlen(MSG2), in test_early_data_read_write()
2434 || !TEST_true(SSL_read_ex(clientssl, buf, sizeof(buf), &readbytes)) in test_early_data_read_write()
2439 if (!TEST_true(SSL_write_early_data(clientssl, MSG3, strlen(MSG3), in test_early_data_read_write()
2452 if (!TEST_true(SSL_write_early_data(serverssl, MSG4, strlen(MSG4), in test_early_data_read_write()
2455 || !TEST_true(SSL_read_ex(clientssl, buf, sizeof(buf), &readbytes)) in test_early_data_read_write()
2463 if (!TEST_true(SSL_write_ex(clientssl, MSG5, strlen(MSG5), &written)) in test_early_data_read_write()
2476 if (!TEST_true(BIO_read_ex(rbio, data, sizeof(data), &rawread)) in test_early_data_read_write()
2483 if (!TEST_true(BIO_write_ex(rbio, data, eoedlen, &rawwritten)) in test_early_data_read_write()
2498 if (!TEST_true(SSL_write_early_data(serverssl, MSG6, strlen(MSG6), in test_early_data_read_write()
2504 if (!TEST_true(BIO_write_ex(rbio, data + eoedlen, rawread - eoedlen, in test_early_data_read_write()
2510 if (!TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_read_write()
2526 if (!TEST_true(SSL_read_ex(clientssl, buf, sizeof(buf), &readbytes)) in test_early_data_read_write()
2541 if (!TEST_true(SSL_write_ex(serverssl, MSG7, strlen(MSG7), &written)) in test_early_data_read_write()
2543 || !TEST_true(SSL_read_ex(clientssl, buf, sizeof(buf), &readbytes)) in test_early_data_read_write()
2557 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_early_data_read_write()
2559 || !TEST_true(SSL_set_session(clientssl, sess))) in test_early_data_read_write()
2563 if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), in test_early_data_read_write()
2588 if (!TEST_true(SSL_write_ex(clientssl, MSG5, strlen(MSG5), &written)) in test_early_data_read_write()
2590 || !TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_read_write()
2642 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_early_data_replay_int()
2668 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_replay_int()
2676 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)) in test_early_data_replay_int()
2677 || !TEST_true(SSL_session_reused(clientssl))) in test_early_data_replay_int()
2686 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_early_data_replay_int()
2688 || !TEST_true(SSL_set_session(clientssl, sess))) in test_early_data_replay_int()
2692 if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), in test_early_data_replay_int()
2728 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)) in test_early_data_replay_int()
2776 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in early_data_skip_helper()
2782 if (!TEST_true(SSL_set1_groups_list(serverssl, "P-256"))) in early_data_skip_helper()
2796 if (!TEST_true(SSL_SESSION_set_time(sess, (long)(time(NULL) - 20)))) in early_data_skip_helper()
2801 && !TEST_true(SSL_set_recv_max_early_data(serverssl, 0))) in early_data_skip_helper()
2805 if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), in early_data_skip_helper()
2857 if (!TEST_true(BIO_write_ex(wbio, bad_early_data, in early_data_skip_helper()
2886 if (!TEST_true(SSL_write_ex(clientssl, MSG2, strlen(MSG2), &written)) in early_data_skip_helper()
2890 || !TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in early_data_skip_helper()
2958 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_not_sent()
2979 if (!TEST_true(SSL_write_ex(clientssl, MSG1, strlen(MSG1), &written)) in test_early_data_not_sent()
2981 || !TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_not_sent()
2987 if (!TEST_true(SSL_read_ex(clientssl, buf, sizeof(buf), &readbytes)) in test_early_data_not_sent()
3052 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_psk()
3068 if (!TEST_true(SSL_SESSION_set1_hostname(sess, "goodhost")) in test_early_data_psk()
3069 || !TEST_true(SSL_set_tlsext_host_name(clientssl, "badhost"))) in test_early_data_psk()
3077 if (!TEST_true(SSL_SESSION_set1_alpn_selected(sess, GOODALPN, in test_early_data_psk()
3091 if (!TEST_true(SSL_SESSION_set_protocol_version(sess, TLS1_2_VERSION))) in test_early_data_psk()
3105 || !TEST_true(SSL_SESSION_set1_hostname(serverpsk, "badhost"))) in test_early_data_psk()
3110 if (!TEST_true(SSL_SESSION_set1_hostname(sess, "goodhost")) in test_early_data_psk()
3111 || !TEST_true(SSL_set_tlsext_host_name(clientssl, "goodhost")) in test_early_data_psk()
3112 || !TEST_true(SSL_CTX_set_tlsext_servername_callback(sctx, in test_early_data_psk()
3134 if (!TEST_true(SSL_SESSION_set1_alpn_selected(sess, GOODALPN + 1, in test_early_data_psk()
3148 || !TEST_true(SSL_SESSION_set1_alpn_selected(clientpsk, in test_early_data_psk()
3151 || !TEST_true(SSL_SESSION_set1_alpn_selected(serverpsk, in test_early_data_psk()
3177 if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), in test_early_data_psk()
3248 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_psk_with_all_ciphers()
3252 if (!TEST_true(SSL_set_ciphersuites(clientssl, cipher_str[idx])) in test_early_data_psk_with_all_ciphers()
3253 || !TEST_true(SSL_set_ciphersuites(serverssl, cipher_str[idx]))) in test_early_data_psk_with_all_ciphers()
3264 if (!TEST_ptr(cipher) || !TEST_true(SSL_SESSION_set_cipher(sess, cipher))) in test_early_data_psk_with_all_ciphers()
3268 if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), in test_early_data_psk_with_all_ciphers()
3283 if (!TEST_true(SSL_write_ex(clientssl, MSG2, strlen(MSG2), &written)) in test_early_data_psk_with_all_ciphers()
3287 if (!TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_psk_with_all_ciphers()
3321 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_not_expected()
3326 if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), in test_early_data_not_expected()
3344 if (!TEST_true(SSL_write_ex(clientssl, MSG2, strlen(MSG2), &written)) in test_early_data_not_expected()
3348 if (!TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_not_expected()
3380 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_early_data_tls1_2()
3414 if (!TEST_true(SSL_write_ex(clientssl, MSG1, strlen(MSG1), &written)) in test_early_data_tls1_2()
3418 || !TEST_true(SSL_read_ex(serverssl, buf, sizeof(buf), &readbytes)) in test_early_data_tls1_2()
3420 || !TEST_true(SSL_write_ex(serverssl, MSG2, strlen(MSG2), &written)) in test_early_data_tls1_2()
3461 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_set_ciphersuite()
3464 || !TEST_true(SSL_CTX_set_ciphersuites(sctx, in test_set_ciphersuite()
3470 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "AES256-GCM-SHA384"))) in test_set_ciphersuite()
3476 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_set_ciphersuite()
3481 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_set_ciphersuite()
3486 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_set_ciphersuite()
3492 if (!TEST_true(SSL_set_cipher_list(clientssl, "AES256-GCM-SHA384"))) in test_set_ciphersuite()
3498 if (!TEST_true(SSL_set_ciphersuites(clientssl, in test_set_ciphersuite()
3503 if (!TEST_true(SSL_set_ciphersuites(clientssl, in test_set_ciphersuite()
3508 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) in test_set_ciphersuite()
3531 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_ciphersuite_change()
3534 || !TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
3536 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
3538 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ciphersuite_change()
3553 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
3555 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
3557 || !TEST_true(SSL_set_session(clientssl, clntsess)) in test_ciphersuite_change()
3558 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ciphersuite_change()
3560 || !TEST_true(SSL_session_reused(clientssl))) in test_ciphersuite_change()
3576 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, "TLS_AES_256_GCM_SHA384")) in test_ciphersuite_change()
3577 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
3579 || !TEST_true(SSL_set_session(clientssl, clntsess)) in test_ciphersuite_change()
3580 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ciphersuite_change()
3594 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, "TLS_AES_256_GCM_SHA384")) in test_ciphersuite_change()
3595 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ciphersuite_change()
3597 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ciphersuite_change()
3608 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ciphersuite_change()
3610 || !TEST_true(SSL_CTX_set_ciphersuites(sctx, in test_ciphersuite_change()
3612 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ciphersuite_change()
3614 || !TEST_true(SSL_set_session(clientssl, clntsess)) in test_ciphersuite_change()
3706 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_tls13_ciphersuite()
3713 if (!TEST_true(SSL_CTX_set_ciphersuites(sctx, t13_cipher)) in test_tls13_ciphersuite()
3714 || !TEST_true(SSL_CTX_set_ciphersuites(cctx, t13_cipher))) in test_tls13_ciphersuite()
3717 if (!TEST_true(SSL_CTX_set_cipher_list(sctx, t12_cipher)) in test_tls13_ciphersuite()
3718 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_tls13_ciphersuite()
3724 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_tls13_ciphersuite()
3729 if (!TEST_true(SSL_set_ciphersuites(serverssl, t13_cipher)) in test_tls13_ciphersuite()
3730 || !TEST_true(SSL_set_ciphersuites(clientssl, t13_cipher))) in test_tls13_ciphersuite()
3733 if (!TEST_true(SSL_set_cipher_list(serverssl, t12_cipher)) in test_tls13_ciphersuite()
3734 || !TEST_true(SSL_set_cipher_list(clientssl, in test_tls13_ciphersuite()
3740 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_tls13_ciphersuite()
3807 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_tls13_psk()
3820 if (!TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_tls13_psk()
3851 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
3853 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_tls13_psk()
3860 if (!TEST_true(use_session_cb_cnt == 1) in test_tls13_psk()
3861 || !TEST_true(find_session_cb_cnt == 0) in test_tls13_psk()
3866 || !TEST_true(psk_client_cb_cnt == idx) in test_tls13_psk()
3867 || !TEST_true(psk_server_cb_cnt == 0)) in test_tls13_psk()
3870 if (!TEST_true(use_session_cb_cnt == 0) in test_tls13_psk()
3871 || !TEST_true(find_session_cb_cnt == 0) in test_tls13_psk()
3872 || !TEST_true(psk_client_cb_cnt == 1) in test_tls13_psk()
3873 || !TEST_true(psk_server_cb_cnt == 0)) in test_tls13_psk()
3882 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
3891 || !TEST_true(SSL_SESSION_set1_master_key(clientpsk, key, in test_tls13_psk()
3893 || !TEST_true(SSL_SESSION_set_cipher(clientpsk, cipher)) in test_tls13_psk()
3894 || !TEST_true(SSL_SESSION_set_protocol_version(clientpsk, in test_tls13_psk()
3896 || !TEST_true(SSL_SESSION_up_ref(clientpsk))) in test_tls13_psk()
3901 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)) in test_tls13_psk()
3902 || !TEST_true(SSL_session_reused(clientssl)) in test_tls13_psk()
3903 || !TEST_true(SSL_session_reused(serverssl))) in test_tls13_psk()
3907 if (!TEST_true(use_session_cb_cnt == 1) in test_tls13_psk()
3908 || !TEST_true(find_session_cb_cnt == 1) in test_tls13_psk()
3909 || !TEST_true(psk_client_cb_cnt == 0) in test_tls13_psk()
3910 || !TEST_true(psk_server_cb_cnt == 0)) in test_tls13_psk()
3913 if (!TEST_true(use_session_cb_cnt == 0) in test_tls13_psk()
3914 || !TEST_true(find_session_cb_cnt == 0) in test_tls13_psk()
3915 || !TEST_true(psk_client_cb_cnt == 1) in test_tls13_psk()
3916 || !TEST_true(psk_server_cb_cnt == 1)) in test_tls13_psk()
3925 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
3930 if (!TEST_true(SSL_set1_groups_list(serverssl, "P-256"))) in test_tls13_psk()
3937 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)) in test_tls13_psk()
3938 || !TEST_true(SSL_session_reused(clientssl)) in test_tls13_psk()
3939 || !TEST_true(SSL_session_reused(serverssl))) in test_tls13_psk()
3943 if (!TEST_true(use_session_cb_cnt == 2) in test_tls13_psk()
3944 || !TEST_true(find_session_cb_cnt == 2) in test_tls13_psk()
3945 || !TEST_true(psk_client_cb_cnt == 0) in test_tls13_psk()
3946 || !TEST_true(psk_server_cb_cnt == 0)) in test_tls13_psk()
3949 if (!TEST_true(use_session_cb_cnt == 0) in test_tls13_psk()
3950 || !TEST_true(find_session_cb_cnt == 0) in test_tls13_psk()
3951 || !TEST_true(psk_client_cb_cnt == 2) in test_tls13_psk()
3952 || !TEST_true(psk_server_cb_cnt == 2)) in test_tls13_psk()
3967 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_tls13_psk()
3969 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_tls13_psk()
3976 if (!TEST_true(use_session_cb_cnt == 1) in test_tls13_psk()
3977 || !TEST_true(find_session_cb_cnt == 1) in test_tls13_psk()
3978 || !TEST_true(psk_client_cb_cnt == 0) in test_tls13_psk()
3983 || !TEST_true(psk_server_cb_cnt == idx)) in test_tls13_psk()
3986 if (!TEST_true(use_session_cb_cnt == 0) in test_tls13_psk()
3987 || !TEST_true(find_session_cb_cnt == 0) in test_tls13_psk()
3988 || !TEST_true(psk_client_cb_cnt == 1) in test_tls13_psk()
3989 || !TEST_true(psk_server_cb_cnt == 1)) in test_tls13_psk()
4055 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_stateless()
4063 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
4087 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
4104 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_stateless()
4117 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_stateless()
4285 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_custom_exts()
4291 && !TEST_true(create_ssl_ctx_pair(TLS_server_method(), NULL, in test_custom_exts()
4331 if (!TEST_true(SSL_CTX_add_client_custom_ext(cctx, TEST_EXT_TYPE1, in test_custom_exts()
4337 if (!TEST_true(SSL_CTX_add_custom_ext(cctx, TEST_EXT_TYPE1, context, in test_custom_exts()
4356 if (!TEST_true(SSL_CTX_add_server_custom_ext(sctx, TEST_EXT_TYPE1, in test_custom_exts()
4362 if (!TEST_true(SSL_CTX_add_custom_ext(sctx, TEST_EXT_TYPE1, context, in test_custom_exts()
4367 && !TEST_true(SSL_CTX_add_custom_ext(sctx2, TEST_EXT_TYPE1, in test_custom_exts()
4387 if (!TEST_true(SSL_CTX_set_tlsext_servername_callback(sctx, sni_cb)) in test_custom_exts()
4388 || !TEST_true(SSL_CTX_set_tlsext_servername_arg(sctx, sctx2))) in test_custom_exts()
4392 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_custom_exts()
4394 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_custom_exts()
4440 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_custom_exts()
4442 || !TEST_true(SSL_set_session(clientssl, sess)) in test_custom_exts()
4443 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_custom_exts()
4578 if (!TEST_true(create_ssl_ctx_pair(TLS_method(), in test_serverinfo_custom()
4586 if (!TEST_true(SSL_CTX_use_serverinfo_ex(sctx, serverinfo_version, in test_serverinfo_custom()
4590 if (!TEST_true(SSL_CTX_use_serverinfo(sctx, si, si_len))) in test_serverinfo_custom()
4594 if (!TEST_true(SSL_CTX_add_custom_ext(cctx, TLSEXT_TYPE_signed_certificate_timestamp, in test_serverinfo_custom()
4599 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_serverinfo_custom()
4601 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_serverinfo_custom()
4606 if (!TEST_true(cb_result)) in test_serverinfo_custom()
4664 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_export_key_mat()
4673 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_export_key_mat()
4686 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_export_key_mat()
4803 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, &serverssl, in test_export_key_mat_early()
4808 if (!TEST_true(SSL_write_early_data(clientssl, NULL, 0, &written)) in test_export_key_mat_early()
4872 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_key_update()
4877 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update()
4879 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_key_update()
4886 if (!TEST_true(SSL_key_update(clientssl, in test_key_update()
4890 || !TEST_true(SSL_do_handshake(clientssl))) in test_key_update()
4935 || !TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_key_update_in_write()
4940 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_key_update_in_write()
4942 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_key_update_in_write()
4949 if (!TEST_true(SSL_key_update(peerupdate, SSL_KEY_UPDATE_REQUESTED)) in test_key_update_in_write()
4950 || !TEST_true(SSL_do_handshake(peerupdate))) in test_key_update_in_write()
4955 if (!TEST_ptr(tmp) || !TEST_true(BIO_up_ref(tmp))) { in test_key_update_in_write()
5015 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_ssl_clear()
5019 && !TEST_true(SSL_CTX_set_max_proto_version(cctx, in test_ssl_clear()
5021 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ssl_clear()
5023 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ssl_clear()
5033 if (!TEST_true(SSL_clear(clientssl))) in test_ssl_clear()
5036 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_clear()
5038 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ssl_clear()
5040 || !TEST_true(SSL_session_reused(clientssl))) in test_ssl_clear()
5068 if (!TEST_true( PACKET_buf_init( &pkt, data, len ) ) in get_MFL_from_client_hello()
5072 || !TEST_true(PACKET_forward(&pkt, SSL3_HM_HEADER_LENGTH)) in get_MFL_from_client_hello()
5074 || !TEST_true(PACKET_forward(&pkt, CLIENT_VERSION_LEN in get_MFL_from_client_hello()
5077 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in get_MFL_from_client_hello()
5079 || !TEST_true(PACKET_get_length_prefixed_2(&pkt, &pkt2)) in get_MFL_from_client_hello()
5081 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in get_MFL_from_client_hello()
5083 || !TEST_true(PACKET_as_length_prefixed_2(&pkt, &pkt2))) in get_MFL_from_client_hello()
5088 if (!TEST_true(PACKET_get_net_2(&pkt2, &type)) in get_MFL_from_client_hello()
5089 || !TEST_true(PACKET_get_length_prefixed_2(&pkt2, &pkt3))) in get_MFL_from_client_hello()
5094 || !TEST_true(PACKET_get_1(&pkt3, &MFL_code))) in get_MFL_from_client_hello()
5125 if (!TEST_true(SSL_CTX_set_tlsext_max_fragment_length( in test_max_fragment_len_ext()
5149 if (!TEST_true(get_MFL_from_client_hello(wbio, &MFL_mode))) in test_max_fragment_len_ext()
5152 if (!TEST_true(max_fragment_len_test[idx_tst] == MFL_mode)) in test_max_fragment_len_ext()
5171 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_pha_key_update()
5176 if (!TEST_true(SSL_CTX_set_min_proto_version(sctx, TLS1_3_VERSION)) in test_pha_key_update()
5177 || !TEST_true(SSL_CTX_set_max_proto_version(sctx, TLS1_3_VERSION)) in test_pha_key_update()
5178 || !TEST_true(SSL_CTX_set_min_proto_version(cctx, TLS1_3_VERSION)) in test_pha_key_update()
5179 || !TEST_true(SSL_CTX_set_max_proto_version(cctx, TLS1_3_VERSION))) in test_pha_key_update()
5184 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_pha_key_update()
5188 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_pha_key_update()
5193 if (!TEST_true(SSL_verify_client_post_handshake(serverssl))) in test_pha_key_update()
5196 if (!TEST_true(SSL_key_update(clientssl, SSL_KEY_UPDATE_NOT_REQUESTED))) in test_pha_key_update()
5204 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_pha_key_update()
5293 || !TEST_true(TXT_DB_insert(db, row))) in create_new_vfile()
5326 if (!TEST_true(SRP_create_verifier_BN(userid, password, &salt, &verifier, in create_new_vbase()
5380 if (!TEST_true(create_new_vbase(userid, password))) in test_srp()
5384 if (!TEST_true(create_new_vfile(userid, password, tmpfilename))) in test_srp()
5394 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_srp()
5400 || !TEST_true(SSL_CTX_set_cipher_list(cctx, "SRP-AES-128-CBC-SHA")) in test_srp()
5401 || !TEST_true(SSL_CTX_set_max_proto_version(sctx, TLS1_2_VERSION)) in test_srp()
5402 || !TEST_true(SSL_CTX_set_max_proto_version(cctx, TLS1_2_VERSION)) in test_srp()
5414 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_srp()
5420 if (!TEST_true(tst % 2 == 0)) in test_srp()
5423 if (!TEST_true(tst % 2 == 1)) in test_srp()
5558 if (!TEST_true((where & state[info_cb_this_state].where) != 0)) { in sslapi_info_callback()
5625 if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, in test_info_callback()
5636 if (!TEST_true(SSL_write_early_data(clientssl, MSG1, strlen(MSG1), in test_info_callback()
5645 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_info_callback()
5655 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_info_callback()
5668 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_info_callback()
5670 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_info_callback()
5685 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_info_callback()
5687 || !TEST_true(SSL_set_session(clientssl, clntsess)) in test_info_callback()
5688 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_info_callback()
5690 || !TEST_true(SSL_session_reused(clientssl)) in test_info_callback()
5715 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_ssl_pending()
5722 if (!TEST_true(create_ssl_ctx_pair(DTLS_server_method(), in test_ssl_pending()
5732 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_pending()
5734 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ssl_pending()
5742 || !TEST_true(SSL_write_ex(serverssl, msg, sizeof(msg), &written)) in test_ssl_pending()
5744 || !TEST_true(SSL_read_ex(clientssl, buf, sizeof(buf), &readbytes)) in test_ssl_pending()
5747 || !TEST_true(SSL_has_pending(clientssl))) in test_ssl_pending()
5834 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_ssl_get_shared_ciphers()
5841 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, in test_ssl_get_shared_ciphers()
5844 && !TEST_true(SSL_CTX_set_ciphersuites(cctx, in test_ssl_get_shared_ciphers()
5846 || !TEST_true(SSL_CTX_set_cipher_list(sctx, in test_ssl_get_shared_ciphers()
5849 && !TEST_true(SSL_CTX_set_ciphersuites(sctx, in test_ssl_get_shared_ciphers()
5854 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_get_shared_ciphers()
5856 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ssl_get_shared_ciphers()
5904 if (!TEST_true(status == SSL_TICKET_SUCCESS in dec_tick_cb()
5908 if (!TEST_true(SSL_SESSION_get0_ticket_appdata(ss, &tickdata, in dec_tick_cb()
6017 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_ticket_callbacks()
6029 if (!TEST_true(SSL_CTX_set_session_cache_mode(sctx, SSL_SESS_CACHE_OFF))) in test_ticket_callbacks()
6032 if (!TEST_true(SSL_CTX_set_session_ticket_cb(sctx, gen_tick_cb, dec_tick_cb, in test_ticket_callbacks()
6037 && !TEST_true(SSL_CTX_set_tlsext_ticket_key_cb(sctx, tick_key_cb))) in test_ticket_callbacks()
6040 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ticket_callbacks()
6042 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ticket_callbacks()
6067 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_ticket_callbacks()
6069 || !TEST_true(SSL_set_session(clientssl, clntsess)) in test_ticket_callbacks()
6070 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ticket_callbacks()
6079 if (!TEST_true(SSL_session_reused(clientssl))) in test_ticket_callbacks()
6135 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_shutdown()
6146 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_shutdown()
6151 if (!TEST_true(create_bare_ssl_connection(serverssl, clientssl, in test_shutdown()
6156 } else if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_shutdown()
6159 || !TEST_true(SSL_SESSION_is_resumable(sess))) { in test_shutdown()
6180 || !TEST_true(SSL_write(serverssl, msg, sizeof(msg)))) in test_shutdown()
6183 && !TEST_true(SSL_key_update(serverssl, in test_shutdown()
6188 if (!TEST_true(SSL_verify_client_post_handshake(serverssl))) in test_shutdown()
6192 && !TEST_true(SSL_write(serverssl, msg, sizeof(msg)))) in test_shutdown()
6198 if (!TEST_true(SSL_read_ex(clientssl, buf, sizeof(buf), in test_shutdown()
6202 || !TEST_true(SSL_read_ex(clientssl, buf, sizeof(buf), in test_shutdown()
6228 || !TEST_true(SSL_SESSION_is_resumable(sess)) in test_shutdown()
6239 || !TEST_true(SSL_SESSION_is_resumable(sess))) in test_shutdown()
6290 if (!TEST_true(SSL_use_certificate_file(s, cert, SSL_FILETYPE_PEM)) in cert_cb()
6291 || !TEST_true(SSL_use_PrivateKey_file(s, privkey, in cert_cb()
6293 || !TEST_true(SSL_check_private_key(s))) in cert_cb()
6311 || !TEST_true(sk_X509_push(chain, rootx))) in cert_cb()
6375 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_cert_cb_int()
6393 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_cert_cb_int()
6402 if (!TEST_true(SSL_set1_sigalgs_list(clientssl, in test_cert_cb_int()
6410 if (!TEST_true(SSL_set1_sigalgs_list(clientssl, in test_cert_cb_int()
6416 if (!TEST_true(tst == 0 || tst == 4 || tst == 5 ? !ret : ret) in test_cert_cb_int()
6504 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_client_cert_cb()
6521 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_client_cert_cb()
6523 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_client_cert_cb()
6560 || !TEST_true(X509_NAME_add_entry_by_txt(name[i], "CN", in test_ca_names_int()
6568 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_ca_names_int()
6579 || !TEST_true(sk_X509_NAME_push(sk1, X509_NAME_dup(name[0]))) in test_ca_names_int()
6580 || !TEST_true(sk_X509_NAME_push(sk1, X509_NAME_dup(name[1]))) in test_ca_names_int()
6582 || !TEST_true(sk_X509_NAME_push(sk2, X509_NAME_dup(name[0]))) in test_ca_names_int()
6583 || !TEST_true(sk_X509_NAME_push(sk2, X509_NAME_dup(name[1])))) in test_ca_names_int()
6592 || !TEST_true(sk_X509_NAME_push(sk1, X509_NAME_dup(name[2]))) in test_ca_names_int()
6593 || !TEST_true(sk_X509_NAME_push(sk1, X509_NAME_dup(name[3]))) in test_ca_names_int()
6595 || !TEST_true(sk_X509_NAME_push(sk2, X509_NAME_dup(name[2]))) in test_ca_names_int()
6596 || !TEST_true(sk_X509_NAME_push(sk2, X509_NAME_dup(name[3])))) in test_ca_names_int()
6604 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ca_names_int()
6606 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_ca_names_int()
6701 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_servername()
6707 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_servername()
6712 if (!TEST_true(SSL_CTX_set_tlsext_servername_callback(sctx, in test_servername()
6718 if (!TEST_true(SSL_set_tlsext_host_name(clientssl, "goodhost"))) in test_servername()
6723 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) in test_servername()
6737 || !TEST_true(SSL_SESSION_is_resumable(sess)) in test_servername()
6745 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, NULL, in test_servername()
6749 if (!TEST_true(SSL_set_session(clientssl, sess))) in test_servername()
6755 if (!TEST_true(SSL_set_tlsext_host_name(clientssl, "altgoodhost"))) in test_servername()
6781 if (!TEST_true(SSL_set_tlsext_host_name(clientssl, "goodhost"))) in test_servername()
6801 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) in test_servername()
6804 if (!TEST_true(SSL_session_reused(clientssl)) in test_servername()
6805 || !TEST_true(SSL_session_reused(serverssl)) in test_servername()
6834 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_ssl_dup()
6841 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_dup()
6845 if (!TEST_true(SSL_set_min_proto_version(clientssl, TLS1_2_VERSION)) in test_ssl_dup()
6846 || !TEST_true(SSL_set_max_proto_version(clientssl, TLS1_2_VERSION))) in test_ssl_dup()
6852 || !TEST_true(BIO_up_ref(rbio))) in test_ssl_dup()
6858 if (!TEST_ptr(wbio) || !TEST_true(BIO_up_ref(wbio))) in test_ssl_dup()
6872 if (!TEST_true(create_ssl_connection(serverssl, client2ssl, SSL_ERROR_NONE))) in test_ssl_dup()
6915 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), TLS_client_method(), in test_sni_tls13()
6921 if (!TEST_true(SSL_CTX_set_tlsext_servername_callback(sctx, sni_cb)) in test_sni_tls13()
6922 || !TEST_true(SSL_CTX_set_tlsext_servername_arg(sctx, sctx2))) in test_sni_tls13()
6929 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_sni_tls13()
6931 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_sni_tls13()
6974 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_ticket_lifetime()
6979 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_ticket_lifetime()
6991 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) in test_ticket_lifetime()
7041 if (!TEST_true(SSL_CTX_set_alpn_protos(ctx, good, 1))) in test_set_alpn()
7043 if (!TEST_true(SSL_CTX_set_alpn_protos(ctx, bad0, sizeof(bad0)))) in test_set_alpn()
7045 if (!TEST_true(SSL_CTX_set_alpn_protos(ctx, bad1, sizeof(bad1)))) in test_set_alpn()
7047 if (!TEST_true(SSL_CTX_set_alpn_protos(ctx, bad2, sizeof(bad2)))) in test_set_alpn()
7049 if (!TEST_true(SSL_CTX_set_alpn_protos(ctx, bad3, sizeof(bad3)))) in test_set_alpn()
7051 if (!TEST_true(SSL_CTX_set_alpn_protos(ctx, bad4, sizeof(bad4)))) in test_set_alpn()
7064 if (!TEST_true(SSL_set_alpn_protos(ssl, good, 1))) in test_set_alpn()
7066 if (!TEST_true(SSL_set_alpn_protos(ssl, bad0, sizeof(bad0)))) in test_set_alpn()
7068 if (!TEST_true(SSL_set_alpn_protos(ssl, bad1, sizeof(bad1)))) in test_set_alpn()
7070 if (!TEST_true(SSL_set_alpn_protos(ssl, bad2, sizeof(bad2)))) in test_set_alpn()
7072 if (!TEST_true(SSL_set_alpn_protos(ssl, bad3, sizeof(bad3)))) in test_set_alpn()
7074 if (!TEST_true(SSL_set_alpn_protos(ssl, bad4, sizeof(bad4)))) in test_set_alpn()
7101 if (!TEST_true(SSL_CTX_get0_verify_cert_store(ctx, &store))) in test_set_verify_cert_store_ssl_ctx()
7105 if (!TEST_true(SSL_CTX_get0_chain_cert_store(ctx, &cstore))) in test_set_verify_cert_store_ssl_ctx()
7122 if (!TEST_true(SSL_CTX_set1_verify_cert_store(ctx, new_store))) in test_set_verify_cert_store_ssl_ctx()
7125 if (!TEST_true(SSL_CTX_set1_chain_cert_store(ctx, new_cstore))) in test_set_verify_cert_store_ssl_ctx()
7129 if (!TEST_true(SSL_CTX_get0_verify_cert_store(ctx, &store))) in test_set_verify_cert_store_ssl_ctx()
7132 if (!TEST_true(SSL_CTX_get0_chain_cert_store(ctx, &cstore))) in test_set_verify_cert_store_ssl_ctx()
7139 if (!TEST_true(SSL_CTX_set1_verify_cert_store(ctx, NULL))) in test_set_verify_cert_store_ssl_ctx()
7142 if (!TEST_true(SSL_CTX_set1_chain_cert_store(ctx, NULL))) in test_set_verify_cert_store_ssl_ctx()
7146 if (!TEST_true(SSL_CTX_get0_verify_cert_store(ctx, &store))) in test_set_verify_cert_store_ssl_ctx()
7149 if (!TEST_true(SSL_CTX_get0_chain_cert_store(ctx, &cstore))) in test_set_verify_cert_store_ssl_ctx()
7186 if (!TEST_true(SSL_get0_verify_cert_store(ssl, &store))) in test_set_verify_cert_store_ssl()
7190 if (!TEST_true(SSL_get0_chain_cert_store(ssl, &cstore))) in test_set_verify_cert_store_ssl()
7207 if (!TEST_true(SSL_set1_verify_cert_store(ssl, new_store))) in test_set_verify_cert_store_ssl()
7210 if (!TEST_true(SSL_set1_chain_cert_store(ssl, new_cstore))) in test_set_verify_cert_store_ssl()
7214 if (!TEST_true(SSL_get0_verify_cert_store(ssl, &store))) in test_set_verify_cert_store_ssl()
7217 if (!TEST_true(SSL_get0_chain_cert_store(ssl, &cstore))) in test_set_verify_cert_store_ssl()
7224 if (!TEST_true(SSL_set1_verify_cert_store(ssl, NULL))) in test_set_verify_cert_store_ssl()
7227 if (!TEST_true(SSL_set1_chain_cert_store(ssl, NULL))) in test_set_verify_cert_store_ssl()
7231 if (!TEST_true(SSL_get0_verify_cert_store(ssl, &store))) in test_set_verify_cert_store_ssl()
7234 if (!TEST_true(SSL_get0_chain_cert_store(ssl, &cstore))) in test_set_verify_cert_store_ssl()