|
PcapPlusPlus
19.12
|
Go to the documentation of this file. 1 #ifndef PACKETPP_SSL_LAYER
2 #define PACKETPP_SSL_LAYER
200 static bool IsSSLMessage(uint16_t srcPort, uint16_t dstPort, uint8_t* data,
size_t dataLen);
254 SSLLayer(uint8_t* data,
size_t dataLen,
Layer* prevLayer,
Packet* packet) :
Layer(data, dataLen, prevLayer, packet) { m_Protocol =
SSL; }
336 template<
class THandshakeMessage>
348 template<
class THandshakeMessage>
382 :
SSLLayer(data, dataLen, prevLayer, packet) {}
414 :
SSLLayer(data, dataLen, prevLayer, packet) {}
456 :
SSLLayer(data, dataLen, prevLayer, packet) {}
481 template<
class THandshakeMessage>
484 size_t vecSize = m_MessageList.size();
485 for (
size_t i = 0; i < vecSize; i++)
488 if (dynamic_cast<THandshakeMessage*>(curElem) != NULL)
489 return (THandshakeMessage*)curElem;
496 template<
class THandshakeMessage>
499 size_t vecSize = m_MessageList.size();
503 for (afterIndex = 0; afterIndex < vecSize; afterIndex++)
505 SSLHandshakeMessage* curElem = const_cast<SSLHandshakeMessage*>(m_MessageList.at(afterIndex));
506 if (curElem == after)
511 if (afterIndex == vecSize)
514 for (
size_t i = afterIndex+1; i < vecSize; i++)
517 if (dynamic_cast<THandshakeMessage*>(curElem) != NULL)
518 return (THandshakeMessage*)curElem;
Definition: SSLLayer.h:402
SSLRecordType
Definition: SSLCommon.h:97
Definition: SSLHandshake.h:243
SSLAlertDescription getAlertDescription()
OsiModelLayer
Definition: ProtocolType.h:224
SSLVersion
Definition: SSLCommon.h:112
static std::string sslVersionToString(SSLVersion ver)
Definition: SSLLayer.h:444
static bool IsSSLMessage(uint16_t srcPort, uint16_t dstPort, uint8_t *data, size_t dataLen)
SSLAlertLevel getAlertLevel() const
void computeCalculateFields()
Definition: SSLLayer.h:478
size_t getHandshakeMessagesCount() const
Definition: SSLLayer.h:321
THandshakeMessage * getNextHandshakeMessageOfType(SSLHandshakeMessage *after) const
Definition: SSLLayer.h:497
std::string toString() const
Definition: SSLLayer.h:171
SSLHandshakeLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
SSLAlertLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:413
void computeCalculateFields()
Definition: SSLLayer.h:358
void computeCalculateFields()
Definition: SSLLayer.h:435
uint8_t * getEncrpytedData() const
size_t getEncrpytedDataLen() const
Definition: ProtocolType.h:131
std::string toString() const
static bool isSSLPort(uint16_t port)
SSLAlertDescription
Definition: SSLCommon.h:173
static SSLLayer * createSSLMessage(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLCommon.h:22
SSLHandshakeMessage * getHandshakeMessageAt(int index) const
OsiModelLayer getOsiModelLayer() const
Definition: SSLLayer.h:251
size_t getHeaderLen() const
SSLRecordType getRecordType() const
SSLChangeCipherSpecLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:381
The main namespace for the PcapPlusPlus lib.
SSLAlertLevel
Definition: SSLCommon.h:160
SSLVersion getRecordVersion() const
Definition: SSLLayer.h:305
std::string toString() const
SSLApplicationDataLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:455
ssl_tls_record_layer * getRecordLayer() const
Definition: SSLLayer.h:226
void computeCalculateFields()
Definition: SSLLayer.h:393
std::string toString() const
Definition: ProtocolType.h:237
Definition: PointerVector.h:24
THandshakeMessage * getHandshakeMessageOfType() const
Definition: SSLLayer.h:482
Definition: SSLLayer.h:370