/test/ |
A D | wpackettest.c | 61 WPACKET_cleanup(pkt); in cleanup() 67 WPACKET pkt; in test_WPACKET_init() local 86 return cleanup(&pkt); in test_WPACKET_init() 143 WPACKET pkt; in test_WPACKET_set_max_size() local 190 WPACKET pkt; in test_WPACKET_start_sub_packet() local 272 WPACKET pkt; in test_WPACKET_set_flags() local 332 WPACKET pkt; in test_WPACKET_allocate_bytes() local 362 WPACKET pkt; in test_WPACKET_memcpy() local 386 WPACKET pkt; in test_WPACKET_init_der() local 459 WPACKET pkt; in test_WPACKET_quic() local [all …]
|
A D | packettest.c | 19 PACKET pkt; in test_PACKET_remaining() local 34 PACKET pkt; in test_PACKET_end() local 51 PACKET pkt; in test_PACKET_get_1() local 68 PACKET pkt; in test_PACKET_get_4() local 85 PACKET pkt; in test_PACKET_get_net_2() local 102 PACKET pkt; in test_PACKET_get_net_3() local 119 PACKET pkt; in test_PACKET_get_net_4() local 157 PACKET pkt; in test_PACKET_get_bytes() local 181 PACKET pkt; in test_PACKET_copy_bytes() local 506 memset(&pkt, 0, sizeof(pkt)); in test_PACKET_get_quic_vlint() [all …]
|
A D | quic_wire_test.c | 16 int (*serializer)(WPACKET *pkt); 28 static int encode_case_1_enc(WPACKET *pkt) in encode_case_1_enc() argument 53 static int encode_case_2_enc(WPACKET *pkt) in encode_case_2_enc() argument 88 static int encode_case_3_enc(WPACKET *pkt) in encode_case_3_enc() argument 174 static int encode_case_4_enc(WPACKET *pkt) in encode_case_4_enc() argument 839 if (!TEST_true(PACKET_forward(pkt, PACKET_remaining(pkt)))) in encode_case_16b_dec() 1229 PACKET pkt; in test_wire_encode() local 1430 PACKET pkt; in test_wire_ack() local 1438 r = c->deserializer(&pkt); in test_wire_ack() 1538 PACKET pkt = {0}; in test_wire_retry_integrity_tag() local [all …]
|
A D | quic_cc_test.c | 142 NET_PKT *pkt = OPENSSL_zalloc(sizeof(*pkt)); in net_sim_send() local 162 pkt->arrive_time = ossl_time_add(pkt->tx_time, in net_sim_send() 165 pkt->determination_time = ossl_time_add(pkt->arrive_time, in net_sim_send() 167 pkt->next_time = pkt->arrive_time; in net_sim_send() 175 pkt->arrive_time = ossl_time_add(pkt->tx_time, in net_sim_send() 180 pkt->determination_time = ossl_time_add(pkt->tx_time, in net_sim_send() 182 pkt->next_time = pkt->determination_time; in net_sim_send() 211 if (pkt->success && !pkt->arrived in net_sim_process_one() 218 pkt->next_time = pkt->determination_time; in net_sim_process_one() 219 if (!ossl_pqueue_NET_PKT_push(s->pkts, pkt, &pkt->idx)) in net_sim_process_one() [all …]
|
A D | bad_dtls_test.c | 119 PACKET pkt, pkt2; in validate_client_hello() local 127 if (!PACKET_buf_init(&pkt, data, len)) in validate_client_hello() 161 if (!PACKET_get_length_prefixed_1(&pkt, &pkt2)) in validate_client_hello() 170 if (!PACKET_get_net_2(&pkt, &u) || !PACKET_forward(&pkt, u)) in validate_client_hello() 174 if (!PACKET_get_1(&pkt, &u) || !PACKET_forward(&pkt, u)) in validate_client_hello() 178 if (!PACKET_get_net_2(&pkt, &u) || !PACKET_forward(&pkt, u)) in validate_client_hello() 182 if (PACKET_remaining(&pkt)) in validate_client_hello() 399 PACKET pkt; in validate_ccs() local 408 if (!PACKET_buf_init(&pkt, data, len)) in validate_ccs() 426 if (!PACKET_get_net_2(&pkt, &u) || u != 0x0002) in validate_ccs() [all …]
|
A D | clienthellotest.c | 61 PACKET pkt, pkt2, pkt3; in test_client_hello() local 69 memset(&pkt, 0, sizeof(pkt)); in test_client_hello() 158 || !TEST_true(PACKET_buf_init(&pkt, data, len)) in test_client_hello() 160 || !PACKET_forward(&pkt, SSL3_RT_HEADER_LENGTH)) in test_client_hello() 163 msglen = PACKET_remaining(&pkt); in test_client_hello() 166 if (!TEST_true(PACKET_forward(&pkt, SSL3_HM_HEADER_LENGTH)) in test_client_hello() 168 || !TEST_true(PACKET_forward(&pkt, CLIENT_VERSION_LEN in test_client_hello() 171 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in test_client_hello() 173 || !TEST_true(PACKET_get_length_prefixed_2(&pkt, &pkt2)) in test_client_hello() 175 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in test_client_hello() [all …]
|
A D | quic_fifd_test.c | 110 QUIC_TXPIM_PKT *pkt = NULL, *pkt2 = NULL; in test_generic() local 174 pkt->ackm_pkt.pkt_num = 0; in test_generic() 175 pkt->ackm_pkt.pkt_space = pn_space; in test_generic() 177 pkt->ackm_pkt.num_bytes = 50; in test_generic() 179 pkt->ackm_pkt.is_inflight = 1; in test_generic() 180 pkt->ackm_pkt.is_ack_eliciting = 1; in test_generic() 182 pkt->had_handshake_done_frame = 1; in test_generic() 183 pkt->had_max_data_frame = 1; in test_generic() 184 pkt->had_max_streams_bidi_frame = 1; in test_generic() 185 pkt->had_max_streams_uni_frame = 1; in test_generic() [all …]
|
A D | servername_test.c | 45 PACKET pkt, pkt2, pkt3, pkt4, pkt5; in get_sni_from_client_hello() local 49 memset(&pkt, 0, sizeof(pkt)); in get_sni_from_client_hello() 56 || !TEST_true(PACKET_buf_init(&pkt, data, len)) in get_sni_from_client_hello() 58 || !PACKET_forward(&pkt, SSL3_RT_HEADER_LENGTH) in get_sni_from_client_hello() 60 || !TEST_true(PACKET_forward(&pkt, SSL3_HM_HEADER_LENGTH)) in get_sni_from_client_hello() 62 || !TEST_true(PACKET_forward(&pkt, CLIENT_VERSION_LEN in get_sni_from_client_hello() 65 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in get_sni_from_client_hello() 67 || !TEST_true(PACKET_get_length_prefixed_2(&pkt, &pkt2)) in get_sni_from_client_hello() 69 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in get_sni_from_client_hello() 71 || !TEST_true(PACKET_as_length_prefixed_2(&pkt, &pkt2))) in get_sni_from_client_hello()
|
A D | asynciotest.c | 143 PACKET pkt; in async_write() local 145 if (!PACKET_buf_init(&pkt, (const unsigned char *)in, inl)) in async_write() 148 while (PACKET_remaining(&pkt) > 0) { in async_write() 153 if (!PACKET_get_1(&pkt, &contenttype) in async_write() 154 || !PACKET_get_1(&pkt, &versionhi) in async_write() 155 || !PACKET_get_1(&pkt, &versionlo) in async_write() 156 || !PACKET_get_length_prefixed_2(&pkt, &payload)) in async_write()
|
A D | quic_ackm_test.c | 25 OSSL_ACKM_TX_PKT *pkt; member 77 OPENSSL_free(h->pkts[i].pkt); in helper_destroy() 78 h->pkts[i].pkt = NULL; in helper_destroy() 363 h.pkts[i].pkt = tx = OPENSSL_zalloc(sizeof(*tx)); in test_tx_ack_case_actual() 547 tx = h.pkts[pkt_idx + i].pkt; in test_tx_ack_time_script() 954 OSSL_ACKM_RX_PKT pkt = {0}; in test_rx_ack_actual() local 956 pkt.pkt_num = s->pn + i; in test_rx_ack_actual() 957 pkt.time = fake_time; in test_rx_ack_actual() 958 pkt.pkt_space = space; in test_rx_ack_actual() 959 pkt.is_ack_eliciting = 1; in test_rx_ack_actual() [all …]
|
A D | quic_record_test.c | 1806 OSSL_QRX_PKT *pkt = NULL; in rx_run_script() local 1864 if (!TEST_ptr(pkt) || !TEST_ptr(pkt->hdr)) in rx_run_script() 1867 if (!TEST_mem_eq(pkt->hdr->data, pkt->hdr->len, in rx_run_script() 1871 if (!TEST_true(cmp_pkt_hdr(pkt->hdr, op->hdr, in rx_run_script() 1875 last_key_epoch = pkt->key_epoch; in rx_run_script() 1877 ossl_qrx_pkt_release(pkt); in rx_run_script() 1878 pkt = NULL; in rx_run_script() 1932 ossl_qrx_pkt_release(pkt); in rx_run_script() 2757 PACKET pkt = {0}; in test_wire_pkt_hdr_actual() local 3010 const OSSL_QTX_PKT *pkt; member [all …]
|
A D | tls13ccstest.c | 93 PACKET pkt, msg, msgbody, sessionid; in watchccs_write() local 103 if (!PACKET_buf_init(&pkt, (const unsigned char *)in, inl)) in watchccs_write() 107 while (PACKET_remaining(&pkt)) { in watchccs_write() 108 if (!PACKET_get_1(&pkt, &rectype) in watchccs_write() 109 || !PACKET_get_net_2(&pkt, &recvers) in watchccs_write() 110 || !PACKET_get_length_prefixed_2(&pkt, &msg)) in watchccs_write()
|
A D | quic_txp_test.c | 61 PACKET pkt; member 1300 if (!ossl_quic_wire_peek_frame_header(&h->pkt, &frame_type, NULL)) in skip_padding() 1304 ossl_quic_wire_decode_padding(&h->pkt); in skip_padding() 1341 if (!TEST_true(PACKET_buf_init(&h.pkt, in run_script() 1389 if (!TEST_true(ossl_quic_wire_decode_frame_ping(&h.pkt))) in run_script() 1393 if (!TEST_true(ossl_quic_wire_decode_frame_max_data(&h.pkt, in run_script() 1398 if (!TEST_true(ossl_quic_wire_decode_frame_new_conn_id(&h.pkt, in run_script() 1403 if (!TEST_true(ossl_quic_wire_decode_frame_new_token(&h.pkt, in run_script() 1412 if (!TEST_true(ossl_quic_wire_decode_frame_ack(&h.pkt, in run_script() 1449 if (!TEST_true(ossl_quic_wire_decode_frame_conn_close(&h.pkt, in run_script() [all …]
|
A D | quicapitest.c | 2165 PACKET pkt = {0}; in tparam_on_enc_ext() local 2185 if (!TEST_true(PACKET_buf_init(&pkt, (unsigned char *)old_bufm->data, old_bufm->length)) in tparam_on_enc_ext() 2205 for (; PACKET_remaining(&pkt) > 0; ) { in tparam_on_enc_ext() 2206 tp_p = (unsigned char *)ossl_quic_wire_decode_transport_param_bytes(&pkt, in tparam_on_enc_ext() 2210 TEST_mem_eq(PACKET_data(&pkt), PACKET_remaining(&pkt), NULL, 0); in tparam_on_enc_ext()
|
A D | sslapitest.c | 7769 PACKET pkt, pkt2, pkt3; in get_MFL_from_client_hello() local 7775 memset(&pkt, 0, sizeof(pkt)); in get_MFL_from_client_hello() 7780 || !TEST_true(PACKET_buf_init(&pkt, data, len)) in get_MFL_from_client_hello() 7782 || !PACKET_forward(&pkt, SSL3_RT_HEADER_LENGTH) in get_MFL_from_client_hello() 7784 || !TEST_true(PACKET_forward(&pkt, SSL3_HM_HEADER_LENGTH)) in get_MFL_from_client_hello() 7786 || !TEST_true(PACKET_forward(&pkt, CLIENT_VERSION_LEN in get_MFL_from_client_hello() 7789 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in get_MFL_from_client_hello() 7791 || !TEST_true(PACKET_get_length_prefixed_2(&pkt, &pkt2)) in get_MFL_from_client_hello() 7793 || !TEST_true(PACKET_get_length_prefixed_1(&pkt, &pkt2)) in get_MFL_from_client_hello() 7795 || !TEST_true(PACKET_as_length_prefixed_2(&pkt, &pkt2))) in get_MFL_from_client_hello()
|
A D | quic_multistream_test.c | 3731 PACKET pkt; in script_41_trace() local 3738 if (!TEST_true(PACKET_buf_init(&pkt, buf, len))) { in script_41_trace() 3743 if (!TEST_true(ossl_quic_wire_peek_frame_header(&pkt, &frame_type, in script_41_trace() 3752 if (!TEST_true(ossl_quic_wire_decode_frame_path_response(&pkt, &frame_data)) in script_41_trace()
|
/test/helpers/ |
A D | pktsplitbio.c | 85 PACKET pkt; in pkt_split_dgram_recvmmsg() local 88 if (!PACKET_buf_init(&pkt, thismsg->data, thismsg->data_len)) in pkt_split_dgram_recvmmsg() 92 if (ossl_quic_wire_decode_pkt_hdr(&pkt, bdata->short_conn_id_len, in pkt_split_dgram_recvmmsg() 95 remain = PACKET_remaining(&pkt); in pkt_split_dgram_recvmmsg()
|
A D | quictestlib.c | 103 PACKET pkt; in noise_msg_callback() local 106 if (!PACKET_buf_init(&pkt, buf, len)) in noise_msg_callback() 950 PACKET pkt; in handshake_mutate() local 961 if (!PACKET_buf_init(&pkt, buf, msginlen) in handshake_mutate() 962 || !PACKET_get_1(&pkt, &msgtype) in handshake_mutate() 963 || !PACKET_get_net_3(&pkt, &payloadlen) in handshake_mutate() 1085 PACKET pkt, sub, subext; in qtest_fault_delete_extension() local 1092 if (!PACKET_buf_init(&pkt, ext, *extlen)) in qtest_fault_delete_extension() 1096 if (!PACKET_as_length_prefixed_2(&pkt, &sub)) in qtest_fault_delete_extension() 1174 PACKET pkt; in pcipher_sendmmsg() local [all …]
|
A D | ssltestlib.c | 264 static void mempacket_free(MEMPACKET *pkt) in mempacket_free() argument 266 if (pkt->data != NULL) in mempacket_free() 267 OPENSSL_free(pkt->data); in mempacket_free() 268 OPENSSL_free(pkt); in mempacket_free()
|