1 #ifndef PACKETPP_SSL_LAYER 2 #define PACKETPP_SSL_LAYER 179 static inline bool isSSLPort(uint16_t port);
208 static bool IsSSLMessage(uint16_t srcPort, uint16_t dstPort, uint8_t* data,
size_t dataLen,
bool ignorePorts =
false);
255 SSLLayer(uint8_t* data,
size_t dataLen,
Layer* prevLayer,
Packet* packet) :
Layer(data, dataLen, prevLayer, packet) { m_Protocol =
SSL; }
337 template<
class THandshakeMessage>
338 THandshakeMessage* getHandshakeMessageOfType()
const;
349 template<
class THandshakeMessage>
383 :
SSLLayer(data, dataLen, prevLayer, packet) {}
415 :
SSLLayer(data, dataLen, prevLayer, packet) {}
457 :
SSLLayer(data, dataLen, prevLayer, packet) {}
465 uint8_t* getEncryptedData()
const;
470 size_t getEncryptedDataLen()
const;
483 template<
class THandshakeMessage>
486 size_t vecSize = m_MessageList.size();
487 for (
size_t i = 0; i < vecSize; i++)
490 if (dynamic_cast<THandshakeMessage*>(curElem) != NULL)
491 return (THandshakeMessage*)curElem;
499 template<
class THandshakeMessage>
502 size_t vecSize = m_MessageList.size();
506 for (afterIndex = 0; afterIndex < vecSize; afterIndex++)
509 if (curElem == after)
514 if (afterIndex == vecSize)
517 for (
size_t i = afterIndex+1; i < vecSize; i++)
520 if (dynamic_cast<THandshakeMessage*>(curElem) != NULL)
521 return (THandshakeMessage*)curElem;
SSLAlertLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:414
The main namespace for the PcapPlusPlus lib.
OsiModelLayer
Definition: ProtocolType.h:298
static SSLLayer * createSSLMessage(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:403
static bool IsSSLMessage(uint16_t srcPort, uint16_t dstPort, uint8_t *data, size_t dataLen, bool ignorePorts=false)
THandshakeMessage * getHandshakeMessageOfType() const
Definition: SSLLayer.h:484
const ProtocolType SSL
Definition: ProtocolType.h:133
size_t getHeaderLen() const
Definition: PointerVector.h:24
Definition: SSLLayer.h:306
void computeCalculateFields()
Definition: SSLLayer.h:479
THandshakeMessage * getNextHandshakeMessageOfType(SSLHandshakeMessage *after) const
Definition: SSLLayer.h:500
OsiModelLayer getOsiModelLayer() const
Definition: SSLLayer.h:252
SSLChangeCipherSpecLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:382
Definition: SSLLayer.h:171
void computeCalculateFields()
Definition: SSLLayer.h:359
SSLAlertLevel
Definition: SSLCommon.h:253
SSLAlertDescription
Definition: SSLCommon.h:266
Definition: SSLLayer.h:445
Definition: SSLHandshake.h:318
size_t getHandshakeMessagesCount() const
Definition: SSLLayer.h:322
void computeCalculateFields()
Definition: SSLLayer.h:436
virtual std::string toString() const =0
SSLApplicationDataLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:456
Definition: SSLCommon.h:118
void computeCalculateFields()
Definition: SSLLayer.h:394
static bool isSSLPort(uint16_t port)
Definition: SSLLayer.h:531
Definition: SSLLayer.h:371
Definition: SSLCommon.h:24
ssl_tls_record_layer * getRecordLayer() const
Definition: SSLLayer.h:227
SSLVersion getRecordVersion() const
Definition: ProtocolType.h:311
SSLRecordType getRecordType() const
SSLRecordType
Definition: SSLCommon.h:99