1 #ifndef PACKETPP_SSL_HANDSHAKE_MESSAGE 2 #define PACKETPP_SSL_HANDSHAKE_MESSAGE 46 : m_Id(id), m_KeyExAlg(keyExAlg), m_AuthAlg(authAlg), m_SymKeyAlg(symKeyAlg), m_MACAlg(MACAlg), m_Name(name) {}
51 inline uint16_t
getID() {
return m_Id; }
56 inline std::string
asString() {
return m_Name; }
206 : m_Data(data), m_DataLen(dataLen), m_AllDataExists(allDataExists) {}
228 bool m_AllDataExists;
232 class SSLHandshakeLayer;
400 template<
class TExtension>
507 template<
class TExtension>
723 std::vector<SSLClientCertificateType> m_ClientCertificateTypes;
916 template<
class TExtension>
919 size_t vecSize = m_ExtensionList.size();
920 for (
size_t i = 0; i < vecSize; i++)
923 if (dynamic_cast<TExtension*>(curElem) != NULL)
924 return (TExtension*)curElem;
930 template<
class TExtension>
933 size_t vecSize = m_ExtensionList.size();
934 for (
size_t i = 0; i < vecSize; i++)
937 if (dynamic_cast<TExtension*>(curElem) != NULL)
938 return (TExtension*)curElem;
size_t getSignedHashLength()
virtual size_t getMessageLength()
SSLExtensionType
Definition: SSLCommon.h:404
size_t getClientKeyExchangeParamsLength()
std::vector< SSLClientCertificateType > & getCertificateTypes()
std::string asString()
Definition: SSLHandshake.h:56
Definition: SSLHandshake.h:842
size_t getServerKeyExchangeParamsLength()
Definition: SSLHandshake.h:193
Definition: SSLHandshake.h:732
size_t getCertificateAuthorityLength()
static SSLCipherSuite * getCipherSuiteByID(uint16_t id)
uint8_t getCompressionMethodsValue()
int getCipherSuiteCount()
uint8_t * getClientKeyExchangeParams()
SSLClientHelloMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
SSLCertificateVerifyMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:770
Definition: SSLHandshake.h:573
SSLVersion getHandshakeVersion()
Definition: SSLHandshake.h:801
uint16_t getTotalLength()
SSLSymetricEncryptionAlgorithm
Definition: SSLCommon.h:298
Definition: SSLHandshake.h:683
SSLExtension(uint8_t *data)
The main namespace for the PcapPlusPlus lib.
virtual bool isMessageComplete()
uint8_t * getServerKeyExchangeParams()
uint8_t getSessionIDLength()
Definition: SSLHandshake.h:108
SSLClientKeyExchangeMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:653
TExtension * getExtensionOfType()
Definition: SSLHandshake.h:917
SSLKeyExchangeAlgorithm getKeyExchangeAlg()
Definition: SSLHandshake.h:61
SSLHashingAlgorithm getMACAlg()
Definition: SSLHandshake.h:76
SSLAuthenticationAlgorithm getAuthAlg()
Definition: SSLHandshake.h:66
ssl_tls_client_server_hello * getClientHelloHeader()
Definition: SSLHandshake.h:322
SSLHandshakeType getHandshakeType()
Definition: SSLHandshake.h:884
uint16_t extensionType
Definition: SSLHandshake.h:153
size_t getSessionTicketDataLength()
size_t getSignedHashLength()
Definition: SSLHandshake.h:303
SSLExtension * getExtension(int index)
uint8_t getCompressionMethodsValue()
Definition: SSLHandshake.h:171
Definition: PointerVector.h:24
SSLSymetricEncryptionAlgorithm getSymKeyAlg()
Definition: SSLHandshake.h:71
Definition: SSLHandshake.h:29
Definition: SSLCommon.h:56
virtual SSLHandshakeType getHandshakeType()
Definition: SSLHandshake.h:642
uint8_t * getSessionTicketData()
Definition: SSLHandshake.h:527
uint16_t getID()
Definition: SSLHandshake.h:51
SSLNewSessionTicketMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:853
Definition: SSLHandshake.h:243
static SSLHandshakeMessage * createHandhakeMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
SSLCipherSuite * getCipherSuite()
SSLServerKeyExchangeMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:611
Definition: SSLHandshake.h:150
uint8_t extensionData[]
Definition: SSLHandshake.h:157
std::string getHostName()
SSLExtension * getExtension(int index)
uint8_t * getSignedHash()
virtual std::string toString()=0
SSLCipherSuite(uint16_t id, SSLKeyExchangeAlgorithm keyExAlg, SSLAuthenticationAlgorithm authAlg, SSLSymetricEncryptionAlgorithm symKeyAlg, SSLHashingAlgorithm MACAlg, const char *name)
Definition: SSLHandshake.h:41
SSLCertificateRequestMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
SSLHelloRequestMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:584
Definition: SSLHandshake.h:600
Definition: SSLHandshake.h:418
SSLServerHelloMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
SSLUnknownMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:895
uint8_t * getCertificateAuthorityData()
SSLVersion getHandshakeVersion()
static SSLCipherSuite * getCipherSuiteByName(std::string name)
uint16_t extensionDataLength
Definition: SSLHandshake.h:155
SSLHashingAlgorithm
Definition: SSLCommon.h:377
uint8_t getSessionIDLength()
bool allDataExists()
Definition: SSLHandshake.h:223
size_t getMessageLength()
SSLKeyExchangeAlgorithm
Definition: SSLCommon.h:232
SSLServerHelloDoneMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:743
SSLFinishedMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
Definition: SSLHandshake.h:812
Definition: SSLHandshake.h:759
uint8_t * getSignedHash()
SSLHandshakeType
Definition: SSLCommon.h:129
SSLCertificateMessage(uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
SSLVersion
Definition: SSLCommon.h:112
int getNumOfCertificates()
SSLAuthenticationAlgorithm
Definition: SSLCommon.h:265
SSLServerNameIndicationExtension(uint8_t *data)
Definition: SSLHandshake.h:178
Definition: SSLLayer.h:306
SSLx509Certificate * getCertificate(int index)
SSLHandshakeLayer * getContainingLayer()
Definition: SSLHandshake.h:280
SSLx509Certificate(uint8_t *data, size_t dataLen, bool allDataExists)
Definition: SSLHandshake.h:205
uint16_t getExtensionsLenth()
size_t getDataLength()
Definition: SSLHandshake.h:216
TExtension * getExtensionOfType()
Definition: SSLHandshake.h:931
SSLCipherSuite * getCipherSuite(int index)
uint8_t * getData()
Definition: SSLHandshake.h:211
ssl_tls_client_server_hello * getServerHelloHeader()
Definition: SSLHandshake.h:437
uint16_t getExtensionsLenth()
SSLExtensionType getType()