/openssl/ssl/quic/ |
H A D | quic_wire_pkt.c | 245 memset(hdr->pn, 0, sizeof(hdr->pn)); in ossl_quic_wire_decode_pkt_hdr() 330 memset(hdr->pn, 0, sizeof(hdr->pn)); in ossl_quic_wire_decode_pkt_hdr() 395 memset(hdr->pn, 0, sizeof(hdr->pn)); in ossl_quic_wire_decode_pkt_hdr() 420 memset(hdr->pn, 0, sizeof(hdr->pn)); in ossl_quic_wire_decode_pkt_hdr() 430 hdr->len = (size_t)(len - hdr->pn_len); in ossl_quic_wire_decode_pkt_hdr() 494 || hdr->pn_len < 1 || hdr->pn_len > 4) in ossl_quic_wire_encode_pkt_hdr() 506 || !WPACKET_memcpy(pkt, hdr->pn, hdr->pn_len)) in ossl_quic_wire_encode_pkt_hdr() 517 && (hdr->pn_len < 1 || hdr->pn_len > 4)) in ossl_quic_wire_encode_pkt_hdr() 573 || !WPACKET_memcpy(pkt, hdr->pn, hdr->pn_len)) in ossl_quic_wire_encode_pkt_hdr() 613 || hdr->pn_len < 1 || hdr->pn_len > 4) in ossl_quic_wire_get_encoded_pkt_hdr_len() [all …]
|
H A D | quic_record_rx.c | 434 rxe->pkt.hdr = NULL; in qrx_recycle_rxe() 470 switch (hdr->type) { in qrx_determine_enc_level() 531 if (!ossl_quic_wire_decode_pkt_hdr_pn(rxe->hdr.pn, rxe->hdr.pn_len, in qrx_validate_hdr() 862 memcpy(rxe_data(rxe), rxe->hdr.data, rxe->hdr.len); in qrx_process_pkt() 865 rxe->hdr.data = rxe_data(rxe); in qrx_process_pkt() 933 rxe->hdr.token = token; in qrx_process_pkt() 972 aad_len = rxe->hdr.data - sop; in qrx_process_pkt() 999 if (!qrx_decrypt_pkt_body(qrx, dst, rxe->hdr.data, rxe->hdr.len, in qrx_process_pkt() 1044 rxe->hdr.data = dst; in qrx_process_pkt() 1045 rxe->hdr.len = dec_len; in qrx_process_pkt() [all …]
|
H A D | quic_trace.c | 578 QUIC_PKT_HDR hdr; in ossl_quic_trace() local 594 if (hdr.type != QUIC_PKT_TYPE_1RTT) in ossl_quic_trace() 596 (unsigned long)hdr.version); in ossl_quic_trace() 598 put_conn_id(bio, &hdr.dst_conn_id); in ossl_quic_trace() 600 if (hdr.type != QUIC_PKT_TYPE_1RTT) { in ossl_quic_trace() 602 put_conn_id(bio, &hdr.src_conn_id); in ossl_quic_trace() 606 if (hdr.type == QUIC_PKT_TYPE_INITIAL) { in ossl_quic_trace() 608 put_token(bio, hdr.token, hdr.token_len); in ossl_quic_trace() 611 if (hdr.type != QUIC_PKT_TYPE_VERSION_NEG in ossl_quic_trace() 615 for (i = 0; i < hdr.pn_len; i++) in ossl_quic_trace() [all …]
|
H A D | quic_record_tx.c | 472 hdr, ptrs) in qtx_write_hdr() 635 if (hdr->type == QUIC_PKT_TYPE_1RTT) in qtx_write() 656 hdr->data = NULL; in qtx_write() 657 hdr->len = payload_len; in qtx_write() 673 if (ossl_quic_pkt_type_has_pn(hdr->type)) { in qtx_write() 684 if (!qtx_write_hdr(qtx, hdr, txe, &ptrs)) { in qtx_write() 758 QUIC_PKT_HDR *hdr; in qtx_mutate_write() local 764 if (!qtx->mutatecb(pkt->hdr, pkt->iovec, pkt->num_iovec, &hdr, in qtx_mutate_write() 768 hdr = pkt->hdr; in qtx_mutate_write() 774 hdr, iovec, num_iovec); in qtx_mutate_write() [all …]
|
H A D | qlog_event_helpers.c | 567 const QUIC_PKT_HDR *hdr, in log_packet() argument 576 type_s = quic_pkt_type_to_qlog(hdr->type); in log_packet() 581 if (ossl_quic_pkt_type_has_pn(hdr->type)) in log_packet() 584 QLOG_CID("dcid", &hdr->dst_conn_id); in log_packet() 585 if (ossl_quic_pkt_type_has_scid(hdr->type)) in log_packet() 586 QLOG_CID("scid", &hdr->src_conn_id); in log_packet() 588 if (hdr->token_len > 0) { in log_packet() 591 QLOG_BIN("data", hdr->token, hdr->token_len); in log_packet() 599 if (ossl_quic_pkt_type_is_encrypted(hdr->type)) { in log_packet() 617 log_packet(qlog, hdr, pn, iovec, num_iovec, datagram_id); in ossl_qlog_event_transport_packet_sent() [all …]
|
H A D | quic_sstream.c | 93 OSSL_QUIC_FRAME_STREAM *hdr, in ossl_quic_sstream_get_stream_frame() argument 117 hdr->offset = qss->ring_buf.head_offset; in ossl_quic_sstream_get_stream_frame() 118 hdr->len = 0; in ossl_quic_sstream_get_stream_frame() 119 hdr->is_fin = 1; in ossl_quic_sstream_get_stream_frame() 157 hdr->offset = range->range.start; in ossl_quic_sstream_get_stream_frame() 158 hdr->len = total_len; in ossl_quic_sstream_get_stream_frame() 159 hdr->is_fin = qss->have_final_size in ossl_quic_sstream_get_stream_frame() 160 && hdr->offset + hdr->len == qss->ring_buf.head_offset; in ossl_quic_sstream_get_stream_frame()
|
H A D | quic_port.c | 500 QUIC_PKT_HDR hdr; in port_default_packet_handler() local 545 if (!ossl_quic_wire_decode_pkt_hdr(&pkt, SIZE_MAX, 1, 0, &hdr, NULL)) in port_default_packet_handler() 548 switch (hdr.version) { in port_default_packet_handler() 563 if (hdr.type != QUIC_PKT_TYPE_INITIAL) in port_default_packet_handler() 573 port_on_new_conn(port, &e->peer, &hdr.src_conn_id, &hdr.dst_conn_id, in port_default_packet_handler()
|
H A D | quic_channel.c | 2059 ch->txp, ch->qrx_pkt->hdr->len); in ch_rx() 2187 && ch->qrx_pkt->hdr->version != QUIC_VERSION_1) in ch_rx_handle_packet() 2203 && ch->qrx_pkt->hdr->reserved != 0) { in ch_rx_handle_packet() 2209 iovec.buf = ch->qrx_pkt->hdr->data; in ch_rx_handle_packet() 2210 iovec.buf_len = ch->qrx_pkt->hdr->len; in ch_rx_handle_packet() 2216 switch (ch->qrx_pkt->hdr->type) { in ch_rx_handle_packet() 2253 if (!ch_retry(ch, ch->qrx_pkt->hdr->data, in ch_rx_handle_packet() 2255 &ch->qrx_pkt->hdr->src_conn_id)) in ch_rx_handle_packet() 2283 && ch->qrx_pkt->hdr->type == QUIC_PKT_TYPE_1RTT in ch_rx_handle_packet() 2301 && ch->qrx_pkt->hdr->token_len > 0) { in ch_rx_handle_packet() [all …]
|
/openssl/crypto/cmp/ |
H A D | cmp_hdr.c | 25 if (!ossl_assert(hdr != NULL)) in ossl_cmp_hdr_set_pvno() 43 if (!ossl_assert(hdr != NULL) in ossl_cmp_hdr_get_protection_nid() 52 if (hdr == NULL) { in OSSL_CMP_HDR_get0_transactionID() 56 return hdr->transactionID; in OSSL_CMP_HDR_get0_transactionID() 63 return hdr->senderNonce; in ossl_cmp_hdr_get0_senderNonce() 68 if (hdr == NULL) { in OSSL_CMP_HDR_get0_recipNonce() 72 return hdr->recipNonce; in OSSL_CMP_HDR_get0_recipNonce() 78 if (hdr == NULL) { in STACK_OF() 82 return hdr->generalInfo; in STACK_OF() 149 if (hdr->freeText == NULL in ossl_cmp_hdr_push0_freeText() [all …]
|
H A D | cmp_local.h | 887 int ossl_cmp_hdr_set_pvno(OSSL_CMP_PKIHEADER *hdr, int pvno); 888 int ossl_cmp_hdr_get_pvno(const OSSL_CMP_PKIHEADER *hdr); 889 int ossl_cmp_hdr_get_protection_nid(const OSSL_CMP_PKIHEADER *hdr); 892 int ossl_cmp_hdr_set1_sender(OSSL_CMP_PKIHEADER *hdr, const X509_NAME *nm); 894 int ossl_cmp_hdr_update_messageTime(OSSL_CMP_PKIHEADER *hdr); 895 int ossl_cmp_hdr_set1_senderKID(OSSL_CMP_PKIHEADER *hdr, 899 int ossl_cmp_hdr_generalInfo_push0_item(OSSL_CMP_PKIHEADER *hdr, 901 int ossl_cmp_hdr_generalInfo_push1_items(OSSL_CMP_PKIHEADER *hdr, 903 int ossl_cmp_hdr_set_implicitConfirm(OSSL_CMP_PKIHEADER *hdr); 904 int ossl_cmp_hdr_has_implicitConfirm(const OSSL_CMP_PKIHEADER *hdr); [all …]
|
H A D | cmp_vfy.c | 706 OSSL_CMP_PKIHEADER *hdr; in ossl_cmp_msg_check_update() local 712 hdr = OSSL_CMP_MSG_get0_header(msg); in ossl_cmp_msg_check_update() 722 if (hdr->sender->type != GEN_DIRNAME) { in ossl_cmp_msg_check_update() 726 actual_sender = hdr->sender->d.directoryName; in ossl_cmp_msg_check_update() 769 if (hdr->protectionAlg != NULL) in ossl_cmp_msg_check_update() 786 if (hdr->protectionAlg != NULL) in ossl_cmp_msg_check_update() 794 if (ossl_cmp_hdr_get_pvno(hdr) != OSSL_CMP_PVNO_2 in ossl_cmp_msg_check_update() 795 && ossl_cmp_hdr_get_pvno(hdr) != OSSL_CMP_PVNO_3) { in ossl_cmp_msg_check_update() 827 hdr->recipNonce, in ossl_cmp_msg_check_update() 837 && !OSSL_CMP_CTX_set1_transactionID(ctx, hdr->transactionID)) in ossl_cmp_msg_check_update() [all …]
|
H A D | cmp_server.c | 274 OSSL_CMP_PKIHEADER *hdr = OSSL_CMP_MSG_get0_header(req); in process_cert_request() local 285 ossl_cmp_hdr_has_implicitConfirm(hdr) in process_cert_request() 577 OSSL_CMP_PKIHEADER *hdr; in OSSL_CMP_SRV_process_request() local 584 || (hdr = OSSL_CMP_MSG_get0_header(req)) == NULL) { in OSSL_CMP_SRV_process_request() 598 if (hdr->sender->type != GEN_DIRNAME) { in OSSL_CMP_SRV_process_request() 602 if (!OSSL_CMP_CTX_set1_recipient(ctx, hdr->sender->d.directoryName)) in OSSL_CMP_SRV_process_request() 653 && ossl_cmp_hdr_get_protection_nid(hdr) != NID_id_PasswordBasedMAC) in OSSL_CMP_SRV_process_request() 689 (void)OSSL_CMP_CTX_set1_transactionID(ctx, hdr->transactionID); in OSSL_CMP_SRV_process_request() 690 (void)ossl_cmp_ctx_set1_recipNonce(ctx, hdr->senderNonce); in OSSL_CMP_SRV_process_request()
|
/openssl/test/ |
H A D | cmp_hdr_test.c | 20 OSSL_CMP_PKIHEADER *hdr; member 26 OSSL_CMP_PKIHEADER_free(fixture->hdr); in tear_down() 40 if (!TEST_ptr(fixture->hdr = OSSL_CMP_PKIHEADER_new())) in set_up() 53 if (!TEST_int_eq(ossl_cmp_hdr_set_pvno(fixture->hdr, pvno), 1)) in execute_HDR_set_get_pvno_test() 55 if (!TEST_int_eq(ossl_cmp_hdr_get_pvno(fixture->hdr), pvno)) in execute_HDR_set_get_pvno_test() 88 sn = ossl_cmp_hdr_get0_senderNonce(fixture->hdr); in execute_HDR_get0_senderNonce_test() 120 if (!TEST_int_eq(fixture->hdr->sender->type, GEN_DIRNAME)) in execute_HDR_set1_sender_test() 154 if (!TEST_int_eq(fixture->hdr->recipient->type, GEN_DIRNAME)) in execute_HDR_set1_recipient_test() 370 ginfo = fixture->hdr->generalInfo; in execute_HDR_generalInfo_push1_items_test() 425 header_nonce = ossl_cmp_hdr_get0_senderNonce(fixture->hdr); in execute_HDR_init_test() [all …]
|
H A D | quic_stream_test.c | 44 OSSL_QUIC_FRAME_STREAM hdr; in test_sstream_simple() local 76 || !TEST_uint64_t_eq(hdr.offset, 0) in test_sstream_simple() 78 || !TEST_false(hdr.is_fin)) in test_sstream_simple() 93 || !TEST_uint64_t_eq(hdr.offset, 8) in test_sstream_simple() 95 || !TEST_false(hdr.is_fin)) in test_sstream_simple() 119 || !TEST_uint64_t_eq(hdr.offset, 4) in test_sstream_simple() 120 || !TEST_uint64_t_eq(hdr.len, 3) in test_sstream_simple() 121 || !TEST_false(hdr.is_fin)) in test_sstream_simple() 164 || !TEST_true(hdr.is_fin) in test_sstream_simple() 189 || !TEST_true(hdr.is_fin) in test_sstream_simple() [all …]
|
H A D | http_test.c | 43 const char *hdr = (char *)req; in mock_http_server() local 52 path = hdr; in mock_http_server() 53 hdr = strchr(hdr, ' '); in mock_http_server() 54 if (hdr == NULL) in mock_http_server() 59 hdr += len; in mock_http_server() 61 if (!TEST_char_le('0', *hdr) || !TEST_char_le(*hdr++, '1')) in mock_http_server() 63 if (!TEST_char_eq(*hdr++, '\r') || !TEST_char_eq(*hdr++, '\n')) in mock_http_server() 65 count -= (hdr - req); in mock_http_server() 96 hdr = strstr(hdr, "\r\n"); in mock_http_server() 97 if (hdr == NULL) in mock_http_server() [all …]
|
H A D | quic_fifd_test.c | 111 OSSL_QUIC_FRAME_STREAM hdr = {0}; in test_generic() local 143 || !TEST_int_eq(hdr.is_fin, i == 1) in test_generic() 144 || !TEST_uint64_t_eq(hdr.offset, 0) in test_generic() 145 || !TEST_uint64_t_eq(hdr.len, 12) in test_generic() 149 hdr.offset + hdr.len - 1))) in test_generic() 153 hdr.offset + hdr.len))) in test_generic() 156 chunk.has_fin = hdr.is_fin; in test_generic() 258 || !TEST_uint64_t_eq(hdr.offset, 0) in test_generic() 259 || !TEST_uint64_t_eq(hdr.len, 12)) in test_generic() 289 || !TEST_true(hdr.is_fin) in test_generic() [all …]
|
H A D | quic_record_test.c | 42 const QUIC_PKT_HDR *hdr; member 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() 1944 QUIC_PKT_HDR hdr; member 2755 QUIC_PKT_HDR hdr = {0}; in test_wire_pkt_hdr_actual() local 2771 && t->hdr.type == QUIC_PKT_TYPE_VERSION_NEG in test_wire_pkt_hdr_actual() 2811 0, 0, &hdr, &ptrs), in test_wire_pkt_hdr_actual() 2816 if (!TEST_true(cmp_pkt_hdr(&hdr, &t->hdr, t->payload, t->payload_len, 1))) in test_wire_pkt_hdr_actual() 2883 rej_mask = (t->hdr.type == QUIC_PKT_TYPE_1RTT) ? ~0x1f : ~0xf; in test_wire_pkt_hdr_actual() [all …]
|
/openssl/doc/internal/man3/ |
H A D | ossl_cmp_hdr_init.pod | 28 int ossl_cmp_hdr_set_pvno(OSSL_CMP_PKIHEADER *hdr, int pvno); 29 int ossl_cmp_hdr_get_pvno(const OSSL_CMP_PKIHEADER *hdr); 37 int ossl_cmp_hdr_update_messagetime(OSSL_CMP_PKIHEADER *hdr); 38 int ossl_cmp_hdr_set1_senderKID(OSSL_CMP_PKIHEADER *hdr, 44 int ossl_cmp_hdr_push0_freeText(OSSL_CMP_PKIHEADER *hdr, 46 int ossl_cmp_hdr_push1_freeText(OSSL_CMP_PKIHEADER *hdr, 48 int ossl_cmp_hdr_set_implicitConfirm(OSSL_CMP_PKIHEADER *hdr); 55 ossl_cmp_hdr_set_pvno() sets hdr->pvno to the given B<pvno>. 60 in B<hdr> or NID_undef on error. 85 hdr->freeText and consumes the given pointer. [all …]
|
/openssl/crypto/asn1/ |
H A D | asn_mime.c | 61 static void mime_hdr_free(MIME_HEADER *hdr); 406 MIME_HEADER *hdr; in SMIME_read_ASN1_ex() local 420 || hdr->value == NULL) { in SMIME_read_ASN1_ex() 456 || hdr->value == NULL) { in SMIME_read_ASN1_ex() 579 MIME_HEADER *hdr; in SMIME_text() local 586 || hdr->value == NULL) { in SMIME_text() 968 if (hdr == NULL) in mime_hdr_free() 970 OPENSSL_free(hdr->name); in mime_hdr_free() 971 OPENSSL_free(hdr->value); in mime_hdr_free() 972 if (hdr->params) in mime_hdr_free() [all …]
|
/openssl/test/recipes/70-test_quic_multistream_data/ |
H A D | verify-qlog.py | 41 def check_header(filename, hdr): argument 42 if not 'qlog_format' in hdr: 45 if not 'qlog_version' in hdr: 48 if not 'trace' in hdr: 51 hdr_trace = hdr["trace"] 75 if hdr["qlog_format"] != "JSON-SEQ": 78 if hdr["qlog_version"] != "0.3":
|
/openssl/crypto/bio/ |
H A D | bss_dgram_pair.c | 493 struct dgram_hdr hdr; in dgram_pair_ctrl_pending() local 510 l = dgram_pair_read_inner(readb, (uint8_t *)&hdr, sizeof(hdr)); in dgram_pair_ctrl_pending() 880 struct dgram_hdr hdr; in dgram_pair_read_actual() local 908 l = dgram_pair_read_inner(readb, (uint8_t *)&hdr, sizeof(hdr)); in dgram_pair_read_actual() 923 if (sz > hdr.len) { in dgram_pair_read_actual() 924 sz = hdr.len; in dgram_pair_read_actual() 925 } else if (sz < hdr.len) { in dgram_pair_read_actual() 927 trunc = hdr.len - sz; in dgram_pair_read_actual() 950 *local = hdr.dst_addr; in dgram_pair_read_actual() 1231 hdr.len = sz; in dgram_pair_write_actual() [all …]
|
/openssl/include/internal/ |
H A D | quic_wire_pkt.h | 474 QUIC_PKT_HDR *hdr, 514 const QUIC_PKT_HDR *hdr, 540 const QUIC_PKT_HDR *hdr); 602 const QUIC_PKT_HDR *hdr, 623 const QUIC_PKT_HDR *hdr,
|
H A D | qlog_event_helpers.h | 42 const QUIC_PKT_HDR *hdr, 50 const QUIC_PKT_HDR *hdr,
|
/openssl/doc/man3/ |
H A D | OSSL_CMP_HDR_get0_transactionID.pod | 15 OSSL_CMP_PKIHEADER *hdr); 17 OSSL_CMP_PKIHEADER *hdr); 19 *OSSL_CMP_HDR_get0_geninfo_ITAVs(const OSSL_CMP_PKIHEADER *hdr);
|
/openssl/tools/ |
H A D | c_rehash.in | 167 my $hdr = $1; 168 if ($hdr =~ /^(X509 |TRUSTED |)CERTIFICATE$/) { 171 } elsif ($hdr eq "X509 CRL") {
|