7 #include "X509Decoder.h"
35 : m_Id(id), m_KeyExAlg(keyExAlg), m_AuthAlg(authAlg), m_SymKeyAlg(symKeyAlg), m_MACAlg(MACAlg), m_Name(name)
217 : m_Data(data), m_DataLen(dataLen), m_AllDataExists(
allDataExists)
247 return m_AllDataExists;
251 std::unique_ptr<Asn1Record> m_Asn1Record;
254 bool m_AllDataExists;
257 class SSLHandshakeLayer;
750 std::vector<SSLClientCertificateType> m_ClientCertificateTypes;
909 size_t vecSize = m_ExtensionList.size();
910 for (
size_t i = 0; i < vecSize; i++)
913 if (
dynamic_cast<TExtension*
>(curElem) !=
nullptr)
914 return static_cast<TExtension*
>(curElem);
922 size_t vecSize = m_ExtensionList.size();
923 for (
size_t i = 0; i < vecSize; i++)
926 if (
dynamic_cast<TExtension*
>(curElem) !=
nullptr)
927 return static_cast<TExtension*
>(curElem);
Definition: Asn1Codec.h:355
Definition: PointerVector.h:50
Definition: SSLHandshake.h:594
std::string toString() const override
SSLCertificateMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
SSLx509Certificate * getCertificate(int index) const
int getNumOfCertificates() const
Definition: SSLHandshake.h:720
size_t getCertificateAuthorityLength() const
std::vector< SSLClientCertificateType > & getCertificateTypes()
uint8_t * getCertificateAuthorityData() const
std::string toString() const override
SSLCertificateRequestMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:780
SSLCertificateVerifyMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:787
std::string toString() const override
size_t getSignedHashLength() const
uint8_t * getSignedHash() const
Definition: SSLHandshake.h:24
SSLAuthenticationAlgorithm getAuthAlg() const
Definition: SSLHandshake.h:57
SSLHashingAlgorithm getMACAlg() const
Definition: SSLHandshake.h:69
uint16_t getID() const
Definition: SSLHandshake.h:39
SSLCipherSuite(uint16_t id, SSLKeyExchangeAlgorithm keyExAlg, SSLAuthenticationAlgorithm authAlg, SSLSymetricEncryptionAlgorithm symKeyAlg, SSLHashingAlgorithm MACAlg, const char *name)
Definition: SSLHandshake.h:33
SSLSymetricEncryptionAlgorithm getSymKeyAlg() const
Definition: SSLHandshake.h:63
SSLKeyExchangeAlgorithm getKeyExchangeAlg() const
Definition: SSLHandshake.h:51
static SSLCipherSuite * getCipherSuiteByName(std::string name)
std::string asString() const
Definition: SSLHandshake.h:45
static SSLCipherSuite * getCipherSuiteByID(uint16_t id)
Definition: SSLHandshake.h:312
uint16_t getCipherSuiteID(int index, bool &isValid) const
uint16_t getExtensionsLength() const
SSLExtension * getExtensionOfType(uint16_t type) const
SSLExtension * getExtensionOfType(SSLExtensionType type) const
SSLClientHelloMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
std::string toString() const override
TExtension * getExtensionOfType() const
Definition: SSLHandshake.h:907
uint8_t getSessionIDLength() const
SSLCipherSuite * getCipherSuite(int index) const
int getCipherSuiteCount() const
ssl_tls_client_server_hello * getClientHelloHeader() const
Definition: SSLHandshake.h:363
uint8_t * getSessionID() const
uint8_t getCompressionMethodsValue() const
SSLExtension * getExtension(int index) const
int getExtensionCount() const
ClientHelloTLSFingerprint generateTLSFingerprint() const
SSLVersion getHandshakeVersion() const
Definition: SSLHandshake.h:687
SSLClientKeyExchangeMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:694
std::string toString() const override
uint8_t * getClientKeyExchangeParams() const
size_t getClientKeyExchangeParamsLength() const
Definition: SSLHandshake.h:98
uint16_t getLength() const
SSLExtension(uint8_t *data)
uint16_t getTotalLength() const
uint16_t getTypeAsInt() const
SSLExtensionType getType() const
uint8_t * getData() const
Definition: SSLHandshake.h:814
uint8_t * getSignedHash() const
std::string toString() const override
SSLFinishedMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:821
size_t getSignedHashLength() const
Definition: SSLLayer.h:303
Definition: SSLHandshake.h:266
static SSLHandshakeMessage * createHandshakeMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
virtual size_t getMessageLength() const
virtual SSLHandshakeType getHandshakeType() const
virtual std::string toString() const =0
SSLHandshakeLayer * getContainingLayer() const
Definition: SSLHandshake.h:292
virtual bool isMessageComplete() const
Definition: SSLHandshake.h:630
SSLHelloRequestMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:637
std::string toString() const override
Definition: SSLHandshake.h:847
size_t getSessionTicketDataLength() const
SSLNewSessionTicketMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:854
std::string toString() const override
uint8_t * getSessionTicketData() const
Definition: SSLHandshake.h:757
std::string toString() const override
SSLServerHelloDoneMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:764
Definition: SSLHandshake.h:457
uint8_t getSessionIDLength() const
SSLExtension * getExtensionOfType(uint16_t type) const
uint16_t getExtensionsLength() const
SSLServerHelloMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
SSLExtension * getExtensionOfType(SSLExtensionType type) const
std::string toString() const override
ssl_tls_client_server_hello * getServerHelloHeader() const
Definition: SSLHandshake.h:499
int getExtensionCount() const
SSLVersion getHandshakeVersion() const
uint16_t getCipherSuiteID(bool &isValid) const
uint8_t getCompressionMethodsValue() const
SSLExtension * getExtension(int index) const
SSLCipherSuite * getCipherSuite() const
TExtension * getExtensionOfType() const
Definition: SSLHandshake.h:920
ServerHelloTLSFingerprint generateTLSFingerprint() const
uint8_t * getSessionID() const
Definition: SSLHandshake.h:653
SSLServerKeyExchangeMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:660
std::string toString() const override
uint8_t * getServerKeyExchangeParams() const
size_t getServerKeyExchangeParamsLength() const
Definition: SSLHandshake.h:146
std::string getHostName() const
SSLServerNameIndicationExtension(uint8_t *data)
Definition: SSLHandshake.h:150
Definition: SSLHandshake.h:161
std::vector< SSLVersion > getSupportedVersions() const
SSLSupportedVersionsExtension(uint8_t *data)
Definition: SSLHandshake.h:165
Definition: SSLHandshake.h:881
SSLHandshakeType getHandshakeType() const override
std::string toString() const override
SSLUnknownMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:888
size_t getMessageLength() const override
Definition: SSLCommon.h:98
Definition: SSLHandshake.h:208
SSLx509Certificate(uint8_t *data, size_t dataLen, bool allDataExists)
Definition: SSLHandshake.h:216
Asn1SequenceRecord * getRootAsn1Record()
size_t getDataLength() const
Definition: SSLHandshake.h:227
bool allDataExists() const
Definition: SSLHandshake.h:245
std::unique_ptr< X509Certificate > getX509Certificate()
uint8_t * getData() const
Definition: SSLHandshake.h:221
Definition: SSLHandshake.h:176
std::vector< uint16_t > getSupportedGroups() const
TLSSupportedGroupsExtension(uint8_t *data)
Definition: SSLHandshake.h:180
The main namespace for the PcapPlusPlus lib.
SSLKeyExchangeAlgorithm
SSL/TLS key exchange algorithms.
Definition: SSLCommon.h:291
SSLExtensionType
SSL/TLS extension types.
Definition: SSLCommon.h:459
SSLSymetricEncryptionAlgorithm
SSL/TLS symmetric encryption algorithms.
Definition: SSLCommon.h:353
SSLAuthenticationAlgorithm
SSL/TLS authentication algorithms.
Definition: SSLCommon.h:322
SSLHandshakeType
SSL/TLS handshake message types.
Definition: SSLCommon.h:188
SSLHashingAlgorithm
SSL/TLS hashing algorithms.
Definition: SSLCommon.h:434
Definition: SSLHandshake.h:321
std::vector< uint8_t > ecPointFormats
A list of EC point formats taken from the "EC point formats" TLS extension (if exist in the message)
Definition: SSLHandshake.h:331
std::pair< std::string, std::string > toStringAndMD5()
std::vector< uint16_t > extensions
A list of extension IDs.
Definition: SSLHandshake.h:327
std::vector< uint16_t > cipherSuites
A list of Cipher Suite IDs.
Definition: SSLHandshake.h:325
std::vector< uint16_t > supportedGroups
A list of Suppotred Groups taken from the "supported groups" TLS extension (if exist in the message)
Definition: SSLHandshake.h:329
uint16_t tlsVersion
TLS version.
Definition: SSLHandshake.h:323
Definition: SSLHandshake.h:125
uint8_t extensionData[]
Extension data as raw (byte array)
Definition: SSLHandshake.h:131
uint16_t extensionType
Extension type.
Definition: SSLHandshake.h:127
uint16_t extensionDataLength
Extension length.
Definition: SSLHandshake.h:129
Definition: SSLHandshake.h:465
uint16_t tlsVersion
TLS version.
Definition: SSLHandshake.h:467
uint16_t cipherSuite
Cipher Suite ID.
Definition: SSLHandshake.h:469
std::vector< uint16_t > extensions
A list of extension IDs.
Definition: SSLHandshake.h:471
std::pair< std::string, std::string > toStringAndMD5()
Definition: SSLCommon.h:47