PcapPlusPlus
pcpp::SSLApplicationDataLayer Class Reference

#include <SSLLayer.h>

Inheritance diagram for pcpp::SSLApplicationDataLayer:
pcpp::SSLLayer pcpp::Layer pcpp::IDataContainer

Public Member Functions

 SSLApplicationDataLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
uint8_t * getEncrpytedData ()
 
size_t getEncrpytedDataLen ()
 
std::string toString ()
 
void computeCalculateFields ()
 
- Public Member Functions inherited from pcpp::SSLLayer
ssl_tls_record_layergetRecordLayer ()
 
SSLVersion getRecordVersion ()
 
SSLRecordType getRecordType ()
 
size_t getHeaderLen ()
 
void parseNextLayer ()
 
OsiModelLayer getOsiModelLayer ()
 
- Public Member Functions inherited from pcpp::Layer
virtual ~Layer ()
 
LayergetNextLayer ()
 
LayergetPrevLayer ()
 
ProtocolType getProtocol ()
 
uint8_t * getData ()
 
size_t getDataLen ()
 
uint8_t * getLayerPayload ()
 
size_t getLayerPayloadSize ()
 
bool isAllocatedToPacket ()
 
void copyData (uint8_t *toArr)
 
uint8_t * getDataPtr (size_t offset=0)
 

Additional Inherited Members

- Static Public Member Functions inherited from pcpp::SSLLayer
static bool IsSSLMessage (uint16_t srcPort, uint16_t dstPort, uint8_t *data, size_t dataLen)
 
static SSLLayercreateSSLMessage (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
static std::string sslVersionToString (SSLVersion ver)
 
static const std::map< uint16_t, bool > * getSSLPortMap ()
 

Detailed Description

Represents SSL/TLS application data layer. This message contains the encrypted data transfered from client to server and vice-versa after the SSL/TLS handshake was completed successfully

Constructor & Destructor Documentation

◆ SSLApplicationDataLayer()

pcpp::SSLApplicationDataLayer::SSLApplicationDataLayer ( uint8_t *  data,
size_t  dataLen,
Layer prevLayer,
Packet packet 
)
inline

C'tor for this class that creates the layer from an existing packet raw data

Parameters
[in]dataA pointer to the raw data
[in]dataLenSize of the data in bytes
[in]prevLayerA pointer to the previous layer
[in]packetA pointer to the Packet instance where layer will be stored in

Member Function Documentation

◆ computeCalculateFields()

void pcpp::SSLApplicationDataLayer::computeCalculateFields ( )
inlinevirtual

There are no calculated fields for this layer

Implements pcpp::Layer.

◆ getEncrpytedData()

uint8_t* pcpp::SSLApplicationDataLayer::getEncrpytedData ( )
Returns
A pointer to the encrypted data. This data can be decrypted only if you have the symmetric key that was agreed between the client and the server during SSL/TLS handshake process

◆ getEncrpytedDataLen()

size_t pcpp::SSLApplicationDataLayer::getEncrpytedDataLen ( )
Returns
The length in bytes of the encrypted data returned in getEncrpytedData()

◆ toString()

std::string pcpp::SSLApplicationDataLayer::toString ( )
virtual
Returns
A string representation of the layer most important data (should look like the layer description in Wireshark)

Implements pcpp::Layer.