| /freebsd/crypto/openssl/test/ |
| H A D | sslapitest.c | 361 SSL *clientssl = NULL, *serverssl = NULL; in test_keylog() local 400 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog() 402 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_keylog() 422 if (!TEST_true(test_keylog_output(server_log_buffer, serverssl, in test_keylog() 423 SSL_get_session(serverssl), &expected))) in test_keylog() 429 SSL_free(serverssl); in test_keylog() 442 SSL *clientssl = NULL, *serverssl = NULL; in test_keylog_no_master_key() local 479 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog_no_master_key() 481 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_keylog_no_master_key() 498 || !TEST_true(test_keylog_output(server_log_buffer, serverssl, in test_keylog_no_master_key() [all …]
|
| H A D | sslbuffertest.c | 81 SSL *serverssl = NULL, *clientssl = NULL; in test_func() local 87 if (!TEST_true(create_ssl_objects(serverctx, clientctx, &serverssl, &clientssl, in test_func() 93 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) { in test_func() 144 …if (test >= 5 && (!TEST_true(SSL_free_buffers(serverssl)) || !TEST_true(checkbuffers(serverssl, 0)… in test_func() 147 …if (test >= 6 && (!TEST_true(SSL_free_buffers(serverssl)) || !TEST_true(checkbuffers(serverssl, 0)… in test_func() 149 …if (test >= 7 && (!TEST_true(SSL_alloc_buffers(serverssl)) || !TEST_true(checkbuffers(serverssl, 1… in test_func() 151 …if (test >= 8 && (!TEST_true(SSL_free_buffers(serverssl)) || !TEST_true(checkbuffers(serverssl, 0)… in test_func() 154 ret = SSL_read(serverssl, buf + len, sizeof(buf) - len); in test_func() 158 int ssl_error = SSL_get_error(serverssl, ret); in test_func() 176 SSL_free(serverssl); in test_func() [all …]
|
| H A D | rpktest.c | 102 SSL *clientssl = NULL, *serverssl = NULL; in test_rpk() local 258 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_rpk() 262 if (!TEST_int_gt(SSL_dane_enable(serverssl, NULL), 0)) in test_rpk() 268 if (!TEST_int_eq(SSL_use_PrivateKey_file(serverssl, privkey_file, SSL_FILETYPE_PEM), 1)) in test_rpk() 278 if (!TEST_int_eq(SSL_use_certificate_file(serverssl, cert_file, SSL_FILETYPE_PEM), 1)) in test_rpk() 280 if (!TEST_int_eq(SSL_check_private_key(serverssl), 1)) in test_rpk() 300 if (!TEST_true(SSL_add_expected_rpk(serverssl, pkey))) in test_rpk() 309 …SSL_set_verify(serverssl, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, rpk_verify_server_cb); in test_rpk() 358 if (!TEST_true(SSL_add_expected_rpk(serverssl, pkey))) in test_rpk() 367 …SSL_set_verify(serverssl, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT | SSL_VERIFY_POST_HAND… in test_rpk() [all …]
|
| H A D | dtlstest.c | 189 SSL *serverssl = NULL, *clientssl = NULL; in test_dtls_drop_records() local 220 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_dtls_drop_records() 222 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_dtls_drop_records() 228 SSL_shutdown(serverssl); in test_dtls_drop_records() 229 SSL_free(serverssl); in test_dtls_drop_records() 231 serverssl = clientssl = NULL; in test_dtls_drop_records() 250 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_dtls_drop_records() 260 DTLS_set_timer_cb(serverssl, timer_cb); in test_dtls_drop_records() 264 mempackbio = SSL_get_wbio(serverssl); in test_dtls_drop_records() 281 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) in test_dtls_drop_records() [all …]
|
| H A D | cert_comp_test.c | 126 SSL *clientssl = NULL, *serverssl = NULL; in test_ssl_cert_comp() local 193 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_ssl_cert_comp() 199 if (!TEST_true(SSL_set_app_data(serverssl, &server_seen))) in test_ssl_cert_comp() 202 SSL_set_info_callback(serverssl, cert_comp_info_cb); in test_ssl_cert_comp() 205 if (!TEST_int_eq(ssl_comp_cert(serverssl, expected_server), expected_server)) in test_ssl_cert_comp() 209 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) in test_ssl_cert_comp() 213 SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(serverssl); in test_ssl_cert_comp() 222 SSL_CONNECTION *sc = SSL_CONNECTION_FROM_SSL(serverssl); in test_ssl_cert_comp() 233 if (!TEST_true(*(int *)SSL_get_app_data(serverssl))) in test_ssl_cert_comp() 240 SSL_free(serverssl); in test_ssl_cert_comp()
|
| H A D | tls13groupselection_test.c | 368 SSL *clientssl = NULL, *serverssl = NULL; in test_invalidsyntax() local 387 &serverssl, &clientssl, in test_invalidsyntax() 397 SSL_free(serverssl); in test_invalidsyntax() 412 SSL *clientssl = NULL, *serverssl = NULL; in test_groupnegotiation() local 439 &serverssl, &clientssl, in test_groupnegotiation() 449 TEST_true_or_end(SSL_set1_groups_list(serverssl, current_test_vector->server_groups)); in test_groupnegotiation() 452 TEST_true_or_end(SSL_set_min_proto_version(serverssl, TLS1_3_VERSION)); in test_groupnegotiation() 455 SSL_set_options(serverssl, SSL_OP_CIPHER_SERVER_PREFERENCE); in test_groupnegotiation() 465 TEST_true_or_end(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)); in test_groupnegotiation() 473 negotiated_group_server = SSL_get_negotiated_group(serverssl); in test_groupnegotiation() [all …]
|
| H A D | recordlentest.c | 83 SSL *clientssl = NULL, *serverssl = NULL; in test_record_overflow() local 122 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_record_overflow() 126 serverbio = SSL_get_rbio(serverssl); in test_record_overflow() 139 if (!TEST_int_le(SSL_accept(serverssl), 0)) in test_record_overflow() 149 if (!TEST_true(create_ssl_connection(serverssl, clientssl, in test_record_overflow() 167 if (!TEST_false(SSL_read_ex(serverssl, &buf, sizeof(buf), &written))) in test_record_overflow() 177 SSL_free(serverssl); in test_record_overflow()
|
| H A D | asynciotest.c | 292 SSL *serverssl = NULL, *clientssl = NULL; in test_asyncio() local 324 if (!TEST_true(create_ssl_objects(serverctx, clientctx, &serverssl, in test_asyncio() 326 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_asyncio() 363 ret = SSL_read(serverssl, buf + len, sizeof(buf) - len); in test_asyncio() 367 int ssl_error = SSL_get_error(serverssl, ret); in test_asyncio() 379 SSL_free(serverssl); in test_asyncio() 380 clientssl = serverssl = NULL; in test_asyncio() 386 SSL_free(serverssl); in test_asyncio()
|
| H A D | ssl_handshake_rtt_test.c | 49 SSL *clientssl = NULL, *serverssl = NULL; in test_handshake_rtt() local 70 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in test_handshake_rtt() 74 s = SSL_CONNECTION_FROM_SSL(tst % 2 == 0 ? clientssl : serverssl); in test_handshake_rtt() 126 SSL_free(serverssl); in test_handshake_rtt()
|
| H A D | servername_test.c | 203 SSL *clientssl = NULL, *serverssl = NULL; in server_setup_sni() local 210 || !TEST_true(create_ssl_objects(sctx, cctx, &serverssl, &clientssl, in server_setup_sni() 215 SSL_set_tlsext_host_name(serverssl, host); in server_setup_sni() 217 if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE))) in server_setup_sni() 220 if (!TEST_ptr_null(SSL_get_servername(serverssl, in server_setup_sni() 228 SSL_free(serverssl); in server_setup_sni()
|
| H A D | quicapitest.c | 2784 SSL *clientssl = NULL, *serverssl = NULL, *qlistener = NULL; in test_ssl_accept_connection() local 2811 serverssl = SSL_accept_connection(qlistener, 0); in test_ssl_accept_connection() 2812 if (!TEST_ptr(serverssl) || !TEST_false(SSL_is_init_finished(serverssl))) in test_ssl_accept_connection() 2816 if (!TEST_true(create_bare_ssl_connection(serverssl, clientssl, in test_ssl_accept_connection() 2823 SSL_free(serverssl); in test_ssl_accept_connection() 2845 SSL *clientssl = NULL, *serverssl = NULL, *qlistener = NULL; in test_ssl_set_verify() local 2869 serverssl = SSL_accept_connection(qlistener, 0); in test_ssl_set_verify() 2872 if (!TEST_ptr(serverssl) in test_ssl_set_verify() 2873 || !TEST_true(create_bare_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE, 0, 0))) in test_ssl_set_verify() 2879 SSL_free(serverssl); in test_ssl_set_verify() [all …]
|
| /freebsd/crypto/openssl/test/helpers/ |
| H A D | ssltestlib.h | 29 int create_bare_ssl_connection(SSL *serverssl, SSL *clientssl, int want, 31 int create_bare_ssl_connection_ex(SSL *serverssl, SSL *clientssl, int want, 37 int create_ssl_connection(SSL *serverssl, SSL *clientssl, int want); 38 int create_ssl_connection_ex(SSL *serverssl, SSL *clientssl, int want, 40 void shutdown_ssl_connection(SSL *serverssl, SSL *clientssl);
|
| H A D | ssltestlib.c | 1126 SSL *serverssl = NULL, *clientssl = NULL; in create_ssl_objects2() local 1131 serverssl = *sssl; in create_ssl_objects2() 1132 else if (!TEST_ptr(serverssl = SSL_new(serverctx))) in create_ssl_objects2() 1148 SSL_set_bio(serverssl, s_to_c_bio, s_to_c_bio); in create_ssl_objects2() 1158 if (!TEST_true(SSL_get_rpoll_descriptor(serverssl, &rdesc)) in create_ssl_objects2() 1159 || !TEST_true(SSL_get_wpoll_descriptor(serverssl, &wdesc)) in create_ssl_objects2() 1166 *sssl = serverssl; in create_ssl_objects2() 1171 SSL_free(serverssl); in create_ssl_objects2() 1193 SSL *serverssl = NULL, *clientssl = NULL; in create_ssl_objects() local 1197 serverssl = *sssl; in create_ssl_objects() [all …]
|