summaryrefslogtreecommitdiffstats
path: root/ssl/record/record.h
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2023-02-23 17:02:54 +0000
committerPauli <pauli@openssl.org>2023-04-12 11:02:01 +1000
commit2eb91b0ec325924ae4b7dc596617a6fff71d7ae6 (patch)
tree1df51675b32dec5afeda3664035a2f4d8647570d /ssl/record/record.h
parent7257188b7054cf8acfc4837e38486459e0930718 (diff)
Make the data field for get_record() const
Improves consistency with the QUIC rstream implementation - and improves the abstraction between the TLS implementation and the abstract record layer. We should not expect that the TLS implementation should be able to change the underlying buffer. Future record layers may not expect that. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20404)
Diffstat (limited to 'ssl/record/record.h')
-rw-r--r--ssl/record/record.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/ssl/record/record.h b/ssl/record/record.h
index 8113d78da0..a277f09e18 100644
--- a/ssl/record/record.h
+++ b/ssl/record/record.h
@@ -24,7 +24,12 @@ typedef struct tls_record_st {
int version;
int type;
/* The data buffer containing bytes from the record */
- unsigned char *data;
+ const unsigned char *data;
+ /*
+ * Buffer that we allocated to store data. If non NULL always the same as
+ * data (but non-const)
+ */
+ unsigned char *allocdata;
/* Number of remaining to be read in the data buffer */
size_t length;
/* Offset into the data buffer where to start reading */