Lines Matching refs:clientquic

53     SSL *clientquic = NULL;  in test_quic_write_read()  local
74 &qtserv, &clientquic, in test_quic_write_read()
76 || !TEST_true(SSL_set_tlsext_host_name(clientquic, "localhost"))) in test_quic_write_read()
79 if (sess != NULL && !TEST_true(SSL_set_session(clientquic, sess))) in test_quic_write_read()
82 if (!TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_quic_write_read()
89 if (!TEST_int_gt(csock = SSL_get_rfd(clientquic), 0)) in test_quic_write_read()
97 if (!TEST_true(SSL_write_ex(clientquic, msg, msglen, &numbytes)) in test_quic_write_read()
127 SSL_handle_events(clientquic); in test_quic_write_read()
130 if (!TEST_false(SSL_read_ex(clientquic, buf, 1, &numbytes)) in test_quic_write_read()
131 || !TEST_int_eq(SSL_get_error(clientquic, 0), in test_quic_write_read()
133 || !TEST_false(SSL_write_ex(clientquic, msg, msglen, in test_quic_write_read()
135 || !TEST_int_eq(SSL_get_error(clientquic, 0), in test_quic_write_read()
146 if (!TEST_true(SSL_read_ex(clientquic, buf, 1, &numbytes)) in test_quic_write_read()
148 || !TEST_true(SSL_has_pending(clientquic)) in test_quic_write_read()
149 || !TEST_int_eq(SSL_pending(clientquic), msglen - 1) in test_quic_write_read()
150 || !TEST_true(SSL_read_ex(clientquic, buf + 1, in test_quic_write_read()
157 if (!TEST_true(SSL_export_keying_material(clientquic, scratch, in test_quic_write_read()
164 if (!TEST_false(SSL_session_reused(clientquic))) in test_quic_write_read()
167 sess = SSL_get1_session(clientquic); in test_quic_write_read()
172 if (!TEST_true(SSL_session_reused(clientquic))) in test_quic_write_read()
176 if (!TEST_true(qtest_shutdown(qtserv, clientquic))) in test_quic_write_read()
188 SSL_free(clientquic); in test_quic_write_read()
189 clientquic = NULL; in test_quic_write_read()
200 SSL_free(clientquic); in test_quic_write_read()
215 SSL *clientquic = NULL; in test_fin_only_blocking() local
231 &qtserv, &clientquic, in test_fin_only_blocking()
233 || !TEST_true(SSL_set_tlsext_host_name(clientquic, "localhost"))) in test_fin_only_blocking()
236 if (!TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_fin_only_blocking()
248 if (!TEST_true(SSL_read_ex(clientquic, buf, sizeof(buf), &numbytes)) in test_fin_only_blocking()
258 if (!TEST_false(SSL_read_ex(clientquic, buf, sizeof(buf), &numbytes))) in test_fin_only_blocking()
262 if (!TEST_int_eq(SSL_get_error(clientquic, 0), SSL_ERROR_ZERO_RETURN) in test_fin_only_blocking()
270 if (!TEST_true(qtest_shutdown(qtserv, clientquic))) in test_fin_only_blocking()
277 SSL_free(clientquic); in test_fin_only_blocking()
346 SSL *clientquic = NULL; in test_cipher_find() local
367 clientquic = SSL_new(cctx); in test_cipher_find()
368 if (!TEST_ptr(clientquic)) in test_cipher_find()
373 if (!TEST_ptr(SSL_CIPHER_find(clientquic, in test_cipher_find()
377 if (!TEST_ptr_null(SSL_CIPHER_find(clientquic, in test_cipher_find()
384 SSL_free(clientquic); in test_cipher_find()
399 SSL *clientquic = NULL; in test_version() local
406 &clientquic, NULL, NULL)) in test_version()
407 || !TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_version()
410 if (!TEST_int_eq(SSL_version(clientquic), OSSL_QUIC1_VERSION) in test_version()
411 || !TEST_str_eq(SSL_get_version(clientquic), "QUICv1")) in test_version()
414 if (!TEST_true(SSL_is_quic(clientquic)) in test_version()
415 || !TEST_false(SSL_is_tls(clientquic)) in test_version()
416 || !TEST_false(SSL_is_dtls(clientquic))) in test_version()
423 SSL_free(clientquic); in test_version()
514 SSL *clientquic = NULL; in test_ssl_trace() local
526 &clientquic, NULL, NULL))) in test_ssl_trace()
529 SSL_set_msg_callback(clientquic, SSL_trace); in test_ssl_trace()
530 SSL_set_msg_callback_arg(clientquic, bio); in test_ssl_trace()
532 if (!TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_ssl_trace()
548 SSL_free(clientquic); in test_ssl_trace()
837 SSL *clientquic = NULL, *stream = NULL; in test_bio_ssl() local
858 if (!TEST_int_eq(BIO_get_ssl(cbio, &clientquic), 1)) in test_bio_ssl()
862 0, &qtserv, &clientquic, NULL, in test_bio_ssl()
924 if (!TEST_true(SSL_set_mode(clientquic, 0))) in test_bio_ssl()
934 stream = SSL_new_stream(clientquic, 0); in test_bio_ssl()
974 SSL *clientquic = NULL; in test_back_pressure() local
986 &clientquic, NULL, NULL)) in test_back_pressure()
987 || !TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_back_pressure()
1002 if (!SSL_write_ex(clientquic, msg, msglen, &written)) { in test_back_pressure()
1004 if (SSL_get_error(clientquic, 0) == SSL_ERROR_WANT_WRITE) in test_back_pressure()
1024 SSL_free(clientquic); in test_back_pressure()
1051 SSL *clientquic = NULL; in test_multiple_dgrams() local
1064 &clientquic, NULL, NULL)) in test_multiple_dgrams()
1065 || !TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_multiple_dgrams()
1069 SSL_set_msg_callback(clientquic, dgram_cb); in test_multiple_dgrams()
1070 if (!TEST_true(SSL_write_ex(clientquic, buf, buflen, &written)) in test_multiple_dgrams()
1079 SSL_free(clientquic); in test_multiple_dgrams()
1112 SSL *clientquic = NULL; in test_non_io_retry() local
1128 flags, &qtserv, &clientquic, NULL, in test_non_io_retry()
1130 || !TEST_true(qtest_create_quic_connection_ex(qtserv, clientquic, in test_non_io_retry()
1132 || !TEST_int_eq(SSL_want(clientquic), SSL_RETRY_VERIFY)) in test_non_io_retry()
1136 if (!TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_non_io_retry()
1141 SSL_free(clientquic); in test_non_io_retry()
1192 SSL *clientquic = NULL; in test_quic_psk() local
1200 &clientquic, NULL, NULL))) in test_quic_psk()
1203 SSL_set_psk_use_session_callback(clientquic, use_session_cb); in test_quic_psk()
1208 clientpsk = serverpsk = create_a_psk(clientquic, SHA384_DIGEST_LENGTH); in test_quic_psk()
1214 if (!TEST_true(qtest_create_quic_connection(qtserv, clientquic)) in test_quic_psk()
1218 || !TEST_true(SSL_session_reused(clientquic))) in test_quic_psk()
1224 SSL_free(clientquic); in test_quic_psk()
1238 SSL *clientquic = NULL; in test_client_auth() local
1263 &clientquic, NULL, NULL))) in test_client_auth()
1273 if (!TEST_false(qtest_create_quic_connection(qtserv, clientquic))) in test_client_auth()
1281 if (!TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_client_auth()
1285 if (!TEST_true(SSL_write_ex(clientquic, msg, msglen, &numbytes)) in test_client_auth()
1296 SSL_handle_events(clientquic); in test_client_auth()
1298 if (!TEST_true(SSL_read_ex(clientquic, buf, sizeof(buf), &numbytes)) in test_client_auth()
1303 if (!TEST_true(qtest_shutdown(qtserv, clientquic))) in test_client_auth()
1309 SSL_free(clientquic); in test_client_auth()
1325 SSL *clientquic = NULL; in test_alpn() local
1342 &clientquic, NULL, NULL))) in test_alpn()
1350 if (!TEST_false(SSL_set_alpn_protos(clientquic, NULL, 0))) in test_alpn()
1354 ret = SSL_connect(clientquic); in test_alpn()
1359 if (!TEST_int_eq(SSL_get_error(clientquic, ret), SSL_ERROR_SSL)) in test_alpn()
1363 if (!TEST_int_eq(SSL_get_error(clientquic, ret), SSL_ERROR_WANT_READ) in test_alpn()
1364 || !TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_alpn()
1371 SSL_free(clientquic); in test_alpn()
1383 SSL *clientquic = NULL; in test_get_shutdown() local
1391 &qtserv, &clientquic, in test_get_shutdown()
1393 || !TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_get_shutdown()
1396 if (!TEST_int_eq(SSL_get_shutdown(clientquic), 0)) in test_get_shutdown()
1399 if (!TEST_int_eq(SSL_shutdown(clientquic), 0)) in test_get_shutdown()
1402 if (!TEST_int_eq(SSL_get_shutdown(clientquic), SSL_SENT_SHUTDOWN)) in test_get_shutdown()
1408 } while (SSL_shutdown(clientquic) == 0); in test_get_shutdown()
1410 if (!TEST_int_eq(SSL_get_shutdown(clientquic), in test_get_shutdown()
1417 SSL_free(clientquic); in test_get_shutdown()
1429 static int unreliable_client_read(SSL *clientquic, SSL **stream, void *buf, in unreliable_client_read() argument
1438 SSL_handle_events(clientquic); in unreliable_client_read()
1439 *stream = SSL_accept_stream(clientquic, 0); in unreliable_client_read()
1450 qtest_wait_for_timeout(clientquic, qtserv); in unreliable_client_read()
1460 SSL *clientquic) in unreliable_server_read() argument
1470 SSL_handle_events(clientquic); in unreliable_server_read()
1472 qtest_wait_for_timeout(clientquic, qtserv); in unreliable_server_read()
1490 SSL *clientquic = NULL, *stream[2] = { NULL, NULL }; in test_noisy_dgram() local
1507 &clientquic, &fault, NULL))) in test_noisy_dgram()
1510 if (!TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_noisy_dgram()
1513 if (!TEST_true(SSL_set_incoming_stream_policy(clientquic, in test_noisy_dgram()
1516 || !TEST_true(SSL_set_default_stream_mode(clientquic, in test_noisy_dgram()
1545 if (!TEST_true(unreliable_client_read(clientquic, &stream[j], buf, in test_noisy_dgram()
1568 &readbytes, clientquic)) in test_noisy_dgram()
1579 SSL_free(clientquic); in test_noisy_dgram()
1596 SSL *clientquic = NULL; in test_bw_limit() local
1611 &clientquic, &fault, NULL))) in test_bw_limit()
1622 if (!TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_bw_limit()
1631 if (!SSL_write_ex(clientquic, msg, in test_bw_limit()
1636 if (!TEST_int_eq(SSL_get_error(clientquic, 0), SSL_ERROR_WANT_WRITE)) in test_bw_limit()
1643 SSL_handle_events(clientquic); in test_bw_limit()
1671 SSL_free(clientquic); in test_bw_limit()
2212 SSL *clientquic = NULL; in test_session_cb() local
2227 &qtserv, &clientquic, in test_session_cb()
2231 if (!TEST_true(qtest_create_quic_connection(qtserv, clientquic))) in test_session_cb()
2235 if (!TEST_true(SSL_handle_events(clientquic))) in test_session_cb()
2238 if (!TEST_int_eq(SSL_shutdown(clientquic), 0)) in test_session_cb()
2246 || !TEST_ptr_eq(clientquic, cbssl)) in test_session_cb()
2253 SSL_free(clientquic); in test_session_cb()