|
PcapPlusPlus
20.08
|
Go to the documentation of this file. 1 #ifndef PACKETPP_SSL_LAYER
2 #define PACKETPP_SSL_LAYER
179 static inline bool isSSLPort(uint16_t port);
203 static bool IsSSLMessage(uint16_t srcPort, uint16_t dstPort, uint8_t* data,
size_t dataLen,
bool ignorePorts =
false);
257 SSLLayer(uint8_t* data,
size_t dataLen,
Layer* prevLayer,
Packet* packet) :
Layer(data, dataLen, prevLayer, packet) { m_Protocol =
SSL; }
339 template<
class THandshakeMessage>
351 template<
class THandshakeMessage>
385 :
SSLLayer(data, dataLen, prevLayer, packet) {}
417 :
SSLLayer(data, dataLen, prevLayer, packet) {}
459 :
SSLLayer(data, dataLen, prevLayer, packet) {}
485 template<
class THandshakeMessage>
488 size_t vecSize = m_MessageList.size();
489 for (
size_t i = 0; i < vecSize; i++)
492 if (
dynamic_cast<THandshakeMessage*
>(curElem) != NULL)
493 return (THandshakeMessage*)curElem;
501 template<
class THandshakeMessage>
504 size_t vecSize = m_MessageList.size();
508 for (afterIndex = 0; afterIndex < vecSize; afterIndex++)
511 if (curElem == after)
516 if (afterIndex == vecSize)
519 for (
size_t i = afterIndex+1; i < vecSize; i++)
522 if (
dynamic_cast<THandshakeMessage*
>(curElem) != NULL)
523 return (THandshakeMessage*)curElem;
Definition: SSLLayer.h:405
SSLRecordType
Definition: SSLCommon.h:97
Definition: SSLHandshake.h:243
SSLAlertDescription getAlertDescription()
OsiModelLayer
Definition: ProtocolType.h:233
SSLVersion
Definition: SSLCommon.h:112
static std::string sslVersionToString(SSLVersion ver)
Definition: SSLLayer.h:447
SSLAlertLevel getAlertLevel() const
void computeCalculateFields()
Definition: SSLLayer.h:481
const ProtocolType SSL
Definition: ProtocolType.h:133
size_t getHandshakeMessagesCount() const
Definition: SSLLayer.h:324
THandshakeMessage * getNextHandshakeMessageOfType(SSLHandshakeMessage *after) const
Definition: SSLLayer.h:502
static bool IsSSLMessage(uint16_t srcPort, uint16_t dstPort, uint8_t *data, size_t dataLen, bool ignorePorts=false)
std::string toString() const
Definition: SSLLayer.h:171
static bool isSSLPort(uint16_t port)
Definition: SSLLayer.h:533
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:416
void computeCalculateFields()
Definition: SSLLayer.h:361
void computeCalculateFields()
Definition: SSLLayer.h:438
uint8_t * getEncrpytedData() const
size_t getEncrpytedDataLen() const
std::string toString() const
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:254
size_t getHeaderLen() const
SSLRecordType getRecordType() const
SSLChangeCipherSpecLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:384
The main namespace for the PcapPlusPlus lib.
SSLAlertLevel
Definition: SSLCommon.h:160
SSLVersion getRecordVersion() const
Definition: SSLLayer.h:308
std::string toString() const
SSLApplicationDataLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:458
ssl_tls_record_layer * getRecordLayer() const
Definition: SSLLayer.h:229
void computeCalculateFields()
Definition: SSLLayer.h:396
std::string toString() const
@ OsiModelPresentationLayer
Definition: ProtocolType.h:246
Definition: PointerVector.h:24
THandshakeMessage * getHandshakeMessageOfType() const
Definition: SSLLayer.h:486
Definition: SSLLayer.h:373