/src/openssl/include/internal/packet.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright 2015-2025 The OpenSSL Project Authors. All Rights Reserved. |
3 | | * |
4 | | * Licensed under the Apache License 2.0 (the "License"). You may not use |
5 | | * this file except in compliance with the License. You can obtain a copy |
6 | | * in the file LICENSE in the source distribution or at |
7 | | * https://www.openssl.org/source/license.html |
8 | | */ |
9 | | |
10 | | #ifndef OSSL_INTERNAL_PACKET_H |
11 | | #define OSSL_INTERNAL_PACKET_H |
12 | | #pragma once |
13 | | |
14 | | #include <string.h> |
15 | | #include <openssl/bn.h> |
16 | | #include <openssl/buffer.h> |
17 | | #include <openssl/crypto.h> |
18 | | #include <openssl/e_os2.h> |
19 | | |
20 | | #include "internal/numbers.h" |
21 | | |
22 | | typedef struct { |
23 | | /* Pointer to where we are currently reading from */ |
24 | | const unsigned char *curr; |
25 | | /* Pointer to the start of the message */ |
26 | | const unsigned char *msgstart; |
27 | | /* Number of bytes remaining */ |
28 | | size_t remaining; |
29 | | } PACKET; |
30 | | |
31 | | /* Internal unchecked shorthand; don't use outside this file. */ |
32 | | static ossl_inline void packet_forward(PACKET *pkt, size_t len) |
33 | 0 | { |
34 | 0 | pkt->curr += len; |
35 | 0 | pkt->remaining -= len; |
36 | 0 | } Unexecuted instantiation: params.c:packet_forward Unexecuted instantiation: encode_key2any.c:packet_forward Unexecuted instantiation: hkdf.c:packet_forward Unexecuted instantiation: x942kdf.c:packet_forward Unexecuted instantiation: ml_kem_kmgmt.c:packet_forward Unexecuted instantiation: dsa_sig.c:packet_forward Unexecuted instantiation: ecdsa_sig.c:packet_forward Unexecuted instantiation: eddsa_sig.c:packet_forward Unexecuted instantiation: ml_dsa_sig.c:packet_forward Unexecuted instantiation: rsa_sig.c:packet_forward Unexecuted instantiation: slh_dsa_sig.c:packet_forward Unexecuted instantiation: sm2_sig.c:packet_forward Unexecuted instantiation: der_dsa_sig.c:packet_forward Unexecuted instantiation: der_ec_sig.c:packet_forward Unexecuted instantiation: der_ecx_key.c:packet_forward Unexecuted instantiation: der_hkdf_gen.c:packet_forward Unexecuted instantiation: der_ml_dsa_key.c:packet_forward Unexecuted instantiation: der_rsa_key.c:packet_forward Unexecuted instantiation: der_slh_dsa_key.c:packet_forward Unexecuted instantiation: der_wrap_gen.c:packet_forward Unexecuted instantiation: dsa_asn1.c:packet_forward Unexecuted instantiation: dsa_sign.c:packet_forward Unexecuted instantiation: ec_asn1.c:packet_forward Unexecuted instantiation: hpke_util.c:packet_forward Unexecuted instantiation: asn1_dsa.c:packet_forward Unexecuted instantiation: der_writer.c:packet_forward Unexecuted instantiation: packet.c:packet_forward Unexecuted instantiation: ml_dsa_encoders.c:packet_forward Unexecuted instantiation: ml_dsa_key.c:packet_forward Unexecuted instantiation: ml_dsa_key_compress.c:packet_forward Unexecuted instantiation: ml_dsa_matrix.c:packet_forward Unexecuted instantiation: ml_dsa_ntt.c:packet_forward Unexecuted instantiation: ml_dsa_params.c:packet_forward Unexecuted instantiation: ml_dsa_sample.c:packet_forward Unexecuted instantiation: ml_dsa_sign.c:packet_forward Unexecuted instantiation: slh_dsa.c:packet_forward Unexecuted instantiation: slh_dsa_hash_ctx.c:packet_forward Unexecuted instantiation: slh_dsa_key.c:packet_forward Unexecuted instantiation: slh_fors.c:packet_forward Unexecuted instantiation: slh_hash.c:packet_forward Unexecuted instantiation: slh_hypertree.c:packet_forward Unexecuted instantiation: slh_xmss.c:packet_forward Unexecuted instantiation: der_rsa_sig.c:packet_forward Unexecuted instantiation: der_sm2_sig.c:packet_forward Unexecuted instantiation: der_digests_gen.c:packet_forward Unexecuted instantiation: der_dsa_gen.c:packet_forward Unexecuted instantiation: der_ec_gen.c:packet_forward Unexecuted instantiation: der_ecx_gen.c:packet_forward Unexecuted instantiation: der_ml_dsa_gen.c:packet_forward Unexecuted instantiation: der_rsa_gen.c:packet_forward Unexecuted instantiation: der_slh_dsa_gen.c:packet_forward Unexecuted instantiation: slh_wots.c:packet_forward Unexecuted instantiation: der_sm2_gen.c:packet_forward Unexecuted instantiation: punycode.c:packet_forward |
37 | | |
38 | | /* |
39 | | * Returns the number of bytes remaining to be read in the PACKET |
40 | | */ |
41 | | static ossl_inline size_t PACKET_remaining(const PACKET *pkt) |
42 | 0 | { |
43 | 0 | return pkt->remaining; |
44 | 0 | } Unexecuted instantiation: params.c:PACKET_remaining Unexecuted instantiation: encode_key2any.c:PACKET_remaining Unexecuted instantiation: hkdf.c:PACKET_remaining Unexecuted instantiation: x942kdf.c:PACKET_remaining Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_remaining Unexecuted instantiation: dsa_sig.c:PACKET_remaining Unexecuted instantiation: ecdsa_sig.c:PACKET_remaining Unexecuted instantiation: eddsa_sig.c:PACKET_remaining Unexecuted instantiation: ml_dsa_sig.c:PACKET_remaining Unexecuted instantiation: rsa_sig.c:PACKET_remaining Unexecuted instantiation: slh_dsa_sig.c:PACKET_remaining Unexecuted instantiation: sm2_sig.c:PACKET_remaining Unexecuted instantiation: der_dsa_sig.c:PACKET_remaining Unexecuted instantiation: der_ec_sig.c:PACKET_remaining Unexecuted instantiation: der_ecx_key.c:PACKET_remaining Unexecuted instantiation: der_hkdf_gen.c:PACKET_remaining Unexecuted instantiation: der_ml_dsa_key.c:PACKET_remaining Unexecuted instantiation: der_rsa_key.c:PACKET_remaining Unexecuted instantiation: der_slh_dsa_key.c:PACKET_remaining Unexecuted instantiation: der_wrap_gen.c:PACKET_remaining Unexecuted instantiation: dsa_asn1.c:PACKET_remaining Unexecuted instantiation: dsa_sign.c:PACKET_remaining Unexecuted instantiation: ec_asn1.c:PACKET_remaining Unexecuted instantiation: hpke_util.c:PACKET_remaining Unexecuted instantiation: asn1_dsa.c:PACKET_remaining Unexecuted instantiation: der_writer.c:PACKET_remaining Unexecuted instantiation: packet.c:PACKET_remaining Unexecuted instantiation: ml_dsa_encoders.c:PACKET_remaining Unexecuted instantiation: ml_dsa_key.c:PACKET_remaining Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_remaining Unexecuted instantiation: ml_dsa_matrix.c:PACKET_remaining Unexecuted instantiation: ml_dsa_ntt.c:PACKET_remaining Unexecuted instantiation: ml_dsa_params.c:PACKET_remaining Unexecuted instantiation: ml_dsa_sample.c:PACKET_remaining Unexecuted instantiation: ml_dsa_sign.c:PACKET_remaining Unexecuted instantiation: slh_dsa.c:PACKET_remaining Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_remaining Unexecuted instantiation: slh_dsa_key.c:PACKET_remaining Unexecuted instantiation: slh_fors.c:PACKET_remaining Unexecuted instantiation: slh_hash.c:PACKET_remaining Unexecuted instantiation: slh_hypertree.c:PACKET_remaining Unexecuted instantiation: slh_xmss.c:PACKET_remaining Unexecuted instantiation: der_rsa_sig.c:PACKET_remaining Unexecuted instantiation: der_sm2_sig.c:PACKET_remaining Unexecuted instantiation: der_digests_gen.c:PACKET_remaining Unexecuted instantiation: der_dsa_gen.c:PACKET_remaining Unexecuted instantiation: der_ec_gen.c:PACKET_remaining Unexecuted instantiation: der_ecx_gen.c:PACKET_remaining Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_remaining Unexecuted instantiation: der_rsa_gen.c:PACKET_remaining Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_remaining Unexecuted instantiation: slh_wots.c:PACKET_remaining Unexecuted instantiation: der_sm2_gen.c:PACKET_remaining Unexecuted instantiation: punycode.c:PACKET_remaining |
45 | | |
46 | | /* |
47 | | * Returns a pointer to the first byte after the packet data. |
48 | | * Useful for integrating with non-PACKET parsing code. |
49 | | * Specifically, we use PACKET_end() to verify that a d2i_... call |
50 | | * has consumed the entire packet contents. |
51 | | */ |
52 | | static ossl_inline const unsigned char *PACKET_end(const PACKET *pkt) |
53 | 0 | { |
54 | 0 | return pkt->curr + pkt->remaining; |
55 | 0 | } Unexecuted instantiation: params.c:PACKET_end Unexecuted instantiation: encode_key2any.c:PACKET_end Unexecuted instantiation: hkdf.c:PACKET_end Unexecuted instantiation: x942kdf.c:PACKET_end Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_end Unexecuted instantiation: dsa_sig.c:PACKET_end Unexecuted instantiation: ecdsa_sig.c:PACKET_end Unexecuted instantiation: eddsa_sig.c:PACKET_end Unexecuted instantiation: ml_dsa_sig.c:PACKET_end Unexecuted instantiation: rsa_sig.c:PACKET_end Unexecuted instantiation: slh_dsa_sig.c:PACKET_end Unexecuted instantiation: sm2_sig.c:PACKET_end Unexecuted instantiation: der_dsa_sig.c:PACKET_end Unexecuted instantiation: der_ec_sig.c:PACKET_end Unexecuted instantiation: der_ecx_key.c:PACKET_end Unexecuted instantiation: der_hkdf_gen.c:PACKET_end Unexecuted instantiation: der_ml_dsa_key.c:PACKET_end Unexecuted instantiation: der_rsa_key.c:PACKET_end Unexecuted instantiation: der_slh_dsa_key.c:PACKET_end Unexecuted instantiation: der_wrap_gen.c:PACKET_end Unexecuted instantiation: dsa_asn1.c:PACKET_end Unexecuted instantiation: dsa_sign.c:PACKET_end Unexecuted instantiation: ec_asn1.c:PACKET_end Unexecuted instantiation: hpke_util.c:PACKET_end Unexecuted instantiation: asn1_dsa.c:PACKET_end Unexecuted instantiation: der_writer.c:PACKET_end Unexecuted instantiation: packet.c:PACKET_end Unexecuted instantiation: ml_dsa_encoders.c:PACKET_end Unexecuted instantiation: ml_dsa_key.c:PACKET_end Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_end Unexecuted instantiation: ml_dsa_matrix.c:PACKET_end Unexecuted instantiation: ml_dsa_ntt.c:PACKET_end Unexecuted instantiation: ml_dsa_params.c:PACKET_end Unexecuted instantiation: ml_dsa_sample.c:PACKET_end Unexecuted instantiation: ml_dsa_sign.c:PACKET_end Unexecuted instantiation: slh_dsa.c:PACKET_end Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_end Unexecuted instantiation: slh_dsa_key.c:PACKET_end Unexecuted instantiation: slh_fors.c:PACKET_end Unexecuted instantiation: slh_hash.c:PACKET_end Unexecuted instantiation: slh_hypertree.c:PACKET_end Unexecuted instantiation: slh_xmss.c:PACKET_end Unexecuted instantiation: der_rsa_sig.c:PACKET_end Unexecuted instantiation: der_sm2_sig.c:PACKET_end Unexecuted instantiation: der_digests_gen.c:PACKET_end Unexecuted instantiation: der_dsa_gen.c:PACKET_end Unexecuted instantiation: der_ec_gen.c:PACKET_end Unexecuted instantiation: der_ecx_gen.c:PACKET_end Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_end Unexecuted instantiation: der_rsa_gen.c:PACKET_end Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_end Unexecuted instantiation: slh_wots.c:PACKET_end Unexecuted instantiation: der_sm2_gen.c:PACKET_end Unexecuted instantiation: punycode.c:PACKET_end |
56 | | |
57 | | /* |
58 | | * Returns a pointer to the very start of the buffer. If this is a sub packet |
59 | | * this will be the start of the buffer for the top of the PACKET tree. |
60 | | */ |
61 | | static ossl_inline const unsigned char *PACKET_msg_start(const PACKET *pkt) |
62 | 0 | { |
63 | 0 | return pkt->msgstart; |
64 | 0 | } Unexecuted instantiation: params.c:PACKET_msg_start Unexecuted instantiation: encode_key2any.c:PACKET_msg_start Unexecuted instantiation: hkdf.c:PACKET_msg_start Unexecuted instantiation: x942kdf.c:PACKET_msg_start Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_msg_start Unexecuted instantiation: dsa_sig.c:PACKET_msg_start Unexecuted instantiation: ecdsa_sig.c:PACKET_msg_start Unexecuted instantiation: eddsa_sig.c:PACKET_msg_start Unexecuted instantiation: ml_dsa_sig.c:PACKET_msg_start Unexecuted instantiation: rsa_sig.c:PACKET_msg_start Unexecuted instantiation: slh_dsa_sig.c:PACKET_msg_start Unexecuted instantiation: sm2_sig.c:PACKET_msg_start Unexecuted instantiation: der_dsa_sig.c:PACKET_msg_start Unexecuted instantiation: der_ec_sig.c:PACKET_msg_start Unexecuted instantiation: der_ecx_key.c:PACKET_msg_start Unexecuted instantiation: der_hkdf_gen.c:PACKET_msg_start Unexecuted instantiation: der_ml_dsa_key.c:PACKET_msg_start Unexecuted instantiation: der_rsa_key.c:PACKET_msg_start Unexecuted instantiation: der_slh_dsa_key.c:PACKET_msg_start Unexecuted instantiation: der_wrap_gen.c:PACKET_msg_start Unexecuted instantiation: dsa_asn1.c:PACKET_msg_start Unexecuted instantiation: dsa_sign.c:PACKET_msg_start Unexecuted instantiation: ec_asn1.c:PACKET_msg_start Unexecuted instantiation: hpke_util.c:PACKET_msg_start Unexecuted instantiation: asn1_dsa.c:PACKET_msg_start Unexecuted instantiation: der_writer.c:PACKET_msg_start Unexecuted instantiation: packet.c:PACKET_msg_start Unexecuted instantiation: ml_dsa_encoders.c:PACKET_msg_start Unexecuted instantiation: ml_dsa_key.c:PACKET_msg_start Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_msg_start Unexecuted instantiation: ml_dsa_matrix.c:PACKET_msg_start Unexecuted instantiation: ml_dsa_ntt.c:PACKET_msg_start Unexecuted instantiation: ml_dsa_params.c:PACKET_msg_start Unexecuted instantiation: ml_dsa_sample.c:PACKET_msg_start Unexecuted instantiation: ml_dsa_sign.c:PACKET_msg_start Unexecuted instantiation: slh_dsa.c:PACKET_msg_start Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_msg_start Unexecuted instantiation: slh_dsa_key.c:PACKET_msg_start Unexecuted instantiation: slh_fors.c:PACKET_msg_start Unexecuted instantiation: slh_hash.c:PACKET_msg_start Unexecuted instantiation: slh_hypertree.c:PACKET_msg_start Unexecuted instantiation: slh_xmss.c:PACKET_msg_start Unexecuted instantiation: der_rsa_sig.c:PACKET_msg_start Unexecuted instantiation: der_sm2_sig.c:PACKET_msg_start Unexecuted instantiation: der_digests_gen.c:PACKET_msg_start Unexecuted instantiation: der_dsa_gen.c:PACKET_msg_start Unexecuted instantiation: der_ec_gen.c:PACKET_msg_start Unexecuted instantiation: der_ecx_gen.c:PACKET_msg_start Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_msg_start Unexecuted instantiation: der_rsa_gen.c:PACKET_msg_start Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_msg_start Unexecuted instantiation: slh_wots.c:PACKET_msg_start Unexecuted instantiation: der_sm2_gen.c:PACKET_msg_start Unexecuted instantiation: punycode.c:PACKET_msg_start |
65 | | |
66 | | /* |
67 | | * Returns a pointer to the PACKET's current position. |
68 | | * For use in non-PACKETized APIs. |
69 | | */ |
70 | | static ossl_inline const unsigned char *PACKET_data(const PACKET *pkt) |
71 | 0 | { |
72 | 0 | return pkt->curr; |
73 | 0 | } Unexecuted instantiation: params.c:PACKET_data Unexecuted instantiation: encode_key2any.c:PACKET_data Unexecuted instantiation: hkdf.c:PACKET_data Unexecuted instantiation: x942kdf.c:PACKET_data Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_data Unexecuted instantiation: dsa_sig.c:PACKET_data Unexecuted instantiation: ecdsa_sig.c:PACKET_data Unexecuted instantiation: eddsa_sig.c:PACKET_data Unexecuted instantiation: ml_dsa_sig.c:PACKET_data Unexecuted instantiation: rsa_sig.c:PACKET_data Unexecuted instantiation: slh_dsa_sig.c:PACKET_data Unexecuted instantiation: sm2_sig.c:PACKET_data Unexecuted instantiation: der_dsa_sig.c:PACKET_data Unexecuted instantiation: der_ec_sig.c:PACKET_data Unexecuted instantiation: der_ecx_key.c:PACKET_data Unexecuted instantiation: der_hkdf_gen.c:PACKET_data Unexecuted instantiation: der_ml_dsa_key.c:PACKET_data Unexecuted instantiation: der_rsa_key.c:PACKET_data Unexecuted instantiation: der_slh_dsa_key.c:PACKET_data Unexecuted instantiation: der_wrap_gen.c:PACKET_data Unexecuted instantiation: dsa_asn1.c:PACKET_data Unexecuted instantiation: dsa_sign.c:PACKET_data Unexecuted instantiation: ec_asn1.c:PACKET_data Unexecuted instantiation: hpke_util.c:PACKET_data Unexecuted instantiation: asn1_dsa.c:PACKET_data Unexecuted instantiation: der_writer.c:PACKET_data Unexecuted instantiation: packet.c:PACKET_data Unexecuted instantiation: ml_dsa_encoders.c:PACKET_data Unexecuted instantiation: ml_dsa_key.c:PACKET_data Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_data Unexecuted instantiation: ml_dsa_matrix.c:PACKET_data Unexecuted instantiation: ml_dsa_ntt.c:PACKET_data Unexecuted instantiation: ml_dsa_params.c:PACKET_data Unexecuted instantiation: ml_dsa_sample.c:PACKET_data Unexecuted instantiation: ml_dsa_sign.c:PACKET_data Unexecuted instantiation: slh_dsa.c:PACKET_data Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_data Unexecuted instantiation: slh_dsa_key.c:PACKET_data Unexecuted instantiation: slh_fors.c:PACKET_data Unexecuted instantiation: slh_hash.c:PACKET_data Unexecuted instantiation: slh_hypertree.c:PACKET_data Unexecuted instantiation: slh_xmss.c:PACKET_data Unexecuted instantiation: der_rsa_sig.c:PACKET_data Unexecuted instantiation: der_sm2_sig.c:PACKET_data Unexecuted instantiation: der_digests_gen.c:PACKET_data Unexecuted instantiation: der_dsa_gen.c:PACKET_data Unexecuted instantiation: der_ec_gen.c:PACKET_data Unexecuted instantiation: der_ecx_gen.c:PACKET_data Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_data Unexecuted instantiation: der_rsa_gen.c:PACKET_data Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_data Unexecuted instantiation: slh_wots.c:PACKET_data Unexecuted instantiation: der_sm2_gen.c:PACKET_data Unexecuted instantiation: punycode.c:PACKET_data |
74 | | |
75 | | /* |
76 | | * Initialise a PACKET with |len| bytes held in |buf|. This does not make a |
77 | | * copy of the data so |buf| must be present for the whole time that the PACKET |
78 | | * is being used. |
79 | | */ |
80 | | __owur static ossl_inline int PACKET_buf_init(PACKET *pkt, |
81 | | const unsigned char *buf, |
82 | | size_t len) |
83 | 0 | { |
84 | | /* Sanity check for negative values. */ |
85 | 0 | if (len > (size_t)(SIZE_MAX / 2)) |
86 | 0 | return 0; |
87 | | |
88 | 0 | pkt->curr = pkt->msgstart = buf; |
89 | 0 | pkt->remaining = len; |
90 | 0 | return 1; |
91 | 0 | } Unexecuted instantiation: params.c:PACKET_buf_init Unexecuted instantiation: encode_key2any.c:PACKET_buf_init Unexecuted instantiation: hkdf.c:PACKET_buf_init Unexecuted instantiation: x942kdf.c:PACKET_buf_init Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_buf_init Unexecuted instantiation: dsa_sig.c:PACKET_buf_init Unexecuted instantiation: ecdsa_sig.c:PACKET_buf_init Unexecuted instantiation: eddsa_sig.c:PACKET_buf_init Unexecuted instantiation: ml_dsa_sig.c:PACKET_buf_init Unexecuted instantiation: rsa_sig.c:PACKET_buf_init Unexecuted instantiation: slh_dsa_sig.c:PACKET_buf_init Unexecuted instantiation: sm2_sig.c:PACKET_buf_init Unexecuted instantiation: der_dsa_sig.c:PACKET_buf_init Unexecuted instantiation: der_ec_sig.c:PACKET_buf_init Unexecuted instantiation: der_ecx_key.c:PACKET_buf_init Unexecuted instantiation: der_hkdf_gen.c:PACKET_buf_init Unexecuted instantiation: der_ml_dsa_key.c:PACKET_buf_init Unexecuted instantiation: der_rsa_key.c:PACKET_buf_init Unexecuted instantiation: der_slh_dsa_key.c:PACKET_buf_init Unexecuted instantiation: der_wrap_gen.c:PACKET_buf_init Unexecuted instantiation: dsa_asn1.c:PACKET_buf_init Unexecuted instantiation: dsa_sign.c:PACKET_buf_init Unexecuted instantiation: ec_asn1.c:PACKET_buf_init Unexecuted instantiation: hpke_util.c:PACKET_buf_init Unexecuted instantiation: asn1_dsa.c:PACKET_buf_init Unexecuted instantiation: der_writer.c:PACKET_buf_init Unexecuted instantiation: packet.c:PACKET_buf_init Unexecuted instantiation: ml_dsa_encoders.c:PACKET_buf_init Unexecuted instantiation: ml_dsa_key.c:PACKET_buf_init Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_buf_init Unexecuted instantiation: ml_dsa_matrix.c:PACKET_buf_init Unexecuted instantiation: ml_dsa_ntt.c:PACKET_buf_init Unexecuted instantiation: ml_dsa_params.c:PACKET_buf_init Unexecuted instantiation: ml_dsa_sample.c:PACKET_buf_init Unexecuted instantiation: ml_dsa_sign.c:PACKET_buf_init Unexecuted instantiation: slh_dsa.c:PACKET_buf_init Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_buf_init Unexecuted instantiation: slh_dsa_key.c:PACKET_buf_init Unexecuted instantiation: slh_fors.c:PACKET_buf_init Unexecuted instantiation: slh_hash.c:PACKET_buf_init Unexecuted instantiation: slh_hypertree.c:PACKET_buf_init Unexecuted instantiation: slh_xmss.c:PACKET_buf_init Unexecuted instantiation: der_rsa_sig.c:PACKET_buf_init Unexecuted instantiation: der_sm2_sig.c:PACKET_buf_init Unexecuted instantiation: der_digests_gen.c:PACKET_buf_init Unexecuted instantiation: der_dsa_gen.c:PACKET_buf_init Unexecuted instantiation: der_ec_gen.c:PACKET_buf_init Unexecuted instantiation: der_ecx_gen.c:PACKET_buf_init Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_buf_init Unexecuted instantiation: der_rsa_gen.c:PACKET_buf_init Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_buf_init Unexecuted instantiation: slh_wots.c:PACKET_buf_init Unexecuted instantiation: der_sm2_gen.c:PACKET_buf_init Unexecuted instantiation: punycode.c:PACKET_buf_init |
92 | | |
93 | | /* Initialize a PACKET to hold zero bytes. */ |
94 | | static ossl_inline void PACKET_null_init(PACKET *pkt) |
95 | 0 | { |
96 | 0 | pkt->curr = pkt->msgstart = NULL; |
97 | 0 | pkt->remaining = 0; |
98 | 0 | } Unexecuted instantiation: params.c:PACKET_null_init Unexecuted instantiation: encode_key2any.c:PACKET_null_init Unexecuted instantiation: hkdf.c:PACKET_null_init Unexecuted instantiation: x942kdf.c:PACKET_null_init Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_null_init Unexecuted instantiation: dsa_sig.c:PACKET_null_init Unexecuted instantiation: ecdsa_sig.c:PACKET_null_init Unexecuted instantiation: eddsa_sig.c:PACKET_null_init Unexecuted instantiation: ml_dsa_sig.c:PACKET_null_init Unexecuted instantiation: rsa_sig.c:PACKET_null_init Unexecuted instantiation: slh_dsa_sig.c:PACKET_null_init Unexecuted instantiation: sm2_sig.c:PACKET_null_init Unexecuted instantiation: der_dsa_sig.c:PACKET_null_init Unexecuted instantiation: der_ec_sig.c:PACKET_null_init Unexecuted instantiation: der_ecx_key.c:PACKET_null_init Unexecuted instantiation: der_hkdf_gen.c:PACKET_null_init Unexecuted instantiation: der_ml_dsa_key.c:PACKET_null_init Unexecuted instantiation: der_rsa_key.c:PACKET_null_init Unexecuted instantiation: der_slh_dsa_key.c:PACKET_null_init Unexecuted instantiation: der_wrap_gen.c:PACKET_null_init Unexecuted instantiation: dsa_asn1.c:PACKET_null_init Unexecuted instantiation: dsa_sign.c:PACKET_null_init Unexecuted instantiation: ec_asn1.c:PACKET_null_init Unexecuted instantiation: hpke_util.c:PACKET_null_init Unexecuted instantiation: asn1_dsa.c:PACKET_null_init Unexecuted instantiation: der_writer.c:PACKET_null_init Unexecuted instantiation: packet.c:PACKET_null_init Unexecuted instantiation: ml_dsa_encoders.c:PACKET_null_init Unexecuted instantiation: ml_dsa_key.c:PACKET_null_init Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_null_init Unexecuted instantiation: ml_dsa_matrix.c:PACKET_null_init Unexecuted instantiation: ml_dsa_ntt.c:PACKET_null_init Unexecuted instantiation: ml_dsa_params.c:PACKET_null_init Unexecuted instantiation: ml_dsa_sample.c:PACKET_null_init Unexecuted instantiation: ml_dsa_sign.c:PACKET_null_init Unexecuted instantiation: slh_dsa.c:PACKET_null_init Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_null_init Unexecuted instantiation: slh_dsa_key.c:PACKET_null_init Unexecuted instantiation: slh_fors.c:PACKET_null_init Unexecuted instantiation: slh_hash.c:PACKET_null_init Unexecuted instantiation: slh_hypertree.c:PACKET_null_init Unexecuted instantiation: slh_xmss.c:PACKET_null_init Unexecuted instantiation: der_rsa_sig.c:PACKET_null_init Unexecuted instantiation: der_sm2_sig.c:PACKET_null_init Unexecuted instantiation: der_digests_gen.c:PACKET_null_init Unexecuted instantiation: der_dsa_gen.c:PACKET_null_init Unexecuted instantiation: der_ec_gen.c:PACKET_null_init Unexecuted instantiation: der_ecx_gen.c:PACKET_null_init Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_null_init Unexecuted instantiation: der_rsa_gen.c:PACKET_null_init Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_null_init Unexecuted instantiation: slh_wots.c:PACKET_null_init Unexecuted instantiation: der_sm2_gen.c:PACKET_null_init Unexecuted instantiation: punycode.c:PACKET_null_init |
99 | | |
100 | | /* |
101 | | * Returns 1 if the packet has length |num| and its contents equal the |num| |
102 | | * bytes read from |ptr|. Returns 0 otherwise (lengths or contents not equal). |
103 | | * If lengths are equal, performs the comparison in constant time. |
104 | | */ |
105 | | __owur static ossl_inline int PACKET_equal(const PACKET *pkt, const void *ptr, |
106 | | size_t num) |
107 | 0 | { |
108 | 0 | if (PACKET_remaining(pkt) != num) |
109 | 0 | return 0; |
110 | 0 | return CRYPTO_memcmp(pkt->curr, ptr, num) == 0; |
111 | 0 | } Unexecuted instantiation: params.c:PACKET_equal Unexecuted instantiation: encode_key2any.c:PACKET_equal Unexecuted instantiation: hkdf.c:PACKET_equal Unexecuted instantiation: x942kdf.c:PACKET_equal Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_equal Unexecuted instantiation: dsa_sig.c:PACKET_equal Unexecuted instantiation: ecdsa_sig.c:PACKET_equal Unexecuted instantiation: eddsa_sig.c:PACKET_equal Unexecuted instantiation: ml_dsa_sig.c:PACKET_equal Unexecuted instantiation: rsa_sig.c:PACKET_equal Unexecuted instantiation: slh_dsa_sig.c:PACKET_equal Unexecuted instantiation: sm2_sig.c:PACKET_equal Unexecuted instantiation: der_dsa_sig.c:PACKET_equal Unexecuted instantiation: der_ec_sig.c:PACKET_equal Unexecuted instantiation: der_ecx_key.c:PACKET_equal Unexecuted instantiation: der_hkdf_gen.c:PACKET_equal Unexecuted instantiation: der_ml_dsa_key.c:PACKET_equal Unexecuted instantiation: der_rsa_key.c:PACKET_equal Unexecuted instantiation: der_slh_dsa_key.c:PACKET_equal Unexecuted instantiation: der_wrap_gen.c:PACKET_equal Unexecuted instantiation: dsa_asn1.c:PACKET_equal Unexecuted instantiation: dsa_sign.c:PACKET_equal Unexecuted instantiation: ec_asn1.c:PACKET_equal Unexecuted instantiation: hpke_util.c:PACKET_equal Unexecuted instantiation: asn1_dsa.c:PACKET_equal Unexecuted instantiation: der_writer.c:PACKET_equal Unexecuted instantiation: packet.c:PACKET_equal Unexecuted instantiation: ml_dsa_encoders.c:PACKET_equal Unexecuted instantiation: ml_dsa_key.c:PACKET_equal Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_equal Unexecuted instantiation: ml_dsa_matrix.c:PACKET_equal Unexecuted instantiation: ml_dsa_ntt.c:PACKET_equal Unexecuted instantiation: ml_dsa_params.c:PACKET_equal Unexecuted instantiation: ml_dsa_sample.c:PACKET_equal Unexecuted instantiation: ml_dsa_sign.c:PACKET_equal Unexecuted instantiation: slh_dsa.c:PACKET_equal Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_equal Unexecuted instantiation: slh_dsa_key.c:PACKET_equal Unexecuted instantiation: slh_fors.c:PACKET_equal Unexecuted instantiation: slh_hash.c:PACKET_equal Unexecuted instantiation: slh_hypertree.c:PACKET_equal Unexecuted instantiation: slh_xmss.c:PACKET_equal Unexecuted instantiation: der_rsa_sig.c:PACKET_equal Unexecuted instantiation: der_sm2_sig.c:PACKET_equal Unexecuted instantiation: der_digests_gen.c:PACKET_equal Unexecuted instantiation: der_dsa_gen.c:PACKET_equal Unexecuted instantiation: der_ec_gen.c:PACKET_equal Unexecuted instantiation: der_ecx_gen.c:PACKET_equal Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_equal Unexecuted instantiation: der_rsa_gen.c:PACKET_equal Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_equal Unexecuted instantiation: slh_wots.c:PACKET_equal Unexecuted instantiation: der_sm2_gen.c:PACKET_equal Unexecuted instantiation: punycode.c:PACKET_equal |
112 | | |
113 | | /* |
114 | | * Peek ahead and initialize |subpkt| with the next |len| bytes read from |pkt|. |
115 | | * Data is not copied: the |subpkt| packet will share its underlying buffer with |
116 | | * the original |pkt|, so data wrapped by |pkt| must outlive the |subpkt|. |
117 | | */ |
118 | | __owur static ossl_inline int PACKET_peek_sub_packet(const PACKET *pkt, |
119 | | PACKET *subpkt, size_t len) |
120 | 0 | { |
121 | 0 | if (PACKET_remaining(pkt) < len) |
122 | 0 | return 0; |
123 | | |
124 | 0 | if (!PACKET_buf_init(subpkt, pkt->curr, len)) |
125 | 0 | return 0; |
126 | | |
127 | 0 | subpkt->msgstart = pkt->msgstart; |
128 | 0 | return 1; |
129 | 0 | } Unexecuted instantiation: params.c:PACKET_peek_sub_packet Unexecuted instantiation: encode_key2any.c:PACKET_peek_sub_packet Unexecuted instantiation: hkdf.c:PACKET_peek_sub_packet Unexecuted instantiation: x942kdf.c:PACKET_peek_sub_packet Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_peek_sub_packet Unexecuted instantiation: dsa_sig.c:PACKET_peek_sub_packet Unexecuted instantiation: ecdsa_sig.c:PACKET_peek_sub_packet Unexecuted instantiation: eddsa_sig.c:PACKET_peek_sub_packet Unexecuted instantiation: ml_dsa_sig.c:PACKET_peek_sub_packet Unexecuted instantiation: rsa_sig.c:PACKET_peek_sub_packet Unexecuted instantiation: slh_dsa_sig.c:PACKET_peek_sub_packet Unexecuted instantiation: sm2_sig.c:PACKET_peek_sub_packet Unexecuted instantiation: der_dsa_sig.c:PACKET_peek_sub_packet Unexecuted instantiation: der_ec_sig.c:PACKET_peek_sub_packet Unexecuted instantiation: der_ecx_key.c:PACKET_peek_sub_packet Unexecuted instantiation: der_hkdf_gen.c:PACKET_peek_sub_packet Unexecuted instantiation: der_ml_dsa_key.c:PACKET_peek_sub_packet Unexecuted instantiation: der_rsa_key.c:PACKET_peek_sub_packet Unexecuted instantiation: der_slh_dsa_key.c:PACKET_peek_sub_packet Unexecuted instantiation: der_wrap_gen.c:PACKET_peek_sub_packet Unexecuted instantiation: dsa_asn1.c:PACKET_peek_sub_packet Unexecuted instantiation: dsa_sign.c:PACKET_peek_sub_packet Unexecuted instantiation: ec_asn1.c:PACKET_peek_sub_packet Unexecuted instantiation: hpke_util.c:PACKET_peek_sub_packet Unexecuted instantiation: asn1_dsa.c:PACKET_peek_sub_packet Unexecuted instantiation: der_writer.c:PACKET_peek_sub_packet Unexecuted instantiation: packet.c:PACKET_peek_sub_packet Unexecuted instantiation: ml_dsa_encoders.c:PACKET_peek_sub_packet Unexecuted instantiation: ml_dsa_key.c:PACKET_peek_sub_packet Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_peek_sub_packet Unexecuted instantiation: ml_dsa_matrix.c:PACKET_peek_sub_packet Unexecuted instantiation: ml_dsa_ntt.c:PACKET_peek_sub_packet Unexecuted instantiation: ml_dsa_params.c:PACKET_peek_sub_packet Unexecuted instantiation: ml_dsa_sample.c:PACKET_peek_sub_packet Unexecuted instantiation: ml_dsa_sign.c:PACKET_peek_sub_packet Unexecuted instantiation: slh_dsa.c:PACKET_peek_sub_packet Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_peek_sub_packet Unexecuted instantiation: slh_dsa_key.c:PACKET_peek_sub_packet Unexecuted instantiation: slh_fors.c:PACKET_peek_sub_packet Unexecuted instantiation: slh_hash.c:PACKET_peek_sub_packet Unexecuted instantiation: slh_hypertree.c:PACKET_peek_sub_packet Unexecuted instantiation: slh_xmss.c:PACKET_peek_sub_packet Unexecuted instantiation: der_rsa_sig.c:PACKET_peek_sub_packet Unexecuted instantiation: der_sm2_sig.c:PACKET_peek_sub_packet Unexecuted instantiation: der_digests_gen.c:PACKET_peek_sub_packet Unexecuted instantiation: der_dsa_gen.c:PACKET_peek_sub_packet Unexecuted instantiation: der_ec_gen.c:PACKET_peek_sub_packet Unexecuted instantiation: der_ecx_gen.c:PACKET_peek_sub_packet Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_peek_sub_packet Unexecuted instantiation: der_rsa_gen.c:PACKET_peek_sub_packet Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_peek_sub_packet Unexecuted instantiation: slh_wots.c:PACKET_peek_sub_packet Unexecuted instantiation: der_sm2_gen.c:PACKET_peek_sub_packet Unexecuted instantiation: punycode.c:PACKET_peek_sub_packet |
130 | | |
131 | | /* |
132 | | * Initialize |subpkt| with the next |len| bytes read from |pkt|. Data is not |
133 | | * copied: the |subpkt| packet will share its underlying buffer with the |
134 | | * original |pkt|, so data wrapped by |pkt| must outlive the |subpkt|. |
135 | | */ |
136 | | __owur static ossl_inline int PACKET_get_sub_packet(PACKET *pkt, |
137 | | PACKET *subpkt, size_t len) |
138 | 0 | { |
139 | 0 | if (!PACKET_peek_sub_packet(pkt, subpkt, len)) |
140 | 0 | return 0; |
141 | | |
142 | 0 | packet_forward(pkt, len); |
143 | |
|
144 | 0 | return 1; |
145 | 0 | } Unexecuted instantiation: params.c:PACKET_get_sub_packet Unexecuted instantiation: encode_key2any.c:PACKET_get_sub_packet Unexecuted instantiation: hkdf.c:PACKET_get_sub_packet Unexecuted instantiation: x942kdf.c:PACKET_get_sub_packet Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_sub_packet Unexecuted instantiation: dsa_sig.c:PACKET_get_sub_packet Unexecuted instantiation: ecdsa_sig.c:PACKET_get_sub_packet Unexecuted instantiation: eddsa_sig.c:PACKET_get_sub_packet Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_sub_packet Unexecuted instantiation: rsa_sig.c:PACKET_get_sub_packet Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_sub_packet Unexecuted instantiation: sm2_sig.c:PACKET_get_sub_packet Unexecuted instantiation: der_dsa_sig.c:PACKET_get_sub_packet Unexecuted instantiation: der_ec_sig.c:PACKET_get_sub_packet Unexecuted instantiation: der_ecx_key.c:PACKET_get_sub_packet Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_sub_packet Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_sub_packet Unexecuted instantiation: der_rsa_key.c:PACKET_get_sub_packet Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_sub_packet Unexecuted instantiation: der_wrap_gen.c:PACKET_get_sub_packet Unexecuted instantiation: dsa_asn1.c:PACKET_get_sub_packet Unexecuted instantiation: dsa_sign.c:PACKET_get_sub_packet Unexecuted instantiation: ec_asn1.c:PACKET_get_sub_packet Unexecuted instantiation: hpke_util.c:PACKET_get_sub_packet Unexecuted instantiation: asn1_dsa.c:PACKET_get_sub_packet Unexecuted instantiation: der_writer.c:PACKET_get_sub_packet Unexecuted instantiation: packet.c:PACKET_get_sub_packet Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_sub_packet Unexecuted instantiation: ml_dsa_key.c:PACKET_get_sub_packet Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_sub_packet Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_sub_packet Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_sub_packet Unexecuted instantiation: ml_dsa_params.c:PACKET_get_sub_packet Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_sub_packet Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_sub_packet Unexecuted instantiation: slh_dsa.c:PACKET_get_sub_packet Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_sub_packet Unexecuted instantiation: slh_dsa_key.c:PACKET_get_sub_packet Unexecuted instantiation: slh_fors.c:PACKET_get_sub_packet Unexecuted instantiation: slh_hash.c:PACKET_get_sub_packet Unexecuted instantiation: slh_hypertree.c:PACKET_get_sub_packet Unexecuted instantiation: slh_xmss.c:PACKET_get_sub_packet Unexecuted instantiation: der_rsa_sig.c:PACKET_get_sub_packet Unexecuted instantiation: der_sm2_sig.c:PACKET_get_sub_packet Unexecuted instantiation: der_digests_gen.c:PACKET_get_sub_packet Unexecuted instantiation: der_dsa_gen.c:PACKET_get_sub_packet Unexecuted instantiation: der_ec_gen.c:PACKET_get_sub_packet Unexecuted instantiation: der_ecx_gen.c:PACKET_get_sub_packet Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_sub_packet Unexecuted instantiation: der_rsa_gen.c:PACKET_get_sub_packet Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_sub_packet Unexecuted instantiation: slh_wots.c:PACKET_get_sub_packet Unexecuted instantiation: der_sm2_gen.c:PACKET_get_sub_packet Unexecuted instantiation: punycode.c:PACKET_get_sub_packet |
146 | | |
147 | | /* |
148 | | * Peek ahead at 2 bytes in network order from |pkt| and store the value in |
149 | | * |*data| |
150 | | */ |
151 | | __owur static ossl_inline int PACKET_peek_net_2(const PACKET *pkt, |
152 | | unsigned int *data) |
153 | 0 | { |
154 | 0 | if (PACKET_remaining(pkt) < 2) |
155 | 0 | return 0; |
156 | | |
157 | 0 | *data = ((unsigned int)(*pkt->curr)) << 8; |
158 | 0 | *data |= *(pkt->curr + 1); |
159 | |
|
160 | 0 | return 1; |
161 | 0 | } Unexecuted instantiation: params.c:PACKET_peek_net_2 Unexecuted instantiation: encode_key2any.c:PACKET_peek_net_2 Unexecuted instantiation: hkdf.c:PACKET_peek_net_2 Unexecuted instantiation: x942kdf.c:PACKET_peek_net_2 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_peek_net_2 Unexecuted instantiation: dsa_sig.c:PACKET_peek_net_2 Unexecuted instantiation: ecdsa_sig.c:PACKET_peek_net_2 Unexecuted instantiation: eddsa_sig.c:PACKET_peek_net_2 Unexecuted instantiation: ml_dsa_sig.c:PACKET_peek_net_2 Unexecuted instantiation: rsa_sig.c:PACKET_peek_net_2 Unexecuted instantiation: slh_dsa_sig.c:PACKET_peek_net_2 Unexecuted instantiation: sm2_sig.c:PACKET_peek_net_2 Unexecuted instantiation: der_dsa_sig.c:PACKET_peek_net_2 Unexecuted instantiation: der_ec_sig.c:PACKET_peek_net_2 Unexecuted instantiation: der_ecx_key.c:PACKET_peek_net_2 Unexecuted instantiation: der_hkdf_gen.c:PACKET_peek_net_2 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_peek_net_2 Unexecuted instantiation: der_rsa_key.c:PACKET_peek_net_2 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_peek_net_2 Unexecuted instantiation: der_wrap_gen.c:PACKET_peek_net_2 Unexecuted instantiation: dsa_asn1.c:PACKET_peek_net_2 Unexecuted instantiation: dsa_sign.c:PACKET_peek_net_2 Unexecuted instantiation: ec_asn1.c:PACKET_peek_net_2 Unexecuted instantiation: hpke_util.c:PACKET_peek_net_2 Unexecuted instantiation: asn1_dsa.c:PACKET_peek_net_2 Unexecuted instantiation: der_writer.c:PACKET_peek_net_2 Unexecuted instantiation: packet.c:PACKET_peek_net_2 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_peek_net_2 Unexecuted instantiation: ml_dsa_key.c:PACKET_peek_net_2 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_peek_net_2 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_peek_net_2 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_peek_net_2 Unexecuted instantiation: ml_dsa_params.c:PACKET_peek_net_2 Unexecuted instantiation: ml_dsa_sample.c:PACKET_peek_net_2 Unexecuted instantiation: ml_dsa_sign.c:PACKET_peek_net_2 Unexecuted instantiation: slh_dsa.c:PACKET_peek_net_2 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_peek_net_2 Unexecuted instantiation: slh_dsa_key.c:PACKET_peek_net_2 Unexecuted instantiation: slh_fors.c:PACKET_peek_net_2 Unexecuted instantiation: slh_hash.c:PACKET_peek_net_2 Unexecuted instantiation: slh_hypertree.c:PACKET_peek_net_2 Unexecuted instantiation: slh_xmss.c:PACKET_peek_net_2 Unexecuted instantiation: der_rsa_sig.c:PACKET_peek_net_2 Unexecuted instantiation: der_sm2_sig.c:PACKET_peek_net_2 Unexecuted instantiation: der_digests_gen.c:PACKET_peek_net_2 Unexecuted instantiation: der_dsa_gen.c:PACKET_peek_net_2 Unexecuted instantiation: der_ec_gen.c:PACKET_peek_net_2 Unexecuted instantiation: der_ecx_gen.c:PACKET_peek_net_2 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_peek_net_2 Unexecuted instantiation: der_rsa_gen.c:PACKET_peek_net_2 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_peek_net_2 Unexecuted instantiation: slh_wots.c:PACKET_peek_net_2 Unexecuted instantiation: der_sm2_gen.c:PACKET_peek_net_2 Unexecuted instantiation: punycode.c:PACKET_peek_net_2 |
162 | | |
163 | | /* Equivalent of n2s */ |
164 | | /* Get 2 bytes in network order from |pkt| and store the value in |*data| */ |
165 | | __owur static ossl_inline int PACKET_get_net_2(PACKET *pkt, unsigned int *data) |
166 | 0 | { |
167 | 0 | if (!PACKET_peek_net_2(pkt, data)) |
168 | 0 | return 0; |
169 | | |
170 | 0 | packet_forward(pkt, 2); |
171 | |
|
172 | 0 | return 1; |
173 | 0 | } Unexecuted instantiation: params.c:PACKET_get_net_2 Unexecuted instantiation: encode_key2any.c:PACKET_get_net_2 Unexecuted instantiation: hkdf.c:PACKET_get_net_2 Unexecuted instantiation: x942kdf.c:PACKET_get_net_2 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_net_2 Unexecuted instantiation: dsa_sig.c:PACKET_get_net_2 Unexecuted instantiation: ecdsa_sig.c:PACKET_get_net_2 Unexecuted instantiation: eddsa_sig.c:PACKET_get_net_2 Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_net_2 Unexecuted instantiation: rsa_sig.c:PACKET_get_net_2 Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_net_2 Unexecuted instantiation: sm2_sig.c:PACKET_get_net_2 Unexecuted instantiation: der_dsa_sig.c:PACKET_get_net_2 Unexecuted instantiation: der_ec_sig.c:PACKET_get_net_2 Unexecuted instantiation: der_ecx_key.c:PACKET_get_net_2 Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_net_2 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_net_2 Unexecuted instantiation: der_rsa_key.c:PACKET_get_net_2 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_net_2 Unexecuted instantiation: der_wrap_gen.c:PACKET_get_net_2 Unexecuted instantiation: dsa_asn1.c:PACKET_get_net_2 Unexecuted instantiation: dsa_sign.c:PACKET_get_net_2 Unexecuted instantiation: ec_asn1.c:PACKET_get_net_2 Unexecuted instantiation: hpke_util.c:PACKET_get_net_2 Unexecuted instantiation: asn1_dsa.c:PACKET_get_net_2 Unexecuted instantiation: der_writer.c:PACKET_get_net_2 Unexecuted instantiation: packet.c:PACKET_get_net_2 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_net_2 Unexecuted instantiation: ml_dsa_key.c:PACKET_get_net_2 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_net_2 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_net_2 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_net_2 Unexecuted instantiation: ml_dsa_params.c:PACKET_get_net_2 Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_net_2 Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_net_2 Unexecuted instantiation: slh_dsa.c:PACKET_get_net_2 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_net_2 Unexecuted instantiation: slh_dsa_key.c:PACKET_get_net_2 Unexecuted instantiation: slh_fors.c:PACKET_get_net_2 Unexecuted instantiation: slh_hash.c:PACKET_get_net_2 Unexecuted instantiation: slh_hypertree.c:PACKET_get_net_2 Unexecuted instantiation: slh_xmss.c:PACKET_get_net_2 Unexecuted instantiation: der_rsa_sig.c:PACKET_get_net_2 Unexecuted instantiation: der_sm2_sig.c:PACKET_get_net_2 Unexecuted instantiation: der_digests_gen.c:PACKET_get_net_2 Unexecuted instantiation: der_dsa_gen.c:PACKET_get_net_2 Unexecuted instantiation: der_ec_gen.c:PACKET_get_net_2 Unexecuted instantiation: der_ecx_gen.c:PACKET_get_net_2 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_net_2 Unexecuted instantiation: der_rsa_gen.c:PACKET_get_net_2 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_net_2 Unexecuted instantiation: slh_wots.c:PACKET_get_net_2 Unexecuted instantiation: der_sm2_gen.c:PACKET_get_net_2 Unexecuted instantiation: punycode.c:PACKET_get_net_2 |
174 | | |
175 | | /* Same as PACKET_get_net_2() but for a size_t */ |
176 | | __owur static ossl_inline int PACKET_get_net_2_len(PACKET *pkt, size_t *data) |
177 | 0 | { |
178 | 0 | unsigned int i; |
179 | 0 | int ret = PACKET_get_net_2(pkt, &i); |
180 | 0 |
|
181 | 0 | if (ret) |
182 | 0 | *data = (size_t)i; |
183 | 0 |
|
184 | 0 | return ret; |
185 | 0 | } Unexecuted instantiation: params.c:PACKET_get_net_2_len Unexecuted instantiation: encode_key2any.c:PACKET_get_net_2_len Unexecuted instantiation: hkdf.c:PACKET_get_net_2_len Unexecuted instantiation: x942kdf.c:PACKET_get_net_2_len Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_net_2_len Unexecuted instantiation: dsa_sig.c:PACKET_get_net_2_len Unexecuted instantiation: ecdsa_sig.c:PACKET_get_net_2_len Unexecuted instantiation: eddsa_sig.c:PACKET_get_net_2_len Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_net_2_len Unexecuted instantiation: rsa_sig.c:PACKET_get_net_2_len Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_net_2_len Unexecuted instantiation: sm2_sig.c:PACKET_get_net_2_len Unexecuted instantiation: der_dsa_sig.c:PACKET_get_net_2_len Unexecuted instantiation: der_ec_sig.c:PACKET_get_net_2_len Unexecuted instantiation: der_ecx_key.c:PACKET_get_net_2_len Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_net_2_len Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_net_2_len Unexecuted instantiation: der_rsa_key.c:PACKET_get_net_2_len Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_net_2_len Unexecuted instantiation: der_wrap_gen.c:PACKET_get_net_2_len Unexecuted instantiation: dsa_asn1.c:PACKET_get_net_2_len Unexecuted instantiation: dsa_sign.c:PACKET_get_net_2_len Unexecuted instantiation: ec_asn1.c:PACKET_get_net_2_len Unexecuted instantiation: hpke_util.c:PACKET_get_net_2_len Unexecuted instantiation: asn1_dsa.c:PACKET_get_net_2_len Unexecuted instantiation: der_writer.c:PACKET_get_net_2_len Unexecuted instantiation: packet.c:PACKET_get_net_2_len Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_net_2_len Unexecuted instantiation: ml_dsa_key.c:PACKET_get_net_2_len Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_net_2_len Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_net_2_len Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_net_2_len Unexecuted instantiation: ml_dsa_params.c:PACKET_get_net_2_len Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_net_2_len Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_net_2_len Unexecuted instantiation: slh_dsa.c:PACKET_get_net_2_len Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_net_2_len Unexecuted instantiation: slh_dsa_key.c:PACKET_get_net_2_len Unexecuted instantiation: slh_fors.c:PACKET_get_net_2_len Unexecuted instantiation: slh_hash.c:PACKET_get_net_2_len Unexecuted instantiation: slh_hypertree.c:PACKET_get_net_2_len Unexecuted instantiation: slh_xmss.c:PACKET_get_net_2_len Unexecuted instantiation: der_rsa_sig.c:PACKET_get_net_2_len Unexecuted instantiation: der_sm2_sig.c:PACKET_get_net_2_len Unexecuted instantiation: der_digests_gen.c:PACKET_get_net_2_len Unexecuted instantiation: der_dsa_gen.c:PACKET_get_net_2_len Unexecuted instantiation: der_ec_gen.c:PACKET_get_net_2_len Unexecuted instantiation: der_ecx_gen.c:PACKET_get_net_2_len Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_net_2_len Unexecuted instantiation: der_rsa_gen.c:PACKET_get_net_2_len Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_net_2_len Unexecuted instantiation: slh_wots.c:PACKET_get_net_2_len Unexecuted instantiation: der_sm2_gen.c:PACKET_get_net_2_len Unexecuted instantiation: punycode.c:PACKET_get_net_2_len |
186 | | |
187 | | /* |
188 | | * Peek ahead at 3 bytes in network order from |pkt| and store the value in |
189 | | * |*data| |
190 | | */ |
191 | | __owur static ossl_inline int PACKET_peek_net_3(const PACKET *pkt, |
192 | | unsigned long *data) |
193 | 0 | { |
194 | 0 | if (PACKET_remaining(pkt) < 3) |
195 | 0 | return 0; |
196 | 0 |
|
197 | 0 | *data = ((unsigned long)(*pkt->curr)) << 16; |
198 | 0 | *data |= ((unsigned long)(*(pkt->curr + 1))) << 8; |
199 | 0 | *data |= *(pkt->curr + 2); |
200 | 0 |
|
201 | 0 | return 1; |
202 | 0 | } Unexecuted instantiation: params.c:PACKET_peek_net_3 Unexecuted instantiation: encode_key2any.c:PACKET_peek_net_3 Unexecuted instantiation: hkdf.c:PACKET_peek_net_3 Unexecuted instantiation: x942kdf.c:PACKET_peek_net_3 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_peek_net_3 Unexecuted instantiation: dsa_sig.c:PACKET_peek_net_3 Unexecuted instantiation: ecdsa_sig.c:PACKET_peek_net_3 Unexecuted instantiation: eddsa_sig.c:PACKET_peek_net_3 Unexecuted instantiation: ml_dsa_sig.c:PACKET_peek_net_3 Unexecuted instantiation: rsa_sig.c:PACKET_peek_net_3 Unexecuted instantiation: slh_dsa_sig.c:PACKET_peek_net_3 Unexecuted instantiation: sm2_sig.c:PACKET_peek_net_3 Unexecuted instantiation: der_dsa_sig.c:PACKET_peek_net_3 Unexecuted instantiation: der_ec_sig.c:PACKET_peek_net_3 Unexecuted instantiation: der_ecx_key.c:PACKET_peek_net_3 Unexecuted instantiation: der_hkdf_gen.c:PACKET_peek_net_3 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_peek_net_3 Unexecuted instantiation: der_rsa_key.c:PACKET_peek_net_3 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_peek_net_3 Unexecuted instantiation: der_wrap_gen.c:PACKET_peek_net_3 Unexecuted instantiation: dsa_asn1.c:PACKET_peek_net_3 Unexecuted instantiation: dsa_sign.c:PACKET_peek_net_3 Unexecuted instantiation: ec_asn1.c:PACKET_peek_net_3 Unexecuted instantiation: hpke_util.c:PACKET_peek_net_3 Unexecuted instantiation: asn1_dsa.c:PACKET_peek_net_3 Unexecuted instantiation: der_writer.c:PACKET_peek_net_3 Unexecuted instantiation: packet.c:PACKET_peek_net_3 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_peek_net_3 Unexecuted instantiation: ml_dsa_key.c:PACKET_peek_net_3 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_peek_net_3 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_peek_net_3 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_peek_net_3 Unexecuted instantiation: ml_dsa_params.c:PACKET_peek_net_3 Unexecuted instantiation: ml_dsa_sample.c:PACKET_peek_net_3 Unexecuted instantiation: ml_dsa_sign.c:PACKET_peek_net_3 Unexecuted instantiation: slh_dsa.c:PACKET_peek_net_3 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_peek_net_3 Unexecuted instantiation: slh_dsa_key.c:PACKET_peek_net_3 Unexecuted instantiation: slh_fors.c:PACKET_peek_net_3 Unexecuted instantiation: slh_hash.c:PACKET_peek_net_3 Unexecuted instantiation: slh_hypertree.c:PACKET_peek_net_3 Unexecuted instantiation: slh_xmss.c:PACKET_peek_net_3 Unexecuted instantiation: der_rsa_sig.c:PACKET_peek_net_3 Unexecuted instantiation: der_sm2_sig.c:PACKET_peek_net_3 Unexecuted instantiation: der_digests_gen.c:PACKET_peek_net_3 Unexecuted instantiation: der_dsa_gen.c:PACKET_peek_net_3 Unexecuted instantiation: der_ec_gen.c:PACKET_peek_net_3 Unexecuted instantiation: der_ecx_gen.c:PACKET_peek_net_3 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_peek_net_3 Unexecuted instantiation: der_rsa_gen.c:PACKET_peek_net_3 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_peek_net_3 Unexecuted instantiation: slh_wots.c:PACKET_peek_net_3 Unexecuted instantiation: der_sm2_gen.c:PACKET_peek_net_3 Unexecuted instantiation: punycode.c:PACKET_peek_net_3 |
203 | | |
204 | | /* Equivalent of n2l3 */ |
205 | | /* Get 3 bytes in network order from |pkt| and store the value in |*data| */ |
206 | | __owur static ossl_inline int PACKET_get_net_3(PACKET *pkt, unsigned long *data) |
207 | 0 | { |
208 | 0 | if (!PACKET_peek_net_3(pkt, data)) |
209 | 0 | return 0; |
210 | 0 |
|
211 | 0 | packet_forward(pkt, 3); |
212 | 0 |
|
213 | 0 | return 1; |
214 | 0 | } Unexecuted instantiation: params.c:PACKET_get_net_3 Unexecuted instantiation: encode_key2any.c:PACKET_get_net_3 Unexecuted instantiation: hkdf.c:PACKET_get_net_3 Unexecuted instantiation: x942kdf.c:PACKET_get_net_3 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_net_3 Unexecuted instantiation: dsa_sig.c:PACKET_get_net_3 Unexecuted instantiation: ecdsa_sig.c:PACKET_get_net_3 Unexecuted instantiation: eddsa_sig.c:PACKET_get_net_3 Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_net_3 Unexecuted instantiation: rsa_sig.c:PACKET_get_net_3 Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_net_3 Unexecuted instantiation: sm2_sig.c:PACKET_get_net_3 Unexecuted instantiation: der_dsa_sig.c:PACKET_get_net_3 Unexecuted instantiation: der_ec_sig.c:PACKET_get_net_3 Unexecuted instantiation: der_ecx_key.c:PACKET_get_net_3 Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_net_3 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_net_3 Unexecuted instantiation: der_rsa_key.c:PACKET_get_net_3 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_net_3 Unexecuted instantiation: der_wrap_gen.c:PACKET_get_net_3 Unexecuted instantiation: dsa_asn1.c:PACKET_get_net_3 Unexecuted instantiation: dsa_sign.c:PACKET_get_net_3 Unexecuted instantiation: ec_asn1.c:PACKET_get_net_3 Unexecuted instantiation: hpke_util.c:PACKET_get_net_3 Unexecuted instantiation: asn1_dsa.c:PACKET_get_net_3 Unexecuted instantiation: der_writer.c:PACKET_get_net_3 Unexecuted instantiation: packet.c:PACKET_get_net_3 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_net_3 Unexecuted instantiation: ml_dsa_key.c:PACKET_get_net_3 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_net_3 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_net_3 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_net_3 Unexecuted instantiation: ml_dsa_params.c:PACKET_get_net_3 Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_net_3 Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_net_3 Unexecuted instantiation: slh_dsa.c:PACKET_get_net_3 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_net_3 Unexecuted instantiation: slh_dsa_key.c:PACKET_get_net_3 Unexecuted instantiation: slh_fors.c:PACKET_get_net_3 Unexecuted instantiation: slh_hash.c:PACKET_get_net_3 Unexecuted instantiation: slh_hypertree.c:PACKET_get_net_3 Unexecuted instantiation: slh_xmss.c:PACKET_get_net_3 Unexecuted instantiation: der_rsa_sig.c:PACKET_get_net_3 Unexecuted instantiation: der_sm2_sig.c:PACKET_get_net_3 Unexecuted instantiation: der_digests_gen.c:PACKET_get_net_3 Unexecuted instantiation: der_dsa_gen.c:PACKET_get_net_3 Unexecuted instantiation: der_ec_gen.c:PACKET_get_net_3 Unexecuted instantiation: der_ecx_gen.c:PACKET_get_net_3 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_net_3 Unexecuted instantiation: der_rsa_gen.c:PACKET_get_net_3 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_net_3 Unexecuted instantiation: slh_wots.c:PACKET_get_net_3 Unexecuted instantiation: der_sm2_gen.c:PACKET_get_net_3 Unexecuted instantiation: punycode.c:PACKET_get_net_3 |
215 | | |
216 | | /* Same as PACKET_get_net_3() but for a size_t */ |
217 | | __owur static ossl_inline int PACKET_get_net_3_len(PACKET *pkt, size_t *data) |
218 | 0 | { |
219 | 0 | unsigned long i; |
220 | 0 | int ret = PACKET_get_net_3(pkt, &i); |
221 | 0 |
|
222 | 0 | if (ret) |
223 | 0 | *data = (size_t)i; |
224 | 0 |
|
225 | 0 | return ret; |
226 | 0 | } Unexecuted instantiation: params.c:PACKET_get_net_3_len Unexecuted instantiation: encode_key2any.c:PACKET_get_net_3_len Unexecuted instantiation: hkdf.c:PACKET_get_net_3_len Unexecuted instantiation: x942kdf.c:PACKET_get_net_3_len Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_net_3_len Unexecuted instantiation: dsa_sig.c:PACKET_get_net_3_len Unexecuted instantiation: ecdsa_sig.c:PACKET_get_net_3_len Unexecuted instantiation: eddsa_sig.c:PACKET_get_net_3_len Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_net_3_len Unexecuted instantiation: rsa_sig.c:PACKET_get_net_3_len Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_net_3_len Unexecuted instantiation: sm2_sig.c:PACKET_get_net_3_len Unexecuted instantiation: der_dsa_sig.c:PACKET_get_net_3_len Unexecuted instantiation: der_ec_sig.c:PACKET_get_net_3_len Unexecuted instantiation: der_ecx_key.c:PACKET_get_net_3_len Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_net_3_len Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_net_3_len Unexecuted instantiation: der_rsa_key.c:PACKET_get_net_3_len Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_net_3_len Unexecuted instantiation: der_wrap_gen.c:PACKET_get_net_3_len Unexecuted instantiation: dsa_asn1.c:PACKET_get_net_3_len Unexecuted instantiation: dsa_sign.c:PACKET_get_net_3_len Unexecuted instantiation: ec_asn1.c:PACKET_get_net_3_len Unexecuted instantiation: hpke_util.c:PACKET_get_net_3_len Unexecuted instantiation: asn1_dsa.c:PACKET_get_net_3_len Unexecuted instantiation: der_writer.c:PACKET_get_net_3_len Unexecuted instantiation: packet.c:PACKET_get_net_3_len Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_net_3_len Unexecuted instantiation: ml_dsa_key.c:PACKET_get_net_3_len Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_net_3_len Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_net_3_len Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_net_3_len Unexecuted instantiation: ml_dsa_params.c:PACKET_get_net_3_len Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_net_3_len Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_net_3_len Unexecuted instantiation: slh_dsa.c:PACKET_get_net_3_len Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_net_3_len Unexecuted instantiation: slh_dsa_key.c:PACKET_get_net_3_len Unexecuted instantiation: slh_fors.c:PACKET_get_net_3_len Unexecuted instantiation: slh_hash.c:PACKET_get_net_3_len Unexecuted instantiation: slh_hypertree.c:PACKET_get_net_3_len Unexecuted instantiation: slh_xmss.c:PACKET_get_net_3_len Unexecuted instantiation: der_rsa_sig.c:PACKET_get_net_3_len Unexecuted instantiation: der_sm2_sig.c:PACKET_get_net_3_len Unexecuted instantiation: der_digests_gen.c:PACKET_get_net_3_len Unexecuted instantiation: der_dsa_gen.c:PACKET_get_net_3_len Unexecuted instantiation: der_ec_gen.c:PACKET_get_net_3_len Unexecuted instantiation: der_ecx_gen.c:PACKET_get_net_3_len Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_net_3_len Unexecuted instantiation: der_rsa_gen.c:PACKET_get_net_3_len Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_net_3_len Unexecuted instantiation: slh_wots.c:PACKET_get_net_3_len Unexecuted instantiation: der_sm2_gen.c:PACKET_get_net_3_len Unexecuted instantiation: punycode.c:PACKET_get_net_3_len |
227 | | |
228 | | /* |
229 | | * Peek ahead at 4 bytes in network order from |pkt| and store the value in |
230 | | * |*data| |
231 | | */ |
232 | | __owur static ossl_inline int PACKET_peek_net_4(const PACKET *pkt, |
233 | | unsigned long *data) |
234 | 0 | { |
235 | 0 | if (PACKET_remaining(pkt) < 4) |
236 | 0 | return 0; |
237 | 0 |
|
238 | 0 | *data = ((unsigned long)(*pkt->curr)) << 24; |
239 | 0 | *data |= ((unsigned long)(*(pkt->curr + 1))) << 16; |
240 | 0 | *data |= ((unsigned long)(*(pkt->curr + 2))) << 8; |
241 | 0 | *data |= *(pkt->curr + 3); |
242 | 0 |
|
243 | 0 | return 1; |
244 | 0 | } Unexecuted instantiation: params.c:PACKET_peek_net_4 Unexecuted instantiation: encode_key2any.c:PACKET_peek_net_4 Unexecuted instantiation: hkdf.c:PACKET_peek_net_4 Unexecuted instantiation: x942kdf.c:PACKET_peek_net_4 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_peek_net_4 Unexecuted instantiation: dsa_sig.c:PACKET_peek_net_4 Unexecuted instantiation: ecdsa_sig.c:PACKET_peek_net_4 Unexecuted instantiation: eddsa_sig.c:PACKET_peek_net_4 Unexecuted instantiation: ml_dsa_sig.c:PACKET_peek_net_4 Unexecuted instantiation: rsa_sig.c:PACKET_peek_net_4 Unexecuted instantiation: slh_dsa_sig.c:PACKET_peek_net_4 Unexecuted instantiation: sm2_sig.c:PACKET_peek_net_4 Unexecuted instantiation: der_dsa_sig.c:PACKET_peek_net_4 Unexecuted instantiation: der_ec_sig.c:PACKET_peek_net_4 Unexecuted instantiation: der_ecx_key.c:PACKET_peek_net_4 Unexecuted instantiation: der_hkdf_gen.c:PACKET_peek_net_4 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_peek_net_4 Unexecuted instantiation: der_rsa_key.c:PACKET_peek_net_4 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_peek_net_4 Unexecuted instantiation: der_wrap_gen.c:PACKET_peek_net_4 Unexecuted instantiation: dsa_asn1.c:PACKET_peek_net_4 Unexecuted instantiation: dsa_sign.c:PACKET_peek_net_4 Unexecuted instantiation: ec_asn1.c:PACKET_peek_net_4 Unexecuted instantiation: hpke_util.c:PACKET_peek_net_4 Unexecuted instantiation: asn1_dsa.c:PACKET_peek_net_4 Unexecuted instantiation: der_writer.c:PACKET_peek_net_4 Unexecuted instantiation: packet.c:PACKET_peek_net_4 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_peek_net_4 Unexecuted instantiation: ml_dsa_key.c:PACKET_peek_net_4 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_peek_net_4 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_peek_net_4 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_peek_net_4 Unexecuted instantiation: ml_dsa_params.c:PACKET_peek_net_4 Unexecuted instantiation: ml_dsa_sample.c:PACKET_peek_net_4 Unexecuted instantiation: ml_dsa_sign.c:PACKET_peek_net_4 Unexecuted instantiation: slh_dsa.c:PACKET_peek_net_4 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_peek_net_4 Unexecuted instantiation: slh_dsa_key.c:PACKET_peek_net_4 Unexecuted instantiation: slh_fors.c:PACKET_peek_net_4 Unexecuted instantiation: slh_hash.c:PACKET_peek_net_4 Unexecuted instantiation: slh_hypertree.c:PACKET_peek_net_4 Unexecuted instantiation: slh_xmss.c:PACKET_peek_net_4 Unexecuted instantiation: der_rsa_sig.c:PACKET_peek_net_4 Unexecuted instantiation: der_sm2_sig.c:PACKET_peek_net_4 Unexecuted instantiation: der_digests_gen.c:PACKET_peek_net_4 Unexecuted instantiation: der_dsa_gen.c:PACKET_peek_net_4 Unexecuted instantiation: der_ec_gen.c:PACKET_peek_net_4 Unexecuted instantiation: der_ecx_gen.c:PACKET_peek_net_4 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_peek_net_4 Unexecuted instantiation: der_rsa_gen.c:PACKET_peek_net_4 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_peek_net_4 Unexecuted instantiation: slh_wots.c:PACKET_peek_net_4 Unexecuted instantiation: der_sm2_gen.c:PACKET_peek_net_4 Unexecuted instantiation: punycode.c:PACKET_peek_net_4 |
245 | | |
246 | | /* |
247 | | * Peek ahead at 8 bytes in network order from |pkt| and store the value in |
248 | | * |*data| |
249 | | */ |
250 | | __owur static ossl_inline int PACKET_peek_net_8(const PACKET *pkt, |
251 | | uint64_t *data) |
252 | 0 | { |
253 | 0 | if (PACKET_remaining(pkt) < 8) |
254 | 0 | return 0; |
255 | 0 |
|
256 | 0 | *data = ((uint64_t)(*pkt->curr)) << 56; |
257 | 0 | *data |= ((uint64_t)(*(pkt->curr + 1))) << 48; |
258 | 0 | *data |= ((uint64_t)(*(pkt->curr + 2))) << 40; |
259 | 0 | *data |= ((uint64_t)(*(pkt->curr + 3))) << 32; |
260 | 0 | *data |= ((uint64_t)(*(pkt->curr + 4))) << 24; |
261 | 0 | *data |= ((uint64_t)(*(pkt->curr + 5))) << 16; |
262 | 0 | *data |= ((uint64_t)(*(pkt->curr + 6))) << 8; |
263 | 0 | *data |= *(pkt->curr + 7); |
264 | 0 |
|
265 | 0 | return 1; |
266 | 0 | } Unexecuted instantiation: params.c:PACKET_peek_net_8 Unexecuted instantiation: encode_key2any.c:PACKET_peek_net_8 Unexecuted instantiation: hkdf.c:PACKET_peek_net_8 Unexecuted instantiation: x942kdf.c:PACKET_peek_net_8 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_peek_net_8 Unexecuted instantiation: dsa_sig.c:PACKET_peek_net_8 Unexecuted instantiation: ecdsa_sig.c:PACKET_peek_net_8 Unexecuted instantiation: eddsa_sig.c:PACKET_peek_net_8 Unexecuted instantiation: ml_dsa_sig.c:PACKET_peek_net_8 Unexecuted instantiation: rsa_sig.c:PACKET_peek_net_8 Unexecuted instantiation: slh_dsa_sig.c:PACKET_peek_net_8 Unexecuted instantiation: sm2_sig.c:PACKET_peek_net_8 Unexecuted instantiation: der_dsa_sig.c:PACKET_peek_net_8 Unexecuted instantiation: der_ec_sig.c:PACKET_peek_net_8 Unexecuted instantiation: der_ecx_key.c:PACKET_peek_net_8 Unexecuted instantiation: der_hkdf_gen.c:PACKET_peek_net_8 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_peek_net_8 Unexecuted instantiation: der_rsa_key.c:PACKET_peek_net_8 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_peek_net_8 Unexecuted instantiation: der_wrap_gen.c:PACKET_peek_net_8 Unexecuted instantiation: dsa_asn1.c:PACKET_peek_net_8 Unexecuted instantiation: dsa_sign.c:PACKET_peek_net_8 Unexecuted instantiation: ec_asn1.c:PACKET_peek_net_8 Unexecuted instantiation: hpke_util.c:PACKET_peek_net_8 Unexecuted instantiation: asn1_dsa.c:PACKET_peek_net_8 Unexecuted instantiation: der_writer.c:PACKET_peek_net_8 Unexecuted instantiation: packet.c:PACKET_peek_net_8 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_peek_net_8 Unexecuted instantiation: ml_dsa_key.c:PACKET_peek_net_8 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_peek_net_8 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_peek_net_8 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_peek_net_8 Unexecuted instantiation: ml_dsa_params.c:PACKET_peek_net_8 Unexecuted instantiation: ml_dsa_sample.c:PACKET_peek_net_8 Unexecuted instantiation: ml_dsa_sign.c:PACKET_peek_net_8 Unexecuted instantiation: slh_dsa.c:PACKET_peek_net_8 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_peek_net_8 Unexecuted instantiation: slh_dsa_key.c:PACKET_peek_net_8 Unexecuted instantiation: slh_fors.c:PACKET_peek_net_8 Unexecuted instantiation: slh_hash.c:PACKET_peek_net_8 Unexecuted instantiation: slh_hypertree.c:PACKET_peek_net_8 Unexecuted instantiation: slh_xmss.c:PACKET_peek_net_8 Unexecuted instantiation: der_rsa_sig.c:PACKET_peek_net_8 Unexecuted instantiation: der_sm2_sig.c:PACKET_peek_net_8 Unexecuted instantiation: der_digests_gen.c:PACKET_peek_net_8 Unexecuted instantiation: der_dsa_gen.c:PACKET_peek_net_8 Unexecuted instantiation: der_ec_gen.c:PACKET_peek_net_8 Unexecuted instantiation: der_ecx_gen.c:PACKET_peek_net_8 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_peek_net_8 Unexecuted instantiation: der_rsa_gen.c:PACKET_peek_net_8 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_peek_net_8 Unexecuted instantiation: slh_wots.c:PACKET_peek_net_8 Unexecuted instantiation: der_sm2_gen.c:PACKET_peek_net_8 Unexecuted instantiation: punycode.c:PACKET_peek_net_8 |
267 | | |
268 | | /* Equivalent of n2l */ |
269 | | /* Get 4 bytes in network order from |pkt| and store the value in |*data| */ |
270 | | __owur static ossl_inline int PACKET_get_net_4(PACKET *pkt, unsigned long *data) |
271 | 0 | { |
272 | 0 | if (!PACKET_peek_net_4(pkt, data)) |
273 | 0 | return 0; |
274 | 0 |
|
275 | 0 | packet_forward(pkt, 4); |
276 | 0 |
|
277 | 0 | return 1; |
278 | 0 | } Unexecuted instantiation: params.c:PACKET_get_net_4 Unexecuted instantiation: encode_key2any.c:PACKET_get_net_4 Unexecuted instantiation: hkdf.c:PACKET_get_net_4 Unexecuted instantiation: x942kdf.c:PACKET_get_net_4 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_net_4 Unexecuted instantiation: dsa_sig.c:PACKET_get_net_4 Unexecuted instantiation: ecdsa_sig.c:PACKET_get_net_4 Unexecuted instantiation: eddsa_sig.c:PACKET_get_net_4 Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_net_4 Unexecuted instantiation: rsa_sig.c:PACKET_get_net_4 Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_net_4 Unexecuted instantiation: sm2_sig.c:PACKET_get_net_4 Unexecuted instantiation: der_dsa_sig.c:PACKET_get_net_4 Unexecuted instantiation: der_ec_sig.c:PACKET_get_net_4 Unexecuted instantiation: der_ecx_key.c:PACKET_get_net_4 Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_net_4 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_net_4 Unexecuted instantiation: der_rsa_key.c:PACKET_get_net_4 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_net_4 Unexecuted instantiation: der_wrap_gen.c:PACKET_get_net_4 Unexecuted instantiation: dsa_asn1.c:PACKET_get_net_4 Unexecuted instantiation: dsa_sign.c:PACKET_get_net_4 Unexecuted instantiation: ec_asn1.c:PACKET_get_net_4 Unexecuted instantiation: hpke_util.c:PACKET_get_net_4 Unexecuted instantiation: asn1_dsa.c:PACKET_get_net_4 Unexecuted instantiation: der_writer.c:PACKET_get_net_4 Unexecuted instantiation: packet.c:PACKET_get_net_4 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_net_4 Unexecuted instantiation: ml_dsa_key.c:PACKET_get_net_4 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_net_4 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_net_4 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_net_4 Unexecuted instantiation: ml_dsa_params.c:PACKET_get_net_4 Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_net_4 Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_net_4 Unexecuted instantiation: slh_dsa.c:PACKET_get_net_4 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_net_4 Unexecuted instantiation: slh_dsa_key.c:PACKET_get_net_4 Unexecuted instantiation: slh_fors.c:PACKET_get_net_4 Unexecuted instantiation: slh_hash.c:PACKET_get_net_4 Unexecuted instantiation: slh_hypertree.c:PACKET_get_net_4 Unexecuted instantiation: slh_xmss.c:PACKET_get_net_4 Unexecuted instantiation: der_rsa_sig.c:PACKET_get_net_4 Unexecuted instantiation: der_sm2_sig.c:PACKET_get_net_4 Unexecuted instantiation: der_digests_gen.c:PACKET_get_net_4 Unexecuted instantiation: der_dsa_gen.c:PACKET_get_net_4 Unexecuted instantiation: der_ec_gen.c:PACKET_get_net_4 Unexecuted instantiation: der_ecx_gen.c:PACKET_get_net_4 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_net_4 Unexecuted instantiation: der_rsa_gen.c:PACKET_get_net_4 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_net_4 Unexecuted instantiation: slh_wots.c:PACKET_get_net_4 Unexecuted instantiation: der_sm2_gen.c:PACKET_get_net_4 Unexecuted instantiation: punycode.c:PACKET_get_net_4 |
279 | | |
280 | | /* Same as PACKET_get_net_4() but for a size_t */ |
281 | | __owur static ossl_inline int PACKET_get_net_4_len(PACKET *pkt, size_t *data) |
282 | 0 | { |
283 | 0 | unsigned long i; |
284 | 0 | int ret = PACKET_get_net_4(pkt, &i); |
285 | 0 |
|
286 | 0 | if (ret) |
287 | 0 | *data = (size_t)i; |
288 | 0 |
|
289 | 0 | return ret; |
290 | 0 | } Unexecuted instantiation: params.c:PACKET_get_net_4_len Unexecuted instantiation: encode_key2any.c:PACKET_get_net_4_len Unexecuted instantiation: hkdf.c:PACKET_get_net_4_len Unexecuted instantiation: x942kdf.c:PACKET_get_net_4_len Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_net_4_len Unexecuted instantiation: dsa_sig.c:PACKET_get_net_4_len Unexecuted instantiation: ecdsa_sig.c:PACKET_get_net_4_len Unexecuted instantiation: eddsa_sig.c:PACKET_get_net_4_len Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_net_4_len Unexecuted instantiation: rsa_sig.c:PACKET_get_net_4_len Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_net_4_len Unexecuted instantiation: sm2_sig.c:PACKET_get_net_4_len Unexecuted instantiation: der_dsa_sig.c:PACKET_get_net_4_len Unexecuted instantiation: der_ec_sig.c:PACKET_get_net_4_len Unexecuted instantiation: der_ecx_key.c:PACKET_get_net_4_len Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_net_4_len Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_net_4_len Unexecuted instantiation: der_rsa_key.c:PACKET_get_net_4_len Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_net_4_len Unexecuted instantiation: der_wrap_gen.c:PACKET_get_net_4_len Unexecuted instantiation: dsa_asn1.c:PACKET_get_net_4_len Unexecuted instantiation: dsa_sign.c:PACKET_get_net_4_len Unexecuted instantiation: ec_asn1.c:PACKET_get_net_4_len Unexecuted instantiation: hpke_util.c:PACKET_get_net_4_len Unexecuted instantiation: asn1_dsa.c:PACKET_get_net_4_len Unexecuted instantiation: der_writer.c:PACKET_get_net_4_len Unexecuted instantiation: packet.c:PACKET_get_net_4_len Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_net_4_len Unexecuted instantiation: ml_dsa_key.c:PACKET_get_net_4_len Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_net_4_len Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_net_4_len Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_net_4_len Unexecuted instantiation: ml_dsa_params.c:PACKET_get_net_4_len Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_net_4_len Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_net_4_len Unexecuted instantiation: slh_dsa.c:PACKET_get_net_4_len Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_net_4_len Unexecuted instantiation: slh_dsa_key.c:PACKET_get_net_4_len Unexecuted instantiation: slh_fors.c:PACKET_get_net_4_len Unexecuted instantiation: slh_hash.c:PACKET_get_net_4_len Unexecuted instantiation: slh_hypertree.c:PACKET_get_net_4_len Unexecuted instantiation: slh_xmss.c:PACKET_get_net_4_len Unexecuted instantiation: der_rsa_sig.c:PACKET_get_net_4_len Unexecuted instantiation: der_sm2_sig.c:PACKET_get_net_4_len Unexecuted instantiation: der_digests_gen.c:PACKET_get_net_4_len Unexecuted instantiation: der_dsa_gen.c:PACKET_get_net_4_len Unexecuted instantiation: der_ec_gen.c:PACKET_get_net_4_len Unexecuted instantiation: der_ecx_gen.c:PACKET_get_net_4_len Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_net_4_len Unexecuted instantiation: der_rsa_gen.c:PACKET_get_net_4_len Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_net_4_len Unexecuted instantiation: slh_wots.c:PACKET_get_net_4_len Unexecuted instantiation: der_sm2_gen.c:PACKET_get_net_4_len Unexecuted instantiation: punycode.c:PACKET_get_net_4_len |
291 | | |
292 | | /** |
293 | | * @brief Get 4 bytes in network order from |pkt| and store the value in |*data| |
294 | | * Similar to PACKET_get_net_4() except the data is uint32_t |
295 | | * |
296 | | * @param pkt Contains a buffer to read from |
297 | | * @param data The object to write the data to. |
298 | | * @returns 1 on success, or 0 otherwise. |
299 | | */ |
300 | | static ossl_unused ossl_inline int PACKET_get_net_4_len_u32(PACKET *pkt, uint32_t *data) |
301 | 0 | { |
302 | 0 | size_t i = 0; |
303 | 0 | int ret = PACKET_get_net_4_len(pkt, &i); |
304 | 0 |
|
305 | 0 | if (ret) |
306 | 0 | *data = (uint32_t)i; |
307 | 0 | return ret; |
308 | 0 | } Unexecuted instantiation: params.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: encode_key2any.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: hkdf.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: x942kdf.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: dsa_sig.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ecdsa_sig.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: eddsa_sig.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: rsa_sig.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: sm2_sig.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_dsa_sig.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_ec_sig.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_ecx_key.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_rsa_key.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_wrap_gen.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: dsa_asn1.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: dsa_sign.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ec_asn1.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: hpke_util.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: asn1_dsa.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_writer.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: packet.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ml_dsa_key.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ml_dsa_params.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: slh_dsa.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: slh_dsa_key.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: slh_fors.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: slh_hash.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: slh_hypertree.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: slh_xmss.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_rsa_sig.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_sm2_sig.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_digests_gen.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_dsa_gen.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_ec_gen.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_ecx_gen.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_rsa_gen.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: slh_wots.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: der_sm2_gen.c:PACKET_get_net_4_len_u32 Unexecuted instantiation: punycode.c:PACKET_get_net_4_len_u32 |
309 | | |
310 | | /* Get 8 bytes in network order from |pkt| and store the value in |*data| */ |
311 | | __owur static ossl_inline int PACKET_get_net_8(PACKET *pkt, uint64_t *data) |
312 | 0 | { |
313 | 0 | if (!PACKET_peek_net_8(pkt, data)) |
314 | 0 | return 0; |
315 | 0 |
|
316 | 0 | packet_forward(pkt, 8); |
317 | 0 |
|
318 | 0 | return 1; |
319 | 0 | } Unexecuted instantiation: params.c:PACKET_get_net_8 Unexecuted instantiation: encode_key2any.c:PACKET_get_net_8 Unexecuted instantiation: hkdf.c:PACKET_get_net_8 Unexecuted instantiation: x942kdf.c:PACKET_get_net_8 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_net_8 Unexecuted instantiation: dsa_sig.c:PACKET_get_net_8 Unexecuted instantiation: ecdsa_sig.c:PACKET_get_net_8 Unexecuted instantiation: eddsa_sig.c:PACKET_get_net_8 Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_net_8 Unexecuted instantiation: rsa_sig.c:PACKET_get_net_8 Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_net_8 Unexecuted instantiation: sm2_sig.c:PACKET_get_net_8 Unexecuted instantiation: der_dsa_sig.c:PACKET_get_net_8 Unexecuted instantiation: der_ec_sig.c:PACKET_get_net_8 Unexecuted instantiation: der_ecx_key.c:PACKET_get_net_8 Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_net_8 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_net_8 Unexecuted instantiation: der_rsa_key.c:PACKET_get_net_8 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_net_8 Unexecuted instantiation: der_wrap_gen.c:PACKET_get_net_8 Unexecuted instantiation: dsa_asn1.c:PACKET_get_net_8 Unexecuted instantiation: dsa_sign.c:PACKET_get_net_8 Unexecuted instantiation: ec_asn1.c:PACKET_get_net_8 Unexecuted instantiation: hpke_util.c:PACKET_get_net_8 Unexecuted instantiation: asn1_dsa.c:PACKET_get_net_8 Unexecuted instantiation: der_writer.c:PACKET_get_net_8 Unexecuted instantiation: packet.c:PACKET_get_net_8 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_net_8 Unexecuted instantiation: ml_dsa_key.c:PACKET_get_net_8 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_net_8 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_net_8 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_net_8 Unexecuted instantiation: ml_dsa_params.c:PACKET_get_net_8 Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_net_8 Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_net_8 Unexecuted instantiation: slh_dsa.c:PACKET_get_net_8 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_net_8 Unexecuted instantiation: slh_dsa_key.c:PACKET_get_net_8 Unexecuted instantiation: slh_fors.c:PACKET_get_net_8 Unexecuted instantiation: slh_hash.c:PACKET_get_net_8 Unexecuted instantiation: slh_hypertree.c:PACKET_get_net_8 Unexecuted instantiation: slh_xmss.c:PACKET_get_net_8 Unexecuted instantiation: der_rsa_sig.c:PACKET_get_net_8 Unexecuted instantiation: der_sm2_sig.c:PACKET_get_net_8 Unexecuted instantiation: der_digests_gen.c:PACKET_get_net_8 Unexecuted instantiation: der_dsa_gen.c:PACKET_get_net_8 Unexecuted instantiation: der_ec_gen.c:PACKET_get_net_8 Unexecuted instantiation: der_ecx_gen.c:PACKET_get_net_8 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_net_8 Unexecuted instantiation: der_rsa_gen.c:PACKET_get_net_8 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_net_8 Unexecuted instantiation: slh_wots.c:PACKET_get_net_8 Unexecuted instantiation: der_sm2_gen.c:PACKET_get_net_8 Unexecuted instantiation: punycode.c:PACKET_get_net_8 |
320 | | |
321 | | /* Peek ahead at 1 byte from |pkt| and store the value in |*data| */ |
322 | | __owur static ossl_inline int PACKET_peek_1(const PACKET *pkt, |
323 | | unsigned int *data) |
324 | 0 | { |
325 | 0 | if (!PACKET_remaining(pkt)) |
326 | 0 | return 0; |
327 | | |
328 | 0 | *data = *pkt->curr; |
329 | |
|
330 | 0 | return 1; |
331 | 0 | } Unexecuted instantiation: params.c:PACKET_peek_1 Unexecuted instantiation: encode_key2any.c:PACKET_peek_1 Unexecuted instantiation: hkdf.c:PACKET_peek_1 Unexecuted instantiation: x942kdf.c:PACKET_peek_1 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_peek_1 Unexecuted instantiation: dsa_sig.c:PACKET_peek_1 Unexecuted instantiation: ecdsa_sig.c:PACKET_peek_1 Unexecuted instantiation: eddsa_sig.c:PACKET_peek_1 Unexecuted instantiation: ml_dsa_sig.c:PACKET_peek_1 Unexecuted instantiation: rsa_sig.c:PACKET_peek_1 Unexecuted instantiation: slh_dsa_sig.c:PACKET_peek_1 Unexecuted instantiation: sm2_sig.c:PACKET_peek_1 Unexecuted instantiation: der_dsa_sig.c:PACKET_peek_1 Unexecuted instantiation: der_ec_sig.c:PACKET_peek_1 Unexecuted instantiation: der_ecx_key.c:PACKET_peek_1 Unexecuted instantiation: der_hkdf_gen.c:PACKET_peek_1 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_peek_1 Unexecuted instantiation: der_rsa_key.c:PACKET_peek_1 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_peek_1 Unexecuted instantiation: der_wrap_gen.c:PACKET_peek_1 Unexecuted instantiation: dsa_asn1.c:PACKET_peek_1 Unexecuted instantiation: dsa_sign.c:PACKET_peek_1 Unexecuted instantiation: ec_asn1.c:PACKET_peek_1 Unexecuted instantiation: hpke_util.c:PACKET_peek_1 Unexecuted instantiation: asn1_dsa.c:PACKET_peek_1 Unexecuted instantiation: der_writer.c:PACKET_peek_1 Unexecuted instantiation: packet.c:PACKET_peek_1 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_peek_1 Unexecuted instantiation: ml_dsa_key.c:PACKET_peek_1 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_peek_1 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_peek_1 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_peek_1 Unexecuted instantiation: ml_dsa_params.c:PACKET_peek_1 Unexecuted instantiation: ml_dsa_sample.c:PACKET_peek_1 Unexecuted instantiation: ml_dsa_sign.c:PACKET_peek_1 Unexecuted instantiation: slh_dsa.c:PACKET_peek_1 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_peek_1 Unexecuted instantiation: slh_dsa_key.c:PACKET_peek_1 Unexecuted instantiation: slh_fors.c:PACKET_peek_1 Unexecuted instantiation: slh_hash.c:PACKET_peek_1 Unexecuted instantiation: slh_hypertree.c:PACKET_peek_1 Unexecuted instantiation: slh_xmss.c:PACKET_peek_1 Unexecuted instantiation: der_rsa_sig.c:PACKET_peek_1 Unexecuted instantiation: der_sm2_sig.c:PACKET_peek_1 Unexecuted instantiation: der_digests_gen.c:PACKET_peek_1 Unexecuted instantiation: der_dsa_gen.c:PACKET_peek_1 Unexecuted instantiation: der_ec_gen.c:PACKET_peek_1 Unexecuted instantiation: der_ecx_gen.c:PACKET_peek_1 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_peek_1 Unexecuted instantiation: der_rsa_gen.c:PACKET_peek_1 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_peek_1 Unexecuted instantiation: slh_wots.c:PACKET_peek_1 Unexecuted instantiation: der_sm2_gen.c:PACKET_peek_1 Unexecuted instantiation: punycode.c:PACKET_peek_1 |
332 | | |
333 | | /* Get 1 byte from |pkt| and store the value in |*data| */ |
334 | | __owur static ossl_inline int PACKET_get_1(PACKET *pkt, unsigned int *data) |
335 | 0 | { |
336 | 0 | if (!PACKET_peek_1(pkt, data)) |
337 | 0 | return 0; |
338 | | |
339 | 0 | packet_forward(pkt, 1); |
340 | |
|
341 | 0 | return 1; |
342 | 0 | } Unexecuted instantiation: params.c:PACKET_get_1 Unexecuted instantiation: encode_key2any.c:PACKET_get_1 Unexecuted instantiation: hkdf.c:PACKET_get_1 Unexecuted instantiation: x942kdf.c:PACKET_get_1 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_1 Unexecuted instantiation: dsa_sig.c:PACKET_get_1 Unexecuted instantiation: ecdsa_sig.c:PACKET_get_1 Unexecuted instantiation: eddsa_sig.c:PACKET_get_1 Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_1 Unexecuted instantiation: rsa_sig.c:PACKET_get_1 Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_1 Unexecuted instantiation: sm2_sig.c:PACKET_get_1 Unexecuted instantiation: der_dsa_sig.c:PACKET_get_1 Unexecuted instantiation: der_ec_sig.c:PACKET_get_1 Unexecuted instantiation: der_ecx_key.c:PACKET_get_1 Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_1 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_1 Unexecuted instantiation: der_rsa_key.c:PACKET_get_1 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_1 Unexecuted instantiation: der_wrap_gen.c:PACKET_get_1 Unexecuted instantiation: dsa_asn1.c:PACKET_get_1 Unexecuted instantiation: dsa_sign.c:PACKET_get_1 Unexecuted instantiation: ec_asn1.c:PACKET_get_1 Unexecuted instantiation: hpke_util.c:PACKET_get_1 Unexecuted instantiation: asn1_dsa.c:PACKET_get_1 Unexecuted instantiation: der_writer.c:PACKET_get_1 Unexecuted instantiation: packet.c:PACKET_get_1 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_1 Unexecuted instantiation: ml_dsa_key.c:PACKET_get_1 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_1 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_1 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_1 Unexecuted instantiation: ml_dsa_params.c:PACKET_get_1 Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_1 Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_1 Unexecuted instantiation: slh_dsa.c:PACKET_get_1 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_1 Unexecuted instantiation: slh_dsa_key.c:PACKET_get_1 Unexecuted instantiation: slh_fors.c:PACKET_get_1 Unexecuted instantiation: slh_hash.c:PACKET_get_1 Unexecuted instantiation: slh_hypertree.c:PACKET_get_1 Unexecuted instantiation: slh_xmss.c:PACKET_get_1 Unexecuted instantiation: der_rsa_sig.c:PACKET_get_1 Unexecuted instantiation: der_sm2_sig.c:PACKET_get_1 Unexecuted instantiation: der_digests_gen.c:PACKET_get_1 Unexecuted instantiation: der_dsa_gen.c:PACKET_get_1 Unexecuted instantiation: der_ec_gen.c:PACKET_get_1 Unexecuted instantiation: der_ecx_gen.c:PACKET_get_1 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_1 Unexecuted instantiation: der_rsa_gen.c:PACKET_get_1 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_1 Unexecuted instantiation: slh_wots.c:PACKET_get_1 Unexecuted instantiation: der_sm2_gen.c:PACKET_get_1 Unexecuted instantiation: punycode.c:PACKET_get_1 |
343 | | |
344 | | /* Same as PACKET_get_1() but for a size_t */ |
345 | | __owur static ossl_inline int PACKET_get_1_len(PACKET *pkt, size_t *data) |
346 | 0 | { |
347 | 0 | unsigned int i; |
348 | 0 | int ret = PACKET_get_1(pkt, &i); |
349 | 0 |
|
350 | 0 | if (ret) |
351 | 0 | *data = (size_t)i; |
352 | 0 |
|
353 | 0 | return ret; |
354 | 0 | } Unexecuted instantiation: params.c:PACKET_get_1_len Unexecuted instantiation: encode_key2any.c:PACKET_get_1_len Unexecuted instantiation: hkdf.c:PACKET_get_1_len Unexecuted instantiation: x942kdf.c:PACKET_get_1_len Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_1_len Unexecuted instantiation: dsa_sig.c:PACKET_get_1_len Unexecuted instantiation: ecdsa_sig.c:PACKET_get_1_len Unexecuted instantiation: eddsa_sig.c:PACKET_get_1_len Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_1_len Unexecuted instantiation: rsa_sig.c:PACKET_get_1_len Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_1_len Unexecuted instantiation: sm2_sig.c:PACKET_get_1_len Unexecuted instantiation: der_dsa_sig.c:PACKET_get_1_len Unexecuted instantiation: der_ec_sig.c:PACKET_get_1_len Unexecuted instantiation: der_ecx_key.c:PACKET_get_1_len Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_1_len Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_1_len Unexecuted instantiation: der_rsa_key.c:PACKET_get_1_len Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_1_len Unexecuted instantiation: der_wrap_gen.c:PACKET_get_1_len Unexecuted instantiation: dsa_asn1.c:PACKET_get_1_len Unexecuted instantiation: dsa_sign.c:PACKET_get_1_len Unexecuted instantiation: ec_asn1.c:PACKET_get_1_len Unexecuted instantiation: hpke_util.c:PACKET_get_1_len Unexecuted instantiation: asn1_dsa.c:PACKET_get_1_len Unexecuted instantiation: der_writer.c:PACKET_get_1_len Unexecuted instantiation: packet.c:PACKET_get_1_len Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_1_len Unexecuted instantiation: ml_dsa_key.c:PACKET_get_1_len Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_1_len Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_1_len Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_1_len Unexecuted instantiation: ml_dsa_params.c:PACKET_get_1_len Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_1_len Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_1_len Unexecuted instantiation: slh_dsa.c:PACKET_get_1_len Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_1_len Unexecuted instantiation: slh_dsa_key.c:PACKET_get_1_len Unexecuted instantiation: slh_fors.c:PACKET_get_1_len Unexecuted instantiation: slh_hash.c:PACKET_get_1_len Unexecuted instantiation: slh_hypertree.c:PACKET_get_1_len Unexecuted instantiation: slh_xmss.c:PACKET_get_1_len Unexecuted instantiation: der_rsa_sig.c:PACKET_get_1_len Unexecuted instantiation: der_sm2_sig.c:PACKET_get_1_len Unexecuted instantiation: der_digests_gen.c:PACKET_get_1_len Unexecuted instantiation: der_dsa_gen.c:PACKET_get_1_len Unexecuted instantiation: der_ec_gen.c:PACKET_get_1_len Unexecuted instantiation: der_ecx_gen.c:PACKET_get_1_len Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_1_len Unexecuted instantiation: der_rsa_gen.c:PACKET_get_1_len Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_1_len Unexecuted instantiation: slh_wots.c:PACKET_get_1_len Unexecuted instantiation: der_sm2_gen.c:PACKET_get_1_len Unexecuted instantiation: punycode.c:PACKET_get_1_len |
355 | | |
356 | | /* |
357 | | * Peek ahead at 4 bytes in reverse network order from |pkt| and store the value |
358 | | * in |*data| |
359 | | */ |
360 | | __owur static ossl_inline int PACKET_peek_4(const PACKET *pkt, |
361 | | unsigned long *data) |
362 | 0 | { |
363 | 0 | if (PACKET_remaining(pkt) < 4) |
364 | 0 | return 0; |
365 | 0 |
|
366 | 0 | *data = *pkt->curr; |
367 | 0 | *data |= ((unsigned long)(*(pkt->curr + 1))) << 8; |
368 | 0 | *data |= ((unsigned long)(*(pkt->curr + 2))) << 16; |
369 | 0 | *data |= ((unsigned long)(*(pkt->curr + 3))) << 24; |
370 | 0 |
|
371 | 0 | return 1; |
372 | 0 | } Unexecuted instantiation: params.c:PACKET_peek_4 Unexecuted instantiation: encode_key2any.c:PACKET_peek_4 Unexecuted instantiation: hkdf.c:PACKET_peek_4 Unexecuted instantiation: x942kdf.c:PACKET_peek_4 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_peek_4 Unexecuted instantiation: dsa_sig.c:PACKET_peek_4 Unexecuted instantiation: ecdsa_sig.c:PACKET_peek_4 Unexecuted instantiation: eddsa_sig.c:PACKET_peek_4 Unexecuted instantiation: ml_dsa_sig.c:PACKET_peek_4 Unexecuted instantiation: rsa_sig.c:PACKET_peek_4 Unexecuted instantiation: slh_dsa_sig.c:PACKET_peek_4 Unexecuted instantiation: sm2_sig.c:PACKET_peek_4 Unexecuted instantiation: der_dsa_sig.c:PACKET_peek_4 Unexecuted instantiation: der_ec_sig.c:PACKET_peek_4 Unexecuted instantiation: der_ecx_key.c:PACKET_peek_4 Unexecuted instantiation: der_hkdf_gen.c:PACKET_peek_4 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_peek_4 Unexecuted instantiation: der_rsa_key.c:PACKET_peek_4 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_peek_4 Unexecuted instantiation: der_wrap_gen.c:PACKET_peek_4 Unexecuted instantiation: dsa_asn1.c:PACKET_peek_4 Unexecuted instantiation: dsa_sign.c:PACKET_peek_4 Unexecuted instantiation: ec_asn1.c:PACKET_peek_4 Unexecuted instantiation: hpke_util.c:PACKET_peek_4 Unexecuted instantiation: asn1_dsa.c:PACKET_peek_4 Unexecuted instantiation: der_writer.c:PACKET_peek_4 Unexecuted instantiation: packet.c:PACKET_peek_4 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_peek_4 Unexecuted instantiation: ml_dsa_key.c:PACKET_peek_4 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_peek_4 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_peek_4 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_peek_4 Unexecuted instantiation: ml_dsa_params.c:PACKET_peek_4 Unexecuted instantiation: ml_dsa_sample.c:PACKET_peek_4 Unexecuted instantiation: ml_dsa_sign.c:PACKET_peek_4 Unexecuted instantiation: slh_dsa.c:PACKET_peek_4 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_peek_4 Unexecuted instantiation: slh_dsa_key.c:PACKET_peek_4 Unexecuted instantiation: slh_fors.c:PACKET_peek_4 Unexecuted instantiation: slh_hash.c:PACKET_peek_4 Unexecuted instantiation: slh_hypertree.c:PACKET_peek_4 Unexecuted instantiation: slh_xmss.c:PACKET_peek_4 Unexecuted instantiation: der_rsa_sig.c:PACKET_peek_4 Unexecuted instantiation: der_sm2_sig.c:PACKET_peek_4 Unexecuted instantiation: der_digests_gen.c:PACKET_peek_4 Unexecuted instantiation: der_dsa_gen.c:PACKET_peek_4 Unexecuted instantiation: der_ec_gen.c:PACKET_peek_4 Unexecuted instantiation: der_ecx_gen.c:PACKET_peek_4 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_peek_4 Unexecuted instantiation: der_rsa_gen.c:PACKET_peek_4 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_peek_4 Unexecuted instantiation: slh_wots.c:PACKET_peek_4 Unexecuted instantiation: der_sm2_gen.c:PACKET_peek_4 Unexecuted instantiation: punycode.c:PACKET_peek_4 |
373 | | |
374 | | /* Equivalent of c2l */ |
375 | | /* |
376 | | * Get 4 bytes in reverse network order from |pkt| and store the value in |
377 | | * |*data| |
378 | | */ |
379 | | __owur static ossl_inline int PACKET_get_4(PACKET *pkt, unsigned long *data) |
380 | 0 | { |
381 | 0 | if (!PACKET_peek_4(pkt, data)) |
382 | 0 | return 0; |
383 | 0 |
|
384 | 0 | packet_forward(pkt, 4); |
385 | 0 |
|
386 | 0 | return 1; |
387 | 0 | } Unexecuted instantiation: params.c:PACKET_get_4 Unexecuted instantiation: encode_key2any.c:PACKET_get_4 Unexecuted instantiation: hkdf.c:PACKET_get_4 Unexecuted instantiation: x942kdf.c:PACKET_get_4 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_4 Unexecuted instantiation: dsa_sig.c:PACKET_get_4 Unexecuted instantiation: ecdsa_sig.c:PACKET_get_4 Unexecuted instantiation: eddsa_sig.c:PACKET_get_4 Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_4 Unexecuted instantiation: rsa_sig.c:PACKET_get_4 Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_4 Unexecuted instantiation: sm2_sig.c:PACKET_get_4 Unexecuted instantiation: der_dsa_sig.c:PACKET_get_4 Unexecuted instantiation: der_ec_sig.c:PACKET_get_4 Unexecuted instantiation: der_ecx_key.c:PACKET_get_4 Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_4 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_4 Unexecuted instantiation: der_rsa_key.c:PACKET_get_4 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_4 Unexecuted instantiation: der_wrap_gen.c:PACKET_get_4 Unexecuted instantiation: dsa_asn1.c:PACKET_get_4 Unexecuted instantiation: dsa_sign.c:PACKET_get_4 Unexecuted instantiation: ec_asn1.c:PACKET_get_4 Unexecuted instantiation: hpke_util.c:PACKET_get_4 Unexecuted instantiation: asn1_dsa.c:PACKET_get_4 Unexecuted instantiation: der_writer.c:PACKET_get_4 Unexecuted instantiation: packet.c:PACKET_get_4 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_4 Unexecuted instantiation: ml_dsa_key.c:PACKET_get_4 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_4 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_4 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_4 Unexecuted instantiation: ml_dsa_params.c:PACKET_get_4 Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_4 Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_4 Unexecuted instantiation: slh_dsa.c:PACKET_get_4 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_4 Unexecuted instantiation: slh_dsa_key.c:PACKET_get_4 Unexecuted instantiation: slh_fors.c:PACKET_get_4 Unexecuted instantiation: slh_hash.c:PACKET_get_4 Unexecuted instantiation: slh_hypertree.c:PACKET_get_4 Unexecuted instantiation: slh_xmss.c:PACKET_get_4 Unexecuted instantiation: der_rsa_sig.c:PACKET_get_4 Unexecuted instantiation: der_sm2_sig.c:PACKET_get_4 Unexecuted instantiation: der_digests_gen.c:PACKET_get_4 Unexecuted instantiation: der_dsa_gen.c:PACKET_get_4 Unexecuted instantiation: der_ec_gen.c:PACKET_get_4 Unexecuted instantiation: der_ecx_gen.c:PACKET_get_4 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_4 Unexecuted instantiation: der_rsa_gen.c:PACKET_get_4 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_4 Unexecuted instantiation: slh_wots.c:PACKET_get_4 Unexecuted instantiation: der_sm2_gen.c:PACKET_get_4 Unexecuted instantiation: punycode.c:PACKET_get_4 |
388 | | |
389 | | /* |
390 | | * Peek ahead at |len| bytes from the |pkt| and store a pointer to them in |
391 | | * |*data|. This just points at the underlying buffer that |pkt| is using. The |
392 | | * caller should not free this data directly (it will be freed when the |
393 | | * underlying buffer gets freed |
394 | | */ |
395 | | __owur static ossl_inline int PACKET_peek_bytes(const PACKET *pkt, |
396 | | const unsigned char **data, |
397 | | size_t len) |
398 | 0 | { |
399 | 0 | if (PACKET_remaining(pkt) < len) |
400 | 0 | return 0; |
401 | | |
402 | 0 | *data = pkt->curr; |
403 | |
|
404 | 0 | return 1; |
405 | 0 | } Unexecuted instantiation: params.c:PACKET_peek_bytes Unexecuted instantiation: encode_key2any.c:PACKET_peek_bytes Unexecuted instantiation: hkdf.c:PACKET_peek_bytes Unexecuted instantiation: x942kdf.c:PACKET_peek_bytes Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_peek_bytes Unexecuted instantiation: dsa_sig.c:PACKET_peek_bytes Unexecuted instantiation: ecdsa_sig.c:PACKET_peek_bytes Unexecuted instantiation: eddsa_sig.c:PACKET_peek_bytes Unexecuted instantiation: ml_dsa_sig.c:PACKET_peek_bytes Unexecuted instantiation: rsa_sig.c:PACKET_peek_bytes Unexecuted instantiation: slh_dsa_sig.c:PACKET_peek_bytes Unexecuted instantiation: sm2_sig.c:PACKET_peek_bytes Unexecuted instantiation: der_dsa_sig.c:PACKET_peek_bytes Unexecuted instantiation: der_ec_sig.c:PACKET_peek_bytes Unexecuted instantiation: der_ecx_key.c:PACKET_peek_bytes Unexecuted instantiation: der_hkdf_gen.c:PACKET_peek_bytes Unexecuted instantiation: der_ml_dsa_key.c:PACKET_peek_bytes Unexecuted instantiation: der_rsa_key.c:PACKET_peek_bytes Unexecuted instantiation: der_slh_dsa_key.c:PACKET_peek_bytes Unexecuted instantiation: der_wrap_gen.c:PACKET_peek_bytes Unexecuted instantiation: dsa_asn1.c:PACKET_peek_bytes Unexecuted instantiation: dsa_sign.c:PACKET_peek_bytes Unexecuted instantiation: ec_asn1.c:PACKET_peek_bytes Unexecuted instantiation: hpke_util.c:PACKET_peek_bytes Unexecuted instantiation: asn1_dsa.c:PACKET_peek_bytes Unexecuted instantiation: der_writer.c:PACKET_peek_bytes Unexecuted instantiation: packet.c:PACKET_peek_bytes Unexecuted instantiation: ml_dsa_encoders.c:PACKET_peek_bytes Unexecuted instantiation: ml_dsa_key.c:PACKET_peek_bytes Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_peek_bytes Unexecuted instantiation: ml_dsa_matrix.c:PACKET_peek_bytes Unexecuted instantiation: ml_dsa_ntt.c:PACKET_peek_bytes Unexecuted instantiation: ml_dsa_params.c:PACKET_peek_bytes Unexecuted instantiation: ml_dsa_sample.c:PACKET_peek_bytes Unexecuted instantiation: ml_dsa_sign.c:PACKET_peek_bytes Unexecuted instantiation: slh_dsa.c:PACKET_peek_bytes Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_peek_bytes Unexecuted instantiation: slh_dsa_key.c:PACKET_peek_bytes Unexecuted instantiation: slh_fors.c:PACKET_peek_bytes Unexecuted instantiation: slh_hash.c:PACKET_peek_bytes Unexecuted instantiation: slh_hypertree.c:PACKET_peek_bytes Unexecuted instantiation: slh_xmss.c:PACKET_peek_bytes Unexecuted instantiation: der_rsa_sig.c:PACKET_peek_bytes Unexecuted instantiation: der_sm2_sig.c:PACKET_peek_bytes Unexecuted instantiation: der_digests_gen.c:PACKET_peek_bytes Unexecuted instantiation: der_dsa_gen.c:PACKET_peek_bytes Unexecuted instantiation: der_ec_gen.c:PACKET_peek_bytes Unexecuted instantiation: der_ecx_gen.c:PACKET_peek_bytes Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_peek_bytes Unexecuted instantiation: der_rsa_gen.c:PACKET_peek_bytes Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_peek_bytes Unexecuted instantiation: slh_wots.c:PACKET_peek_bytes Unexecuted instantiation: der_sm2_gen.c:PACKET_peek_bytes Unexecuted instantiation: punycode.c:PACKET_peek_bytes |
406 | | |
407 | | /* |
408 | | * Read |len| bytes from the |pkt| and store a pointer to them in |*data|. This |
409 | | * just points at the underlying buffer that |pkt| is using. The caller should |
410 | | * not free this data directly (it will be freed when the underlying buffer gets |
411 | | * freed |
412 | | */ |
413 | | __owur static ossl_inline int PACKET_get_bytes(PACKET *pkt, |
414 | | const unsigned char **data, |
415 | | size_t len) |
416 | 0 | { |
417 | 0 | if (!PACKET_peek_bytes(pkt, data, len)) |
418 | 0 | return 0; |
419 | | |
420 | 0 | packet_forward(pkt, len); |
421 | |
|
422 | 0 | return 1; |
423 | 0 | } Unexecuted instantiation: params.c:PACKET_get_bytes Unexecuted instantiation: encode_key2any.c:PACKET_get_bytes Unexecuted instantiation: hkdf.c:PACKET_get_bytes Unexecuted instantiation: x942kdf.c:PACKET_get_bytes Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_bytes Unexecuted instantiation: dsa_sig.c:PACKET_get_bytes Unexecuted instantiation: ecdsa_sig.c:PACKET_get_bytes Unexecuted instantiation: eddsa_sig.c:PACKET_get_bytes Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_bytes Unexecuted instantiation: rsa_sig.c:PACKET_get_bytes Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_bytes Unexecuted instantiation: sm2_sig.c:PACKET_get_bytes Unexecuted instantiation: der_dsa_sig.c:PACKET_get_bytes Unexecuted instantiation: der_ec_sig.c:PACKET_get_bytes Unexecuted instantiation: der_ecx_key.c:PACKET_get_bytes Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_bytes Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_bytes Unexecuted instantiation: der_rsa_key.c:PACKET_get_bytes Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_bytes Unexecuted instantiation: der_wrap_gen.c:PACKET_get_bytes Unexecuted instantiation: dsa_asn1.c:PACKET_get_bytes Unexecuted instantiation: dsa_sign.c:PACKET_get_bytes Unexecuted instantiation: ec_asn1.c:PACKET_get_bytes Unexecuted instantiation: hpke_util.c:PACKET_get_bytes Unexecuted instantiation: asn1_dsa.c:PACKET_get_bytes Unexecuted instantiation: der_writer.c:PACKET_get_bytes Unexecuted instantiation: packet.c:PACKET_get_bytes Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_bytes Unexecuted instantiation: ml_dsa_key.c:PACKET_get_bytes Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_bytes Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_bytes Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_bytes Unexecuted instantiation: ml_dsa_params.c:PACKET_get_bytes Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_bytes Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_bytes Unexecuted instantiation: slh_dsa.c:PACKET_get_bytes Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_bytes Unexecuted instantiation: slh_dsa_key.c:PACKET_get_bytes Unexecuted instantiation: slh_fors.c:PACKET_get_bytes Unexecuted instantiation: slh_hash.c:PACKET_get_bytes Unexecuted instantiation: slh_hypertree.c:PACKET_get_bytes Unexecuted instantiation: slh_xmss.c:PACKET_get_bytes Unexecuted instantiation: der_rsa_sig.c:PACKET_get_bytes Unexecuted instantiation: der_sm2_sig.c:PACKET_get_bytes Unexecuted instantiation: der_digests_gen.c:PACKET_get_bytes Unexecuted instantiation: der_dsa_gen.c:PACKET_get_bytes Unexecuted instantiation: der_ec_gen.c:PACKET_get_bytes Unexecuted instantiation: der_ecx_gen.c:PACKET_get_bytes Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_bytes Unexecuted instantiation: der_rsa_gen.c:PACKET_get_bytes Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_bytes Unexecuted instantiation: slh_wots.c:PACKET_get_bytes Unexecuted instantiation: der_sm2_gen.c:PACKET_get_bytes Unexecuted instantiation: punycode.c:PACKET_get_bytes |
424 | | |
425 | | /* Peek ahead at |len| bytes from |pkt| and copy them to |data| */ |
426 | | __owur static ossl_inline int PACKET_peek_copy_bytes(const PACKET *pkt, |
427 | | unsigned char *data, |
428 | | size_t len) |
429 | 0 | { |
430 | 0 | if (PACKET_remaining(pkt) < len) |
431 | 0 | return 0; |
432 | | |
433 | 0 | memcpy(data, pkt->curr, len); |
434 | |
|
435 | 0 | return 1; |
436 | 0 | } Unexecuted instantiation: params.c:PACKET_peek_copy_bytes Unexecuted instantiation: encode_key2any.c:PACKET_peek_copy_bytes Unexecuted instantiation: hkdf.c:PACKET_peek_copy_bytes Unexecuted instantiation: x942kdf.c:PACKET_peek_copy_bytes Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_peek_copy_bytes Unexecuted instantiation: dsa_sig.c:PACKET_peek_copy_bytes Unexecuted instantiation: ecdsa_sig.c:PACKET_peek_copy_bytes Unexecuted instantiation: eddsa_sig.c:PACKET_peek_copy_bytes Unexecuted instantiation: ml_dsa_sig.c:PACKET_peek_copy_bytes Unexecuted instantiation: rsa_sig.c:PACKET_peek_copy_bytes Unexecuted instantiation: slh_dsa_sig.c:PACKET_peek_copy_bytes Unexecuted instantiation: sm2_sig.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_dsa_sig.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_ec_sig.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_ecx_key.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_hkdf_gen.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_ml_dsa_key.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_rsa_key.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_slh_dsa_key.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_wrap_gen.c:PACKET_peek_copy_bytes Unexecuted instantiation: dsa_asn1.c:PACKET_peek_copy_bytes Unexecuted instantiation: dsa_sign.c:PACKET_peek_copy_bytes Unexecuted instantiation: ec_asn1.c:PACKET_peek_copy_bytes Unexecuted instantiation: hpke_util.c:PACKET_peek_copy_bytes Unexecuted instantiation: asn1_dsa.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_writer.c:PACKET_peek_copy_bytes Unexecuted instantiation: packet.c:PACKET_peek_copy_bytes Unexecuted instantiation: ml_dsa_encoders.c:PACKET_peek_copy_bytes Unexecuted instantiation: ml_dsa_key.c:PACKET_peek_copy_bytes Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_peek_copy_bytes Unexecuted instantiation: ml_dsa_matrix.c:PACKET_peek_copy_bytes Unexecuted instantiation: ml_dsa_ntt.c:PACKET_peek_copy_bytes Unexecuted instantiation: ml_dsa_params.c:PACKET_peek_copy_bytes Unexecuted instantiation: ml_dsa_sample.c:PACKET_peek_copy_bytes Unexecuted instantiation: ml_dsa_sign.c:PACKET_peek_copy_bytes Unexecuted instantiation: slh_dsa.c:PACKET_peek_copy_bytes Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_peek_copy_bytes Unexecuted instantiation: slh_dsa_key.c:PACKET_peek_copy_bytes Unexecuted instantiation: slh_fors.c:PACKET_peek_copy_bytes Unexecuted instantiation: slh_hash.c:PACKET_peek_copy_bytes Unexecuted instantiation: slh_hypertree.c:PACKET_peek_copy_bytes Unexecuted instantiation: slh_xmss.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_rsa_sig.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_sm2_sig.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_digests_gen.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_dsa_gen.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_ec_gen.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_ecx_gen.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_rsa_gen.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_peek_copy_bytes Unexecuted instantiation: slh_wots.c:PACKET_peek_copy_bytes Unexecuted instantiation: der_sm2_gen.c:PACKET_peek_copy_bytes Unexecuted instantiation: punycode.c:PACKET_peek_copy_bytes |
437 | | |
438 | | /* |
439 | | * Read |len| bytes from |pkt| and copy them to |data|. |
440 | | * The caller is responsible for ensuring that |data| can hold |len| bytes. |
441 | | */ |
442 | | __owur static ossl_inline int PACKET_copy_bytes(PACKET *pkt, |
443 | | unsigned char *data, size_t len) |
444 | 0 | { |
445 | 0 | if (!PACKET_peek_copy_bytes(pkt, data, len)) |
446 | 0 | return 0; |
447 | | |
448 | 0 | packet_forward(pkt, len); |
449 | |
|
450 | 0 | return 1; |
451 | 0 | } Unexecuted instantiation: params.c:PACKET_copy_bytes Unexecuted instantiation: encode_key2any.c:PACKET_copy_bytes Unexecuted instantiation: hkdf.c:PACKET_copy_bytes Unexecuted instantiation: x942kdf.c:PACKET_copy_bytes Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_copy_bytes Unexecuted instantiation: dsa_sig.c:PACKET_copy_bytes Unexecuted instantiation: ecdsa_sig.c:PACKET_copy_bytes Unexecuted instantiation: eddsa_sig.c:PACKET_copy_bytes Unexecuted instantiation: ml_dsa_sig.c:PACKET_copy_bytes Unexecuted instantiation: rsa_sig.c:PACKET_copy_bytes Unexecuted instantiation: slh_dsa_sig.c:PACKET_copy_bytes Unexecuted instantiation: sm2_sig.c:PACKET_copy_bytes Unexecuted instantiation: der_dsa_sig.c:PACKET_copy_bytes Unexecuted instantiation: der_ec_sig.c:PACKET_copy_bytes Unexecuted instantiation: der_ecx_key.c:PACKET_copy_bytes Unexecuted instantiation: der_hkdf_gen.c:PACKET_copy_bytes Unexecuted instantiation: der_ml_dsa_key.c:PACKET_copy_bytes Unexecuted instantiation: der_rsa_key.c:PACKET_copy_bytes Unexecuted instantiation: der_slh_dsa_key.c:PACKET_copy_bytes Unexecuted instantiation: der_wrap_gen.c:PACKET_copy_bytes Unexecuted instantiation: dsa_asn1.c:PACKET_copy_bytes Unexecuted instantiation: dsa_sign.c:PACKET_copy_bytes Unexecuted instantiation: ec_asn1.c:PACKET_copy_bytes Unexecuted instantiation: hpke_util.c:PACKET_copy_bytes Unexecuted instantiation: asn1_dsa.c:PACKET_copy_bytes Unexecuted instantiation: der_writer.c:PACKET_copy_bytes Unexecuted instantiation: packet.c:PACKET_copy_bytes Unexecuted instantiation: ml_dsa_encoders.c:PACKET_copy_bytes Unexecuted instantiation: ml_dsa_key.c:PACKET_copy_bytes Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_copy_bytes Unexecuted instantiation: ml_dsa_matrix.c:PACKET_copy_bytes Unexecuted instantiation: ml_dsa_ntt.c:PACKET_copy_bytes Unexecuted instantiation: ml_dsa_params.c:PACKET_copy_bytes Unexecuted instantiation: ml_dsa_sample.c:PACKET_copy_bytes Unexecuted instantiation: ml_dsa_sign.c:PACKET_copy_bytes Unexecuted instantiation: slh_dsa.c:PACKET_copy_bytes Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_copy_bytes Unexecuted instantiation: slh_dsa_key.c:PACKET_copy_bytes Unexecuted instantiation: slh_fors.c:PACKET_copy_bytes Unexecuted instantiation: slh_hash.c:PACKET_copy_bytes Unexecuted instantiation: slh_hypertree.c:PACKET_copy_bytes Unexecuted instantiation: slh_xmss.c:PACKET_copy_bytes Unexecuted instantiation: der_rsa_sig.c:PACKET_copy_bytes Unexecuted instantiation: der_sm2_sig.c:PACKET_copy_bytes Unexecuted instantiation: der_digests_gen.c:PACKET_copy_bytes Unexecuted instantiation: der_dsa_gen.c:PACKET_copy_bytes Unexecuted instantiation: der_ec_gen.c:PACKET_copy_bytes Unexecuted instantiation: der_ecx_gen.c:PACKET_copy_bytes Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_copy_bytes Unexecuted instantiation: der_rsa_gen.c:PACKET_copy_bytes Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_copy_bytes Unexecuted instantiation: slh_wots.c:PACKET_copy_bytes Unexecuted instantiation: der_sm2_gen.c:PACKET_copy_bytes Unexecuted instantiation: punycode.c:PACKET_copy_bytes |
452 | | |
453 | | /* |
454 | | * Copy packet data to |dest|, and set |len| to the number of copied bytes. |
455 | | * If the packet has more than |dest_len| bytes, nothing is copied. |
456 | | * Returns 1 if the packet data fits in |dest_len| bytes, 0 otherwise. |
457 | | * Does not forward PACKET position (because it is typically the last thing |
458 | | * done with a given PACKET). |
459 | | */ |
460 | | __owur static ossl_inline int PACKET_copy_all(const PACKET *pkt, |
461 | | unsigned char *dest, |
462 | | size_t dest_len, size_t *len) |
463 | 0 | { |
464 | 0 | if (PACKET_remaining(pkt) > dest_len) { |
465 | 0 | *len = 0; |
466 | 0 | return 0; |
467 | 0 | } |
468 | 0 | *len = pkt->remaining; |
469 | 0 | memcpy(dest, pkt->curr, pkt->remaining); |
470 | 0 | return 1; |
471 | 0 | } Unexecuted instantiation: params.c:PACKET_copy_all Unexecuted instantiation: encode_key2any.c:PACKET_copy_all Unexecuted instantiation: hkdf.c:PACKET_copy_all Unexecuted instantiation: x942kdf.c:PACKET_copy_all Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_copy_all Unexecuted instantiation: dsa_sig.c:PACKET_copy_all Unexecuted instantiation: ecdsa_sig.c:PACKET_copy_all Unexecuted instantiation: eddsa_sig.c:PACKET_copy_all Unexecuted instantiation: ml_dsa_sig.c:PACKET_copy_all Unexecuted instantiation: rsa_sig.c:PACKET_copy_all Unexecuted instantiation: slh_dsa_sig.c:PACKET_copy_all Unexecuted instantiation: sm2_sig.c:PACKET_copy_all Unexecuted instantiation: der_dsa_sig.c:PACKET_copy_all Unexecuted instantiation: der_ec_sig.c:PACKET_copy_all Unexecuted instantiation: der_ecx_key.c:PACKET_copy_all Unexecuted instantiation: der_hkdf_gen.c:PACKET_copy_all Unexecuted instantiation: der_ml_dsa_key.c:PACKET_copy_all Unexecuted instantiation: der_rsa_key.c:PACKET_copy_all Unexecuted instantiation: der_slh_dsa_key.c:PACKET_copy_all Unexecuted instantiation: der_wrap_gen.c:PACKET_copy_all Unexecuted instantiation: dsa_asn1.c:PACKET_copy_all Unexecuted instantiation: dsa_sign.c:PACKET_copy_all Unexecuted instantiation: ec_asn1.c:PACKET_copy_all Unexecuted instantiation: hpke_util.c:PACKET_copy_all Unexecuted instantiation: asn1_dsa.c:PACKET_copy_all Unexecuted instantiation: der_writer.c:PACKET_copy_all Unexecuted instantiation: packet.c:PACKET_copy_all Unexecuted instantiation: ml_dsa_encoders.c:PACKET_copy_all Unexecuted instantiation: ml_dsa_key.c:PACKET_copy_all Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_copy_all Unexecuted instantiation: ml_dsa_matrix.c:PACKET_copy_all Unexecuted instantiation: ml_dsa_ntt.c:PACKET_copy_all Unexecuted instantiation: ml_dsa_params.c:PACKET_copy_all Unexecuted instantiation: ml_dsa_sample.c:PACKET_copy_all Unexecuted instantiation: ml_dsa_sign.c:PACKET_copy_all Unexecuted instantiation: slh_dsa.c:PACKET_copy_all Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_copy_all Unexecuted instantiation: slh_dsa_key.c:PACKET_copy_all Unexecuted instantiation: slh_fors.c:PACKET_copy_all Unexecuted instantiation: slh_hash.c:PACKET_copy_all Unexecuted instantiation: slh_hypertree.c:PACKET_copy_all Unexecuted instantiation: slh_xmss.c:PACKET_copy_all Unexecuted instantiation: der_rsa_sig.c:PACKET_copy_all Unexecuted instantiation: der_sm2_sig.c:PACKET_copy_all Unexecuted instantiation: der_digests_gen.c:PACKET_copy_all Unexecuted instantiation: der_dsa_gen.c:PACKET_copy_all Unexecuted instantiation: der_ec_gen.c:PACKET_copy_all Unexecuted instantiation: der_ecx_gen.c:PACKET_copy_all Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_copy_all Unexecuted instantiation: der_rsa_gen.c:PACKET_copy_all Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_copy_all Unexecuted instantiation: slh_wots.c:PACKET_copy_all Unexecuted instantiation: der_sm2_gen.c:PACKET_copy_all Unexecuted instantiation: punycode.c:PACKET_copy_all |
472 | | |
473 | | /* |
474 | | * Copy |pkt| bytes to a newly allocated buffer and store a pointer to the |
475 | | * result in |*data|, and the length in |len|. |
476 | | * If |*data| is not NULL, the old data is OPENSSL_free'd. |
477 | | * If the packet is empty, or malloc fails, |*data| will be set to NULL. |
478 | | * Returns 1 if the malloc succeeds and 0 otherwise. |
479 | | * Does not forward PACKET position (because it is typically the last thing |
480 | | * done with a given PACKET). |
481 | | */ |
482 | | __owur static ossl_inline int PACKET_memdup(const PACKET *pkt, |
483 | | unsigned char **data, size_t *len) |
484 | 0 | { |
485 | 0 | size_t length; |
486 | 0 |
|
487 | 0 | OPENSSL_free(*data); |
488 | 0 | *data = NULL; |
489 | 0 | *len = 0; |
490 | 0 |
|
491 | 0 | length = PACKET_remaining(pkt); |
492 | 0 |
|
493 | 0 | if (length == 0) |
494 | 0 | return 1; |
495 | 0 |
|
496 | 0 | *data = OPENSSL_memdup(pkt->curr, length); |
497 | 0 | if (*data == NULL) |
498 | 0 | return 0; |
499 | 0 |
|
500 | 0 | *len = length; |
501 | 0 | return 1; |
502 | 0 | } Unexecuted instantiation: params.c:PACKET_memdup Unexecuted instantiation: encode_key2any.c:PACKET_memdup Unexecuted instantiation: hkdf.c:PACKET_memdup Unexecuted instantiation: x942kdf.c:PACKET_memdup Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_memdup Unexecuted instantiation: dsa_sig.c:PACKET_memdup Unexecuted instantiation: ecdsa_sig.c:PACKET_memdup Unexecuted instantiation: eddsa_sig.c:PACKET_memdup Unexecuted instantiation: ml_dsa_sig.c:PACKET_memdup Unexecuted instantiation: rsa_sig.c:PACKET_memdup Unexecuted instantiation: slh_dsa_sig.c:PACKET_memdup Unexecuted instantiation: sm2_sig.c:PACKET_memdup Unexecuted instantiation: der_dsa_sig.c:PACKET_memdup Unexecuted instantiation: der_ec_sig.c:PACKET_memdup Unexecuted instantiation: der_ecx_key.c:PACKET_memdup Unexecuted instantiation: der_hkdf_gen.c:PACKET_memdup Unexecuted instantiation: der_ml_dsa_key.c:PACKET_memdup Unexecuted instantiation: der_rsa_key.c:PACKET_memdup Unexecuted instantiation: der_slh_dsa_key.c:PACKET_memdup Unexecuted instantiation: der_wrap_gen.c:PACKET_memdup Unexecuted instantiation: dsa_asn1.c:PACKET_memdup Unexecuted instantiation: dsa_sign.c:PACKET_memdup Unexecuted instantiation: ec_asn1.c:PACKET_memdup Unexecuted instantiation: hpke_util.c:PACKET_memdup Unexecuted instantiation: asn1_dsa.c:PACKET_memdup Unexecuted instantiation: der_writer.c:PACKET_memdup Unexecuted instantiation: packet.c:PACKET_memdup Unexecuted instantiation: ml_dsa_encoders.c:PACKET_memdup Unexecuted instantiation: ml_dsa_key.c:PACKET_memdup Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_memdup Unexecuted instantiation: ml_dsa_matrix.c:PACKET_memdup Unexecuted instantiation: ml_dsa_ntt.c:PACKET_memdup Unexecuted instantiation: ml_dsa_params.c:PACKET_memdup Unexecuted instantiation: ml_dsa_sample.c:PACKET_memdup Unexecuted instantiation: ml_dsa_sign.c:PACKET_memdup Unexecuted instantiation: slh_dsa.c:PACKET_memdup Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_memdup Unexecuted instantiation: slh_dsa_key.c:PACKET_memdup Unexecuted instantiation: slh_fors.c:PACKET_memdup Unexecuted instantiation: slh_hash.c:PACKET_memdup Unexecuted instantiation: slh_hypertree.c:PACKET_memdup Unexecuted instantiation: slh_xmss.c:PACKET_memdup Unexecuted instantiation: der_rsa_sig.c:PACKET_memdup Unexecuted instantiation: der_sm2_sig.c:PACKET_memdup Unexecuted instantiation: der_digests_gen.c:PACKET_memdup Unexecuted instantiation: der_dsa_gen.c:PACKET_memdup Unexecuted instantiation: der_ec_gen.c:PACKET_memdup Unexecuted instantiation: der_ecx_gen.c:PACKET_memdup Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_memdup Unexecuted instantiation: der_rsa_gen.c:PACKET_memdup Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_memdup Unexecuted instantiation: slh_wots.c:PACKET_memdup Unexecuted instantiation: der_sm2_gen.c:PACKET_memdup Unexecuted instantiation: punycode.c:PACKET_memdup |
503 | | |
504 | | /* |
505 | | * Read a C string from |pkt| and copy to a newly allocated, NUL-terminated |
506 | | * buffer. Store a pointer to the result in |*data|. |
507 | | * If |*data| is not NULL, the old data is OPENSSL_free'd. |
508 | | * If the data in |pkt| does not contain a NUL-byte, the entire data is |
509 | | * copied and NUL-terminated. |
510 | | * Returns 1 if the malloc succeeds and 0 otherwise. |
511 | | * Does not forward PACKET position (because it is typically the last thing done |
512 | | * with a given PACKET). |
513 | | */ |
514 | | __owur static ossl_inline int PACKET_strndup(const PACKET *pkt, char **data) |
515 | 0 | { |
516 | 0 | OPENSSL_free(*data); |
517 | 0 |
|
518 | 0 | /* This will succeed on an empty packet, unless pkt->curr == NULL. */ |
519 | 0 | *data = OPENSSL_strndup((const char *)pkt->curr, PACKET_remaining(pkt)); |
520 | 0 | return (*data != NULL); |
521 | 0 | } Unexecuted instantiation: params.c:PACKET_strndup Unexecuted instantiation: encode_key2any.c:PACKET_strndup Unexecuted instantiation: hkdf.c:PACKET_strndup Unexecuted instantiation: x942kdf.c:PACKET_strndup Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_strndup Unexecuted instantiation: dsa_sig.c:PACKET_strndup Unexecuted instantiation: ecdsa_sig.c:PACKET_strndup Unexecuted instantiation: eddsa_sig.c:PACKET_strndup Unexecuted instantiation: ml_dsa_sig.c:PACKET_strndup Unexecuted instantiation: rsa_sig.c:PACKET_strndup Unexecuted instantiation: slh_dsa_sig.c:PACKET_strndup Unexecuted instantiation: sm2_sig.c:PACKET_strndup Unexecuted instantiation: der_dsa_sig.c:PACKET_strndup Unexecuted instantiation: der_ec_sig.c:PACKET_strndup Unexecuted instantiation: der_ecx_key.c:PACKET_strndup Unexecuted instantiation: der_hkdf_gen.c:PACKET_strndup Unexecuted instantiation: der_ml_dsa_key.c:PACKET_strndup Unexecuted instantiation: der_rsa_key.c:PACKET_strndup Unexecuted instantiation: der_slh_dsa_key.c:PACKET_strndup Unexecuted instantiation: der_wrap_gen.c:PACKET_strndup Unexecuted instantiation: dsa_asn1.c:PACKET_strndup Unexecuted instantiation: dsa_sign.c:PACKET_strndup Unexecuted instantiation: ec_asn1.c:PACKET_strndup Unexecuted instantiation: hpke_util.c:PACKET_strndup Unexecuted instantiation: asn1_dsa.c:PACKET_strndup Unexecuted instantiation: der_writer.c:PACKET_strndup Unexecuted instantiation: packet.c:PACKET_strndup Unexecuted instantiation: ml_dsa_encoders.c:PACKET_strndup Unexecuted instantiation: ml_dsa_key.c:PACKET_strndup Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_strndup Unexecuted instantiation: ml_dsa_matrix.c:PACKET_strndup Unexecuted instantiation: ml_dsa_ntt.c:PACKET_strndup Unexecuted instantiation: ml_dsa_params.c:PACKET_strndup Unexecuted instantiation: ml_dsa_sample.c:PACKET_strndup Unexecuted instantiation: ml_dsa_sign.c:PACKET_strndup Unexecuted instantiation: slh_dsa.c:PACKET_strndup Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_strndup Unexecuted instantiation: slh_dsa_key.c:PACKET_strndup Unexecuted instantiation: slh_fors.c:PACKET_strndup Unexecuted instantiation: slh_hash.c:PACKET_strndup Unexecuted instantiation: slh_hypertree.c:PACKET_strndup Unexecuted instantiation: slh_xmss.c:PACKET_strndup Unexecuted instantiation: der_rsa_sig.c:PACKET_strndup Unexecuted instantiation: der_sm2_sig.c:PACKET_strndup Unexecuted instantiation: der_digests_gen.c:PACKET_strndup Unexecuted instantiation: der_dsa_gen.c:PACKET_strndup Unexecuted instantiation: der_ec_gen.c:PACKET_strndup Unexecuted instantiation: der_ecx_gen.c:PACKET_strndup Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_strndup Unexecuted instantiation: der_rsa_gen.c:PACKET_strndup Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_strndup Unexecuted instantiation: slh_wots.c:PACKET_strndup Unexecuted instantiation: der_sm2_gen.c:PACKET_strndup Unexecuted instantiation: punycode.c:PACKET_strndup |
522 | | |
523 | | /* Returns 1 if |pkt| contains at least one 0-byte, 0 otherwise. */ |
524 | | static ossl_inline int PACKET_contains_zero_byte(const PACKET *pkt) |
525 | 0 | { |
526 | 0 | return memchr(pkt->curr, 0, pkt->remaining) != NULL; |
527 | 0 | } Unexecuted instantiation: params.c:PACKET_contains_zero_byte Unexecuted instantiation: encode_key2any.c:PACKET_contains_zero_byte Unexecuted instantiation: hkdf.c:PACKET_contains_zero_byte Unexecuted instantiation: x942kdf.c:PACKET_contains_zero_byte Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_contains_zero_byte Unexecuted instantiation: dsa_sig.c:PACKET_contains_zero_byte Unexecuted instantiation: ecdsa_sig.c:PACKET_contains_zero_byte Unexecuted instantiation: eddsa_sig.c:PACKET_contains_zero_byte Unexecuted instantiation: ml_dsa_sig.c:PACKET_contains_zero_byte Unexecuted instantiation: rsa_sig.c:PACKET_contains_zero_byte Unexecuted instantiation: slh_dsa_sig.c:PACKET_contains_zero_byte Unexecuted instantiation: sm2_sig.c:PACKET_contains_zero_byte Unexecuted instantiation: der_dsa_sig.c:PACKET_contains_zero_byte Unexecuted instantiation: der_ec_sig.c:PACKET_contains_zero_byte Unexecuted instantiation: der_ecx_key.c:PACKET_contains_zero_byte Unexecuted instantiation: der_hkdf_gen.c:PACKET_contains_zero_byte Unexecuted instantiation: der_ml_dsa_key.c:PACKET_contains_zero_byte Unexecuted instantiation: der_rsa_key.c:PACKET_contains_zero_byte Unexecuted instantiation: der_slh_dsa_key.c:PACKET_contains_zero_byte Unexecuted instantiation: der_wrap_gen.c:PACKET_contains_zero_byte Unexecuted instantiation: dsa_asn1.c:PACKET_contains_zero_byte Unexecuted instantiation: dsa_sign.c:PACKET_contains_zero_byte Unexecuted instantiation: ec_asn1.c:PACKET_contains_zero_byte Unexecuted instantiation: hpke_util.c:PACKET_contains_zero_byte Unexecuted instantiation: asn1_dsa.c:PACKET_contains_zero_byte Unexecuted instantiation: der_writer.c:PACKET_contains_zero_byte Unexecuted instantiation: packet.c:PACKET_contains_zero_byte Unexecuted instantiation: ml_dsa_encoders.c:PACKET_contains_zero_byte Unexecuted instantiation: ml_dsa_key.c:PACKET_contains_zero_byte Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_contains_zero_byte Unexecuted instantiation: ml_dsa_matrix.c:PACKET_contains_zero_byte Unexecuted instantiation: ml_dsa_ntt.c:PACKET_contains_zero_byte Unexecuted instantiation: ml_dsa_params.c:PACKET_contains_zero_byte Unexecuted instantiation: ml_dsa_sample.c:PACKET_contains_zero_byte Unexecuted instantiation: ml_dsa_sign.c:PACKET_contains_zero_byte Unexecuted instantiation: slh_dsa.c:PACKET_contains_zero_byte Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_contains_zero_byte Unexecuted instantiation: slh_dsa_key.c:PACKET_contains_zero_byte Unexecuted instantiation: slh_fors.c:PACKET_contains_zero_byte Unexecuted instantiation: slh_hash.c:PACKET_contains_zero_byte Unexecuted instantiation: slh_hypertree.c:PACKET_contains_zero_byte Unexecuted instantiation: slh_xmss.c:PACKET_contains_zero_byte Unexecuted instantiation: der_rsa_sig.c:PACKET_contains_zero_byte Unexecuted instantiation: der_sm2_sig.c:PACKET_contains_zero_byte Unexecuted instantiation: der_digests_gen.c:PACKET_contains_zero_byte Unexecuted instantiation: der_dsa_gen.c:PACKET_contains_zero_byte Unexecuted instantiation: der_ec_gen.c:PACKET_contains_zero_byte Unexecuted instantiation: der_ecx_gen.c:PACKET_contains_zero_byte Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_contains_zero_byte Unexecuted instantiation: der_rsa_gen.c:PACKET_contains_zero_byte Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_contains_zero_byte Unexecuted instantiation: slh_wots.c:PACKET_contains_zero_byte Unexecuted instantiation: der_sm2_gen.c:PACKET_contains_zero_byte Unexecuted instantiation: punycode.c:PACKET_contains_zero_byte |
528 | | |
529 | | /* Move the current reading position forward |len| bytes */ |
530 | | __owur static ossl_inline int PACKET_forward(PACKET *pkt, size_t len) |
531 | 0 | { |
532 | 0 | if (PACKET_remaining(pkt) < len) |
533 | 0 | return 0; |
534 | 0 |
|
535 | 0 | packet_forward(pkt, len); |
536 | 0 |
|
537 | 0 | return 1; |
538 | 0 | } Unexecuted instantiation: params.c:PACKET_forward Unexecuted instantiation: encode_key2any.c:PACKET_forward Unexecuted instantiation: hkdf.c:PACKET_forward Unexecuted instantiation: x942kdf.c:PACKET_forward Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_forward Unexecuted instantiation: dsa_sig.c:PACKET_forward Unexecuted instantiation: ecdsa_sig.c:PACKET_forward Unexecuted instantiation: eddsa_sig.c:PACKET_forward Unexecuted instantiation: ml_dsa_sig.c:PACKET_forward Unexecuted instantiation: rsa_sig.c:PACKET_forward Unexecuted instantiation: slh_dsa_sig.c:PACKET_forward Unexecuted instantiation: sm2_sig.c:PACKET_forward Unexecuted instantiation: der_dsa_sig.c:PACKET_forward Unexecuted instantiation: der_ec_sig.c:PACKET_forward Unexecuted instantiation: der_ecx_key.c:PACKET_forward Unexecuted instantiation: der_hkdf_gen.c:PACKET_forward Unexecuted instantiation: der_ml_dsa_key.c:PACKET_forward Unexecuted instantiation: der_rsa_key.c:PACKET_forward Unexecuted instantiation: der_slh_dsa_key.c:PACKET_forward Unexecuted instantiation: der_wrap_gen.c:PACKET_forward Unexecuted instantiation: dsa_asn1.c:PACKET_forward Unexecuted instantiation: dsa_sign.c:PACKET_forward Unexecuted instantiation: ec_asn1.c:PACKET_forward Unexecuted instantiation: hpke_util.c:PACKET_forward Unexecuted instantiation: asn1_dsa.c:PACKET_forward Unexecuted instantiation: der_writer.c:PACKET_forward Unexecuted instantiation: packet.c:PACKET_forward Unexecuted instantiation: ml_dsa_encoders.c:PACKET_forward Unexecuted instantiation: ml_dsa_key.c:PACKET_forward Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_forward Unexecuted instantiation: ml_dsa_matrix.c:PACKET_forward Unexecuted instantiation: ml_dsa_ntt.c:PACKET_forward Unexecuted instantiation: ml_dsa_params.c:PACKET_forward Unexecuted instantiation: ml_dsa_sample.c:PACKET_forward Unexecuted instantiation: ml_dsa_sign.c:PACKET_forward Unexecuted instantiation: slh_dsa.c:PACKET_forward Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_forward Unexecuted instantiation: slh_dsa_key.c:PACKET_forward Unexecuted instantiation: slh_fors.c:PACKET_forward Unexecuted instantiation: slh_hash.c:PACKET_forward Unexecuted instantiation: slh_hypertree.c:PACKET_forward Unexecuted instantiation: slh_xmss.c:PACKET_forward Unexecuted instantiation: der_rsa_sig.c:PACKET_forward Unexecuted instantiation: der_sm2_sig.c:PACKET_forward Unexecuted instantiation: der_digests_gen.c:PACKET_forward Unexecuted instantiation: der_dsa_gen.c:PACKET_forward Unexecuted instantiation: der_ec_gen.c:PACKET_forward Unexecuted instantiation: der_ecx_gen.c:PACKET_forward Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_forward Unexecuted instantiation: der_rsa_gen.c:PACKET_forward Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_forward Unexecuted instantiation: slh_wots.c:PACKET_forward Unexecuted instantiation: der_sm2_gen.c:PACKET_forward Unexecuted instantiation: punycode.c:PACKET_forward |
539 | | |
540 | | /* |
541 | | * Reads a variable-length vector prefixed with a one-byte length, and stores |
542 | | * the contents in |subpkt|. |pkt| can equal |subpkt|. |
543 | | * Data is not copied: the |subpkt| packet will share its underlying buffer with |
544 | | * the original |pkt|, so data wrapped by |pkt| must outlive the |subpkt|. |
545 | | * Upon failure, the original |pkt| and |subpkt| are not modified. |
546 | | */ |
547 | | __owur static ossl_inline int PACKET_get_length_prefixed_1(PACKET *pkt, |
548 | | PACKET *subpkt) |
549 | 0 | { |
550 | 0 | unsigned int length; |
551 | 0 | const unsigned char *data; |
552 | 0 | PACKET tmp = *pkt; |
553 | 0 | if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) { |
554 | 0 | return 0; |
555 | 0 | } |
556 | | |
557 | 0 | *pkt = tmp; |
558 | 0 | subpkt->curr = data; |
559 | 0 | subpkt->msgstart = pkt->msgstart; |
560 | 0 | subpkt->remaining = length; |
561 | |
|
562 | 0 | return 1; |
563 | 0 | } Unexecuted instantiation: params.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: encode_key2any.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: hkdf.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: x942kdf.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: dsa_sig.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ecdsa_sig.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: eddsa_sig.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: rsa_sig.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: sm2_sig.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_dsa_sig.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_ec_sig.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_ecx_key.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_rsa_key.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_wrap_gen.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: dsa_asn1.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: dsa_sign.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ec_asn1.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: hpke_util.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: asn1_dsa.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_writer.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: packet.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ml_dsa_key.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ml_dsa_params.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: slh_dsa.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: slh_dsa_key.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: slh_fors.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: slh_hash.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: slh_hypertree.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: slh_xmss.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_rsa_sig.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_sm2_sig.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_digests_gen.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_dsa_gen.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_ec_gen.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_ecx_gen.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_rsa_gen.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: slh_wots.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: der_sm2_gen.c:PACKET_get_length_prefixed_1 Unexecuted instantiation: punycode.c:PACKET_get_length_prefixed_1 |
564 | | |
565 | | /* |
566 | | * Like PACKET_get_length_prefixed_1, but additionally, fails when there are |
567 | | * leftover bytes in |pkt|. |
568 | | */ |
569 | | __owur static ossl_inline int PACKET_as_length_prefixed_1(PACKET *pkt, |
570 | | PACKET *subpkt) |
571 | 0 | { |
572 | 0 | unsigned int length; |
573 | 0 | const unsigned char *data; |
574 | 0 | PACKET tmp = *pkt; |
575 | 0 | if (!PACKET_get_1(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) { |
576 | 0 | return 0; |
577 | 0 | } |
578 | 0 |
|
579 | 0 | *pkt = tmp; |
580 | 0 | subpkt->curr = data; |
581 | 0 | subpkt->msgstart = pkt->msgstart; |
582 | 0 | subpkt->remaining = length; |
583 | 0 |
|
584 | 0 | return 1; |
585 | 0 | } Unexecuted instantiation: params.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: encode_key2any.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: hkdf.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: x942kdf.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: dsa_sig.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ecdsa_sig.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: eddsa_sig.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ml_dsa_sig.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: rsa_sig.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: slh_dsa_sig.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: sm2_sig.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_dsa_sig.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_ec_sig.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_ecx_key.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_hkdf_gen.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_rsa_key.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_wrap_gen.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: dsa_asn1.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: dsa_sign.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ec_asn1.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: hpke_util.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: asn1_dsa.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_writer.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: packet.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ml_dsa_key.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ml_dsa_params.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ml_dsa_sample.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: ml_dsa_sign.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: slh_dsa.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: slh_dsa_key.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: slh_fors.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: slh_hash.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: slh_hypertree.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: slh_xmss.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_rsa_sig.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_sm2_sig.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_digests_gen.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_dsa_gen.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_ec_gen.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_ecx_gen.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_rsa_gen.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: slh_wots.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: der_sm2_gen.c:PACKET_as_length_prefixed_1 Unexecuted instantiation: punycode.c:PACKET_as_length_prefixed_1 |
586 | | |
587 | | /* |
588 | | * Reads a variable-length vector prefixed with a two-byte length, and stores |
589 | | * the contents in |subpkt|. |pkt| can equal |subpkt|. |
590 | | * Data is not copied: the |subpkt| packet will share its underlying buffer with |
591 | | * the original |pkt|, so data wrapped by |pkt| must outlive the |subpkt|. |
592 | | * Upon failure, the original |pkt| and |subpkt| are not modified. |
593 | | */ |
594 | | __owur static ossl_inline int PACKET_get_length_prefixed_2(PACKET *pkt, |
595 | | PACKET *subpkt) |
596 | 0 | { |
597 | 0 | unsigned int length; |
598 | 0 | const unsigned char *data; |
599 | 0 | PACKET tmp = *pkt; |
600 | |
|
601 | 0 | if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) { |
602 | 0 | return 0; |
603 | 0 | } |
604 | | |
605 | 0 | *pkt = tmp; |
606 | 0 | subpkt->curr = data; |
607 | 0 | subpkt->msgstart = pkt->msgstart; |
608 | 0 | subpkt->remaining = length; |
609 | |
|
610 | 0 | return 1; |
611 | 0 | } Unexecuted instantiation: params.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: encode_key2any.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: hkdf.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: x942kdf.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: dsa_sig.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ecdsa_sig.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: eddsa_sig.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: rsa_sig.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: sm2_sig.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_dsa_sig.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_ec_sig.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_ecx_key.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_rsa_key.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_wrap_gen.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: dsa_asn1.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: dsa_sign.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ec_asn1.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: hpke_util.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: asn1_dsa.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_writer.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: packet.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ml_dsa_key.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ml_dsa_params.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: slh_dsa.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: slh_dsa_key.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: slh_fors.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: slh_hash.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: slh_hypertree.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: slh_xmss.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_rsa_sig.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_sm2_sig.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_digests_gen.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_dsa_gen.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_ec_gen.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_ecx_gen.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_rsa_gen.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: slh_wots.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: der_sm2_gen.c:PACKET_get_length_prefixed_2 Unexecuted instantiation: punycode.c:PACKET_get_length_prefixed_2 |
612 | | |
613 | | /* |
614 | | * Like PACKET_get_length_prefixed_2, but additionally, fails when there are |
615 | | * leftover bytes in |pkt|. |
616 | | */ |
617 | | __owur static ossl_inline int PACKET_as_length_prefixed_2(PACKET *pkt, |
618 | | PACKET *subpkt) |
619 | 0 | { |
620 | 0 | unsigned int length; |
621 | 0 | const unsigned char *data; |
622 | 0 | PACKET tmp = *pkt; |
623 | 0 |
|
624 | 0 | if (!PACKET_get_net_2(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length) || PACKET_remaining(&tmp) != 0) { |
625 | 0 | return 0; |
626 | 0 | } |
627 | 0 |
|
628 | 0 | *pkt = tmp; |
629 | 0 | subpkt->curr = data; |
630 | 0 | subpkt->msgstart = pkt->msgstart; |
631 | 0 | subpkt->remaining = length; |
632 | 0 |
|
633 | 0 | return 1; |
634 | 0 | } Unexecuted instantiation: params.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: encode_key2any.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: hkdf.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: x942kdf.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: dsa_sig.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ecdsa_sig.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: eddsa_sig.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ml_dsa_sig.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: rsa_sig.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: slh_dsa_sig.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: sm2_sig.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_dsa_sig.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_ec_sig.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_ecx_key.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_hkdf_gen.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_rsa_key.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_wrap_gen.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: dsa_asn1.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: dsa_sign.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ec_asn1.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: hpke_util.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: asn1_dsa.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_writer.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: packet.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ml_dsa_key.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ml_dsa_params.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ml_dsa_sample.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: ml_dsa_sign.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: slh_dsa.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: slh_dsa_key.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: slh_fors.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: slh_hash.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: slh_hypertree.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: slh_xmss.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_rsa_sig.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_sm2_sig.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_digests_gen.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_dsa_gen.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_ec_gen.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_ecx_gen.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_rsa_gen.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: slh_wots.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: der_sm2_gen.c:PACKET_as_length_prefixed_2 Unexecuted instantiation: punycode.c:PACKET_as_length_prefixed_2 |
635 | | |
636 | | /* |
637 | | * Reads a variable-length vector prefixed with a three-byte length, and stores |
638 | | * the contents in |subpkt|. |pkt| can equal |subpkt|. |
639 | | * Data is not copied: the |subpkt| packet will share its underlying buffer with |
640 | | * the original |pkt|, so data wrapped by |pkt| must outlive the |subpkt|. |
641 | | * Upon failure, the original |pkt| and |subpkt| are not modified. |
642 | | */ |
643 | | __owur static ossl_inline int PACKET_get_length_prefixed_3(PACKET *pkt, |
644 | | PACKET *subpkt) |
645 | 0 | { |
646 | 0 | unsigned long length; |
647 | 0 | const unsigned char *data; |
648 | 0 | PACKET tmp = *pkt; |
649 | 0 | if (!PACKET_get_net_3(&tmp, &length) || !PACKET_get_bytes(&tmp, &data, (size_t)length)) { |
650 | 0 | return 0; |
651 | 0 | } |
652 | 0 |
|
653 | 0 | *pkt = tmp; |
654 | 0 | subpkt->curr = data; |
655 | 0 | subpkt->msgstart = pkt->msgstart; |
656 | 0 | subpkt->remaining = length; |
657 | 0 |
|
658 | 0 | return 1; |
659 | 0 | } Unexecuted instantiation: params.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: encode_key2any.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: hkdf.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: x942kdf.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ml_kem_kmgmt.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: dsa_sig.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ecdsa_sig.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: eddsa_sig.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ml_dsa_sig.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: rsa_sig.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: slh_dsa_sig.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: sm2_sig.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_dsa_sig.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_ec_sig.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_ecx_key.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_hkdf_gen.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_ml_dsa_key.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_rsa_key.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_slh_dsa_key.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_wrap_gen.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: dsa_asn1.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: dsa_sign.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ec_asn1.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: hpke_util.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: asn1_dsa.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_writer.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: packet.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ml_dsa_encoders.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ml_dsa_key.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ml_dsa_key_compress.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ml_dsa_matrix.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ml_dsa_ntt.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ml_dsa_params.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ml_dsa_sample.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: ml_dsa_sign.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: slh_dsa.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: slh_dsa_hash_ctx.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: slh_dsa_key.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: slh_fors.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: slh_hash.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: slh_hypertree.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: slh_xmss.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_rsa_sig.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_sm2_sig.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_digests_gen.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_dsa_gen.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_ec_gen.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_ecx_gen.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_ml_dsa_gen.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_rsa_gen.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_slh_dsa_gen.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: slh_wots.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: der_sm2_gen.c:PACKET_get_length_prefixed_3 Unexecuted instantiation: punycode.c:PACKET_get_length_prefixed_3 |
660 | | |
661 | | /* Writable packets */ |
662 | | |
663 | | typedef struct wpacket_sub WPACKET_SUB; |
664 | | struct wpacket_sub { |
665 | | /* The parent WPACKET_SUB if we have one or NULL otherwise */ |
666 | | WPACKET_SUB *parent; |
667 | | |
668 | | /* |
669 | | * Offset into the buffer where the length of this WPACKET goes. We use an |
670 | | * offset in case the buffer grows and gets reallocated. |
671 | | */ |
672 | | size_t packet_len; |
673 | | |
674 | | /* Number of bytes in the packet_len or 0 if we don't write the length */ |
675 | | size_t lenbytes; |
676 | | |
677 | | /* Number of bytes written to the buf prior to this packet starting */ |
678 | | size_t pwritten; |
679 | | |
680 | | /* Flags for this sub-packet */ |
681 | | unsigned int flags; |
682 | | }; |
683 | | |
684 | | typedef struct wpacket_st WPACKET; |
685 | | struct wpacket_st { |
686 | | /* The buffer where we store the output data */ |
687 | | BUF_MEM *buf; |
688 | | |
689 | | /* Fixed sized buffer which can be used as an alternative to buf */ |
690 | | unsigned char *staticbuf; |
691 | | |
692 | | /* |
693 | | * Offset into the buffer where we are currently writing. We use an offset |
694 | | * in case the buffer grows and gets reallocated. |
695 | | */ |
696 | | size_t curr; |
697 | | |
698 | | /* Number of bytes written so far */ |
699 | | size_t written; |
700 | | |
701 | | /* Maximum number of bytes we will allow to be written to this WPACKET */ |
702 | | size_t maxsize; |
703 | | |
704 | | /* Our sub-packets (always at least one if not finished) */ |
705 | | WPACKET_SUB *subs; |
706 | | |
707 | | /* Writing from the end first? */ |
708 | | unsigned int endfirst : 1; |
709 | | }; |
710 | | |
711 | | /* Flags */ |
712 | | |
713 | | /* Default */ |
714 | | #define WPACKET_FLAGS_NONE 0 |
715 | | |
716 | | /* Error on WPACKET_close() if no data written to the WPACKET */ |
717 | 0 | #define WPACKET_FLAGS_NON_ZERO_LENGTH 1 |
718 | | |
719 | | /* |
720 | | * Abandon all changes on WPACKET_close() if no data written to the WPACKET, |
721 | | * i.e. this does not write out a zero packet length |
722 | | */ |
723 | 0 | #define WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH 2 |
724 | | |
725 | | /* QUIC variable-length integer length prefix */ |
726 | 0 | #define WPACKET_FLAGS_QUIC_VLINT 4 |
727 | | |
728 | | /* |
729 | | * Initialise a WPACKET with the buffer in |buf|. The buffer must exist |
730 | | * for the whole time that the WPACKET is being used. Additionally |lenbytes| of |
731 | | * data is preallocated at the start of the buffer to store the length of the |
732 | | * WPACKET once we know it. |
733 | | */ |
734 | | int WPACKET_init_len(WPACKET *pkt, BUF_MEM *buf, size_t lenbytes); |
735 | | |
736 | | /* |
737 | | * Same as WPACKET_init_len except there is no preallocation of the WPACKET |
738 | | * length. |
739 | | */ |
740 | | int WPACKET_init(WPACKET *pkt, BUF_MEM *buf); |
741 | | |
742 | | /* |
743 | | * Same as WPACKET_init_len except there is no underlying buffer. No data is |
744 | | * ever actually written. We just keep track of how much data would have been |
745 | | * written if a buffer was there. |
746 | | */ |
747 | | int WPACKET_init_null(WPACKET *pkt, size_t lenbytes); |
748 | | |
749 | | /* |
750 | | * Same as WPACKET_init_null except we set the WPACKET to assume DER length |
751 | | * encoding for sub-packets. |
752 | | */ |
753 | | int WPACKET_init_null_der(WPACKET *pkt); |
754 | | |
755 | | /* |
756 | | * Same as WPACKET_init_len except we do not use a growable BUF_MEM structure. |
757 | | * A fixed buffer of memory |buf| of size |len| is used instead. A failure will |
758 | | * occur if you attempt to write beyond the end of the buffer |
759 | | */ |
760 | | int WPACKET_init_static_len(WPACKET *pkt, unsigned char *buf, size_t len, |
761 | | size_t lenbytes); |
762 | | |
763 | | /* |
764 | | * Same as WPACKET_init_static_len except lenbytes is always 0, and we set the |
765 | | * WPACKET to write to the end of the buffer moving towards the start and use |
766 | | * DER length encoding for sub-packets. |
767 | | */ |
768 | | int WPACKET_init_der(WPACKET *pkt, unsigned char *buf, size_t len); |
769 | | |
770 | | /* |
771 | | * Set the flags to be applied to the current sub-packet |
772 | | */ |
773 | | int WPACKET_set_flags(WPACKET *pkt, unsigned int flags); |
774 | | |
775 | | /* |
776 | | * Closes the most recent sub-packet. It also writes out the length of the |
777 | | * packet to the required location (normally the start of the WPACKET) if |
778 | | * appropriate. The top level WPACKET should be closed using WPACKET_finish() |
779 | | * instead of this function. |
780 | | */ |
781 | | int WPACKET_close(WPACKET *pkt); |
782 | | |
783 | | /* |
784 | | * The same as WPACKET_close() but only for the top most WPACKET. Additionally |
785 | | * frees memory resources for this WPACKET. |
786 | | */ |
787 | | int WPACKET_finish(WPACKET *pkt); |
788 | | |
789 | | /* |
790 | | * Iterate through all the sub-packets and write out their lengths as if they |
791 | | * were being closed. The lengths will be overwritten with the final lengths |
792 | | * when the sub-packets are eventually closed (which may be different if more |
793 | | * data is added to the WPACKET). This function fails if a sub-packet is of 0 |
794 | | * length and WPACKET_FLAGS_ABANDON_ON_ZERO_LENGTH is set. |
795 | | */ |
796 | | int WPACKET_fill_lengths(WPACKET *pkt); |
797 | | |
798 | | /* |
799 | | * Initialise a new sub-packet. Additionally |lenbytes| of data is preallocated |
800 | | * at the start of the sub-packet to store its length once we know it. Don't |
801 | | * call this directly. Use the convenience macros below instead. |
802 | | */ |
803 | | int WPACKET_start_sub_packet_len__(WPACKET *pkt, size_t lenbytes); |
804 | | |
805 | | /* |
806 | | * Convenience macros for calling WPACKET_start_sub_packet_len with different |
807 | | * lengths |
808 | | */ |
809 | | #define WPACKET_start_sub_packet_u8(pkt) \ |
810 | 0 | WPACKET_start_sub_packet_len__((pkt), 1) |
811 | | #define WPACKET_start_sub_packet_u16(pkt) \ |
812 | | WPACKET_start_sub_packet_len__((pkt), 2) |
813 | | #define WPACKET_start_sub_packet_u24(pkt) \ |
814 | | WPACKET_start_sub_packet_len__((pkt), 3) |
815 | | #define WPACKET_start_sub_packet_u32(pkt) \ |
816 | | WPACKET_start_sub_packet_len__((pkt), 4) |
817 | | |
818 | | /* |
819 | | * Same as WPACKET_start_sub_packet_len__() except no bytes are pre-allocated |
820 | | * for the sub-packet length. |
821 | | */ |
822 | | int WPACKET_start_sub_packet(WPACKET *pkt); |
823 | | |
824 | | /* |
825 | | * Allocate bytes in the WPACKET for the output. This reserves the bytes |
826 | | * and counts them as "written", but doesn't actually do the writing. A pointer |
827 | | * to the allocated bytes is stored in |*allocbytes|. |allocbytes| may be NULL. |
828 | | * WARNING: the allocated bytes must be filled in immediately, without further |
829 | | * WPACKET_* calls. If not then the underlying buffer may be realloc'd and |
830 | | * change its location. |
831 | | */ |
832 | | int WPACKET_allocate_bytes(WPACKET *pkt, size_t len, |
833 | | unsigned char **allocbytes); |
834 | | |
835 | | /* |
836 | | * The same as WPACKET_allocate_bytes() except additionally a new sub-packet is |
837 | | * started for the allocated bytes, and then closed immediately afterwards. The |
838 | | * number of length bytes for the sub-packet is in |lenbytes|. Don't call this |
839 | | * directly. Use the convenience macros below instead. |
840 | | */ |
841 | | int WPACKET_sub_allocate_bytes__(WPACKET *pkt, size_t len, |
842 | | unsigned char **allocbytes, size_t lenbytes); |
843 | | |
844 | | /* |
845 | | * Convenience macros for calling WPACKET_sub_allocate_bytes with different |
846 | | * lengths |
847 | | */ |
848 | | #define WPACKET_sub_allocate_bytes_u8(pkt, len, bytes) \ |
849 | | WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 1) |
850 | | #define WPACKET_sub_allocate_bytes_u16(pkt, len, bytes) \ |
851 | | WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 2) |
852 | | #define WPACKET_sub_allocate_bytes_u24(pkt, len, bytes) \ |
853 | | WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 3) |
854 | | #define WPACKET_sub_allocate_bytes_u32(pkt, len, bytes) \ |
855 | | WPACKET_sub_allocate_bytes__((pkt), (len), (bytes), 4) |
856 | | |
857 | | /* |
858 | | * The same as WPACKET_allocate_bytes() except the reserved bytes are not |
859 | | * actually counted as written. Typically this will be for when we don't know |
860 | | * how big arbitrary data is going to be up front, but we do know what the |
861 | | * maximum size will be. If this function is used, then it should be immediately |
862 | | * followed by a WPACKET_allocate_bytes() call before any other WPACKET |
863 | | * functions are called (unless the write to the allocated bytes is abandoned). |
864 | | * |
865 | | * For example: If we are generating a signature, then the size of that |
866 | | * signature may not be known in advance. We can use WPACKET_reserve_bytes() to |
867 | | * handle this: |
868 | | * |
869 | | * if (!WPACKET_sub_reserve_bytes_u16(&pkt, EVP_PKEY_get_size(pkey), &sigbytes1) |
870 | | * || EVP_SignFinal(md_ctx, sigbytes1, &siglen, pkey) <= 0 |
871 | | * || !WPACKET_sub_allocate_bytes_u16(&pkt, siglen, &sigbytes2) |
872 | | * || sigbytes1 != sigbytes2) |
873 | | * goto err; |
874 | | */ |
875 | | int WPACKET_reserve_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes); |
876 | | |
877 | | /* |
878 | | * The "reserve_bytes" equivalent of WPACKET_sub_allocate_bytes__() |
879 | | */ |
880 | | int WPACKET_sub_reserve_bytes__(WPACKET *pkt, size_t len, |
881 | | unsigned char **allocbytes, size_t lenbytes); |
882 | | |
883 | | /* |
884 | | * Convenience macros for WPACKET_sub_reserve_bytes with different lengths |
885 | | */ |
886 | | #define WPACKET_sub_reserve_bytes_u8(pkt, len, bytes) \ |
887 | | WPACKET_reserve_bytes__((pkt), (len), (bytes), 1) |
888 | | #define WPACKET_sub_reserve_bytes_u16(pkt, len, bytes) \ |
889 | | WPACKET_sub_reserve_bytes__((pkt), (len), (bytes), 2) |
890 | | #define WPACKET_sub_reserve_bytes_u24(pkt, len, bytes) \ |
891 | | WPACKET_sub_reserve_bytes__((pkt), (len), (bytes), 3) |
892 | | #define WPACKET_sub_reserve_bytes_u32(pkt, len, bytes) \ |
893 | | WPACKET_sub_reserve_bytes__((pkt), (len), (bytes), 4) |
894 | | |
895 | | /* |
896 | | * Write the value stored in |val| into the WPACKET. The value will consume |
897 | | * |bytes| amount of storage. An error will occur if |val| cannot be |
898 | | * accommodated in |bytes| storage, e.g. attempting to write the value 256 into |
899 | | * 1 byte will fail. Don't call this directly. Use the convenience macros below |
900 | | * instead. |
901 | | */ |
902 | | int WPACKET_put_bytes__(WPACKET *pkt, uint64_t val, size_t bytes); |
903 | | |
904 | | /* |
905 | | * Convenience macros for calling WPACKET_put_bytes with different |
906 | | * lengths |
907 | | */ |
908 | | #define WPACKET_put_bytes_u8(pkt, val) \ |
909 | 0 | WPACKET_put_bytes__((pkt), (val), 1) |
910 | | #define WPACKET_put_bytes_u16(pkt, val) \ |
911 | 0 | WPACKET_put_bytes__((pkt), (val), 2) |
912 | | #define WPACKET_put_bytes_u24(pkt, val) \ |
913 | | WPACKET_put_bytes__((pkt), (val), 3) |
914 | | #define WPACKET_put_bytes_u32(pkt, val) \ |
915 | | WPACKET_put_bytes__((pkt), (val), 4) |
916 | | #define WPACKET_put_bytes_u64(pkt, val) \ |
917 | | WPACKET_put_bytes__((pkt), (val), 8) |
918 | | |
919 | | /* Set a maximum size that we will not allow the WPACKET to grow beyond */ |
920 | | int WPACKET_set_max_size(WPACKET *pkt, size_t maxsize); |
921 | | |
922 | | /* Copy |len| bytes of data from |*src| into the WPACKET. */ |
923 | | int WPACKET_memcpy(WPACKET *pkt, const void *src, size_t len); |
924 | | |
925 | | /* Set |len| bytes of data to |ch| into the WPACKET. */ |
926 | | int WPACKET_memset(WPACKET *pkt, int ch, size_t len); |
927 | | |
928 | | /* |
929 | | * Copy |len| bytes of data from |*src| into the WPACKET and prefix with its |
930 | | * length (consuming |lenbytes| of data for the length). Don't call this |
931 | | * directly. Use the convenience macros below instead. |
932 | | */ |
933 | | int WPACKET_sub_memcpy__(WPACKET *pkt, const void *src, size_t len, |
934 | | size_t lenbytes); |
935 | | |
936 | | /* Convenience macros for calling WPACKET_sub_memcpy with different lengths */ |
937 | | #define WPACKET_sub_memcpy_u8(pkt, src, len) \ |
938 | 0 | WPACKET_sub_memcpy__((pkt), (src), (len), 1) |
939 | | #define WPACKET_sub_memcpy_u16(pkt, src, len) \ |
940 | | WPACKET_sub_memcpy__((pkt), (src), (len), 2) |
941 | | #define WPACKET_sub_memcpy_u24(pkt, src, len) \ |
942 | | WPACKET_sub_memcpy__((pkt), (src), (len), 3) |
943 | | #define WPACKET_sub_memcpy_u32(pkt, src, len) \ |
944 | | WPACKET_sub_memcpy__((pkt), (src), (len), 4) |
945 | | |
946 | | /* |
947 | | * Return the total number of bytes written so far to the underlying buffer |
948 | | * including any storage allocated for length bytes |
949 | | */ |
950 | | int WPACKET_get_total_written(WPACKET *pkt, size_t *written); |
951 | | |
952 | | /* |
953 | | * Returns the length of the current sub-packet. This excludes any bytes |
954 | | * allocated for the length itself. |
955 | | */ |
956 | | int WPACKET_get_length(WPACKET *pkt, size_t *len); |
957 | | |
958 | | /* |
959 | | * Returns a pointer to the current write location, but does not allocate any |
960 | | * bytes. |
961 | | */ |
962 | | unsigned char *WPACKET_get_curr(WPACKET *pkt); |
963 | | |
964 | | /* Returns true if the underlying buffer is actually NULL */ |
965 | | int WPACKET_is_null_buf(WPACKET *pkt); |
966 | | |
967 | | /* Release resources in a WPACKET if a failure has occurred. */ |
968 | | void WPACKET_cleanup(WPACKET *pkt); |
969 | | |
970 | | #endif /* OSSL_INTERNAL_PACKET_H */ |