PcapPlusPlus
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 ()
 
size_t getClientKeyExchangeParamsLength ()
 
std::string toString ()
 
- Public Member Functions inherited from pcpp::SSLHandshakeMessage
virtual SSLHandshakeType getHandshakeType ()
 
virtual size_t getMessageLength ()
 
virtual bool isMessageComplete ()
 
SSLHandshakeLayergetContainingLayer ()
 

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

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

uint8_t* pcpp::SSLClientKeyExchangeMessage::getClientKeyExchangeParams ( )
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
size_t pcpp::SSLClientKeyExchangeMessage::getClientKeyExchangeParamsLength ( )
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)
std::string pcpp::SSLClientKeyExchangeMessage::toString ( )
virtual
Returns
A string representation of the message type (e.g "Client Hello message")

Implements pcpp::SSLHandshakeMessage.