PcapPlusPlus  24.09
pcpp::SSLx509Certificate Class Reference

#include <SSLHandshake.h>

Public Member Functions

 SSLx509Certificate (uint8_t *data, size_t dataLen, bool allDataExists)
 
uint8_t * getData () const
 
size_t getDataLength () const
 
Asn1SequenceRecordgetRootAsn1Record ()
 
bool allDataExists () const
 

Detailed Description

Represents a x509v3 certificate. the SSLCertificateMessage class returns an instance of this class as the certificate. Currently this class doesn't do much as it doesn't parse the certificate. It only acts as container to the raw data and returns general info as data as raw, length, etc. In the future I may add full parsing of the certificate

Constructor & Destructor Documentation

◆ SSLx509Certificate()

pcpp::SSLx509Certificate::SSLx509Certificate ( uint8_t *  data,
size_t  dataLen,
bool  allDataExists 
)
inline

C'tor for this class

Parameters
[in]dataThe raw data of the certificate
[in]dataLenThe length in bytes of the raw data
[in]allDataExistsCertificate messages usually spread on more than 1 packet. So a certificate is likely to split between 2 packets or more. This field indicates whether the raw data contains all certificate data of just a part of it

Member Function Documentation

◆ allDataExists()

bool pcpp::SSLx509Certificate::allDataExists ( ) const
inline

Certificate messages usually spread on more than 1 packet. So a certificate is likely to split between 2 packets or more. This method provides an indication whether all certificate data exists or only part of it

Returns
True if this data contains all certificate data, false otherwise

◆ getData()

uint8_t* pcpp::SSLx509Certificate::getData ( ) const
inline
Returns
A pointer to the raw data

◆ getDataLength()

size_t pcpp::SSLx509Certificate::getDataLength ( ) const
inline
Returns
Raw data length

◆ getRootAsn1Record()

Asn1SequenceRecord* pcpp::SSLx509Certificate::getRootAsn1Record ( )
Returns
The root ASN.1 record of the certificate data. All of the certificate data will be under this record. If the Root ASN.1 record is malformed, an exception is thrown