Handshake.cc
Go to the documentation of this file.
35};
63};
112ParseProtocolVersionBase(Parser::BinaryTokenizer &tk, const char *contextLabel, const bool beStrict)
AsHex< Integer > asHex(const Integer n)
a helper to ease AsHex object creation
Definition: IoManip.h:99
Definition: ProtocolVersion.h:24
enables efficient debugging with concise field names: Hello.version.major
Definition: BinaryTokenizer.h:23
void success()
reports successful parsing of a named object and calls close()
Definition: BinaryTokenizer.h:153
Definition: BinaryTokenizer.h:47
SBuf area(uint64_t size, const char *description)
parse size consecutive bytes as an opaque blob
Definition: BinaryTokenizer.cc:168
SBuf pstring8(const char *description)
up to 255 byte-long p-string
Definition: BinaryTokenizer.cc:217
void skip(uint64_t size, const char *description)
ignore the next size bytes
Definition: BinaryTokenizer.cc:204
uint16_t uint16(const char *description)
parse a two-byte unsigned integer
Definition: BinaryTokenizer.cc:141
uint8_t uint8(const char *description)
parse a single-byte unsigned integer
Definition: BinaryTokenizer.cc:132
SBuf pstring24(const char *description)
up to 16 MiB-long p-string!
Definition: BinaryTokenizer.cc:235
thrown by modern "incremental" parsers when they need more data
Definition: forward.h:18
SBuf parseSniExtension(const SBuf &extensionData) const
Definition: Handshake.cc:526
void parseHandshakeMessage()
Definition: Handshake.cc:347
void parseSupportedVersionsExtension(const SBuf &extensionData) const
RFC 8446 Section 4.2.1: SupportedVersions extension.
Definition: Handshake.cc:554
void parseVersion2Record()
Definition: Handshake.cc:231
void parseServerHelloHandshakeMessage(const SBuf &raw)
RFC 5246 Section 7.4.1.3. Server Hello.
Definition: Handshake.cc:509
void parseMessages()
parses one or more "higher-level protocol" frames of currentContentType
Definition: Handshake.cc:291
bool isSslv2Record(const SBuf &raw) const
Definition: Handshake.cc:244
bool parseCompressionMethods(const SBuf &raw)
Definition: Handshake.cc:420
void skipMessage(const char *msgType)
Definition: Handshake.cc:632
HandshakeParser(MessageSource)
Definition: Handshake.cc:219
void parseCiphers(const SBuf &raw)
Definition: Handshake.cc:479
void parseClientHelloHandshakeMessage(const SBuf &raw)
Definition: Handshake.cc:405
void parseChangeCipherCpecMessage()
Definition: Handshake.cc:314
void parseVersion2HandshakeMessage(const SBuf &raw)
Definition: Handshake.cc:389
void parseV23Ciphers(const SBuf &raw)
Definition: Handshake.cc:490
void parseApplicationDataMessage()
Definition: Handshake.cc:382
void parseExtensions(const SBuf &raw)
Definition: Handshake.cc:435
TLS Handshake Protocol frame from RFC 5246 Section 7.4.
Definition: Handshake.cc:67
draft-hickman-netscape-ssl-00. Section 4.1. SSL Record Header Format
Definition: Handshake.cc:50
Sslv2Record(Parser::BinaryTokenizer &tk)
Definition: Handshake.cc:197
TLS Record Layer's frame from RFC 5246 Section 6.2.1.
Definition: Handshake.cc:39
AnyP::ProtocolVersion version
Record Layer, not necessarily the negotiated TLS version;.
Definition: Handshake.cc:44
TLSPlaintext(Parser::BinaryTokenizer &tk)
Definition: Handshake.cc:155
Definition: Handshake.h:23
AnyP::ProtocolVersion ProtocolVersion()
Protocol version to use in Http::Message structures wrapping FTP messages.
Definition: Elements.cc:24
static AnyP::ProtocolVersion ParseProtocolVersion(Parser::BinaryTokenizer &tk)
Definition: Handshake.cc:140
bool Tls1p3orLater(const AnyP::ProtocolVersion &p)
whether the given TLS/SSL protocol is TLS v1.3 or later
Definition: Handshake.h:160
HandshakeType
TLS Handshake protocol's handshake types from RFC 5246 Section 7.4.
Definition: Handshake.cc:58
static Extensions SupportedExtensions()
A helper function to create a set of all supported TLS extensions.
Definition: Handshake.cc:666
static const uint64_t HelloRandomSize
The size of the TLS Random structure from RFC 5246 Section 7.4.1.2.
Definition: Handshake.cc:88
bool Tls1p2orEarlier(const AnyP::ProtocolVersion &p)
whether the given TLS/SSL protocol is TLS v1.2 or earlier, including SSL
Definition: Handshake.h:153
std::unordered_set< Extension::Type > Extensions
Extension types optimized for fast lookups.
Definition: Handshake.cc:106
static AnyP::ProtocolVersion ParseProtocolVersionBase(Parser::BinaryTokenizer &tk, const char *contextLabel, const bool beStrict)
Definition: Handshake.cc:112
bool TlsVersionEarlierThan(const AnyP::ProtocolVersion &a, const AnyP::ProtocolVersion &b)
whether TLS/SSL protocol a precedes TLS/SSL protocol b
Definition: Handshake.h:140
static AnyP::ProtocolVersion ParseOptionalProtocolVersion(Parser::BinaryTokenizer &tk, const char *contextLabel)
Definition: Handshake.cc:148
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63