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