diff options
Diffstat (limited to 'cpputil')
-rw-r--r-- | cpputil/databuffer.h | 1 | ||||
-rw-r--r-- | cpputil/scoped_ptrs_ssl.h | 2 | ||||
-rw-r--r-- | cpputil/tls_parser.h | 5 |
3 files changed, 8 insertions, 0 deletions
diff --git a/cpputil/databuffer.h b/cpputil/databuffer.h index e981a7c22..4bedd075d 100644 --- a/cpputil/databuffer.h +++ b/cpputil/databuffer.h @@ -23,6 +23,7 @@ class DataBuffer { DataBuffer(const DataBuffer& other) : data_(nullptr), len_(0) { Assign(other); } + explicit DataBuffer(size_t l) : data_(nullptr), len_(0) { Allocate(l); } ~DataBuffer() { delete[] data_; } DataBuffer& operator=(const DataBuffer& other) { diff --git a/cpputil/scoped_ptrs_ssl.h b/cpputil/scoped_ptrs_ssl.h index 474187540..682ebab82 100644 --- a/cpputil/scoped_ptrs_ssl.h +++ b/cpputil/scoped_ptrs_ssl.h @@ -12,6 +12,7 @@ struct ScopedDeleteSSL { void operator()(SSLAeadContext* ctx) { SSL_DestroyAead(ctx); } + void operator()(SSLMaskingContext* ctx) { SSL_DestroyMaskingContext(ctx); } void operator()(SSLAntiReplayContext* ctx) { SSL_ReleaseAntiReplayContext(ctx); } @@ -34,6 +35,7 @@ struct ScopedMaybeDeleteSSL { SCOPED(SSLAeadContext); SCOPED(SSLAntiReplayContext); +SCOPED(SSLMaskingContext); SCOPED(SSLResumptionTokenInfo); #undef SCOPED diff --git a/cpputil/tls_parser.h b/cpputil/tls_parser.h index 05dd99fc8..6636b3c6a 100644 --- a/cpputil/tls_parser.h +++ b/cpputil/tls_parser.h @@ -74,6 +74,11 @@ const uint8_t kTlsFakeChangeCipherSpec[] = { 0x01 // Value }; +const uint8_t kCtDtlsCiphertext = 0x20; +const uint8_t kCtDtlsCiphertextMask = 0xE0; +const uint8_t kCtDtlsCiphertext16bSeqno = 0x08; +const uint8_t kCtDtlsCiphertextLengthPresent = 0x04; + static const uint8_t kTls13PskKe = 0; static const uint8_t kTls13PskDhKe = 1; static const uint8_t kTls13PskAuth = 0; |