1 #ifndef PACKETPP_SSL_LAYER 2 #define PACKETPP_SSL_LAYER 196 static bool IsSSLMessage(uint16_t srcPort, uint16_t dstPort, uint8_t* data,
size_t dataLen);
255 SSLLayer(uint8_t* data,
size_t dataLen,
Layer* prevLayer,
Packet* packet) :
Layer(data, dataLen, prevLayer, packet) { m_Protocol =
SSL; }
337 template<
class THandshakeMessage>
349 template<
class THandshakeMessage>
383 :
SSLLayer(data, dataLen, prevLayer, packet) {}
415 :
SSLLayer(data, dataLen, prevLayer, packet) {}
457 :
SSLLayer(data, dataLen, prevLayer, packet) {}
482 template<
class THandshakeMessage>
485 size_t vecSize = m_MessageList.size();
486 for (
size_t i = 0; i < vecSize; i++)
489 if (dynamic_cast<THandshakeMessage*>(curElem) != NULL)
490 return (THandshakeMessage*)curElem;
497 template<
class THandshakeMessage>
500 size_t vecSize = m_MessageList.size();
504 for (afterIndex = 0; afterIndex < vecSize; afterIndex++)
507 if (curElem == after)
512 if (afterIndex == vecSize)
515 for (
size_t i = afterIndex+1; i < vecSize; i++)
518 if (dynamic_cast<THandshakeMessage*>(curElem) != NULL)
519 return (THandshakeMessage*)curElem;
void computeCalculateFields()
Definition: SSLLayer.h:436
static SSLLayer * createSSLMessage(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
void computeCalculateFields()
Definition: SSLLayer.h:394
SSLAlertLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:414
SSLAlertDescription
Definition: SSLCommon.h:173
OsiModelLayer getOsiModelLayer()
Definition: SSLLayer.h:252
Definition: SSLLayer.h:173
SSLAlertDescription getAlertDescription()
Definition: PointerVector.h:24
Definition: SSLCommon.h:22
static std::string sslVersionToString(SSLVersion ver)
Definition: SSLLayer.h:371
static bool IsSSLMessage(uint16_t srcPort, uint16_t dstPort, uint8_t *data, size_t dataLen)
SSLVersion getRecordVersion()
SSLHandshakeMessage * getHandshakeMessageAt(int index)
Definition: ProtocolType.h:131
SSLRecordType getRecordType()
static const std::map< uint16_t, bool > * getSSLPortMap()
Definition: SSLHandshake.h:243
SSLAlertLevel
Definition: SSLCommon.h:160
void computeCalculateFields()
Definition: SSLLayer.h:359
SSLRecordType
Definition: SSLCommon.h:97
OsiModelLayer
Definition: ProtocolType.h:213
SSLChangeCipherSpecLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:382
Definition: SSLLayer.h:445
Definition: SSLLayer.h:306
size_t getHandshakeMessagesCount()
THandshakeMessage * getNextHandshakeMessageOfType(SSLHandshakeMessage *after)
Definition: SSLLayer.h:498
SSLApplicationDataLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
Definition: SSLLayer.h:456
Definition: SSLLayer.h:403
THandshakeMessage * getHandshakeMessageOfType()
Definition: SSLLayer.h:483
Definition: ProtocolType.h:226
ssl_tls_record_layer * getRecordLayer()
Definition: SSLLayer.h:227
SSLHandshakeLayer(uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
SSLVersion
Definition: SSLCommon.h:112
uint8_t * getEncrpytedData()
The main namespace for the PcapPlusPlus lib.
SSLAlertLevel getAlertLevel()
void computeCalculateFields()
Definition: SSLLayer.h:479
size_t getEncrpytedDataLen()