PcapPlusPlus  21.05
pcpp::SSLClientKeyExchangeMessage Class Reference

#include <SSLHandshake.h>

Inheritance diagram for pcpp::SSLClientKeyExchangeMessage:
pcpp::SSLHandshakeMessage

Public Member Functions

 SSLClientKeyExchangeMessage (uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
 
uint8_t * getClientKeyExchangeParams () const
 
size_t getClientKeyExchangeParamsLength () const
 
std::string toString () const
 
- Public Member Functions inherited from pcpp::SSLHandshakeMessage
virtual SSLHandshakeType getHandshakeType () const
 
virtual size_t getMessageLength () const
 
virtual bool isMessageComplete () const
 
SSLHandshakeLayergetContainingLayer () const
 

Additional Inherited Members

- Static Public Member Functions inherited from pcpp::SSLHandshakeMessage
static SSLHandshakeMessagecreateHandhakeMessage (uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
 

Detailed Description

Represents SSL/TLS client-key-exchange message (type 16). Inherits from SSLHandshakeMessage and adds parsing functionality such as getting the server key exchange params as raw data (parsing of this may be added in the future)

Constructor & Destructor Documentation

◆ SSLClientKeyExchangeMessage()

pcpp::SSLClientKeyExchangeMessage::SSLClientKeyExchangeMessage ( uint8_t *  data,
size_t  dataLen,
SSLHandshakeLayer container 
)
inline

C'tor for this class. Currently only in use in SSLHandshakeMessage::createHandhakeMessage() and should be used by a user

Parameters
[in]dataThe message as raw data
[in]dataLenMessage raw data length in bytes
[in]containerThe SSL handshake layer which shall contain this message

Member Function Documentation

◆ getClientKeyExchangeParams()

uint8_t* pcpp::SSLClientKeyExchangeMessage::getClientKeyExchangeParams ( ) const
Returns
A pointer to the raw data of the server key exchange params. Currently this data can only be returned as raw, parsing may be added in the future. Notice that if the message is spread over more than 1 packet in a way params doesn't exist in the first packet, NULL will be returned

◆ getClientKeyExchangeParamsLength()

size_t pcpp::SSLClientKeyExchangeMessage::getClientKeyExchangeParamsLength ( ) const
Returns
The size of the params field. Notice that if the message is spread over more than 1 packet in a way the ssl_tls_handshake_layer cannot be parsed from the packet, 0 will be returned. Also, if only part of the params exist in current packet (and the rest are on consequent packets), the size that will be returned is the size of the part that exists in the current packet (and not the total size of params)

◆ toString()

std::string pcpp::SSLClientKeyExchangeMessage::toString ( ) const
virtual
Returns
A string representation of the message type (e.g "Client Hello message")

Implements pcpp::SSLHandshakeMessage.