PcapPlusPlus  22.11
pcpp::SSLServerKeyExchangeMessage Class Reference

#include <SSLHandshake.h>

Inheritance diagram for pcpp::SSLServerKeyExchangeMessage:
pcpp::SSLHandshakeMessage

Public Member Functions

 SSLServerKeyExchangeMessage (uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
 
uint8_t * getServerKeyExchangeParams () const
 
size_t getServerKeyExchangeParamsLength () 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)
 
static SSLHandshakeMessagecreateHandshakeMessage (uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
 

Detailed Description

Represents SSL/TLS server-key-exchange message (type 12). 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

◆ SSLServerKeyExchangeMessage()

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

C'tor for this class. Currently only in use in SSLHandshakeMessage::createHandshakeMessage() 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

◆ getServerKeyExchangeParams()

uint8_t* pcpp::SSLServerKeyExchangeMessage::getServerKeyExchangeParams ( ) const
Returns
A pointer to the raw data of the server key exchange params. Currently this data can only 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

◆ getServerKeyExchangeParamsLength()

size_t pcpp::SSLServerKeyExchangeMessage::getServerKeyExchangeParamsLength ( ) 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 total size of params)

◆ toString()

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

Implements pcpp::SSLHandshakeMessage.