Security::CommunicationSecrets Class Reference

#include <CommunicationSecrets.h>

Collaboration diagram for Security::CommunicationSecrets:

Public Member Functions

 CommunicationSecrets ()=default
 CommunicationSecrets (const Connection &sconn)
bool gotAll () const
 whether we know all the secrets that could be extracted More...
bool learnNew (const CommunicationSecrets &news)
void record (std::ostream &) const
 logs all known secrets using a (multiline) SSLKEYLOGFILE format More...

Private Member Functions

void getClientRandom (const Connection &sconn)
void getSessionId (const Session &session)
void getMasterKey (const Session &session)

Private Attributes

SBuf id
 TLS session ID. More...
SBuf random
 CLIENT_RANDOM from the TLS connection. More...
SBuf key
 TLS session (pre-)master key. More...

Detailed Description

extracts and formats TLS exchange info for (later) decryption that exchange: early secrets, handshake secrets, (pre)master key, client random, etc.

Definition at line 21 of file CommunicationSecrets.h.

Constructor & Destructor Documentation

◆ CommunicationSecrets() [1/2]

Security::CommunicationSecrets::CommunicationSecrets ( )

◆ CommunicationSecrets() [2/2]

Security::CommunicationSecrets::CommunicationSecrets ( const Connection sconn)

Definition at line 18 of file

References getClientRandom(), getMasterKey(), and getSessionId().

Member Function Documentation

◆ getClientRandom()

void Security::CommunicationSecrets::getClientRandom ( const Connection sconn)

Definition at line 111 of file

References IgnorePlaceholder(), and SSL_get_client_random().

Referenced by CommunicationSecrets().

◆ getMasterKey()

void Security::CommunicationSecrets::getMasterKey ( const Session session)

Definition at line 141 of file

References IgnorePlaceholder(), and SSL_SESSION_get_master_key().

Referenced by CommunicationSecrets().

◆ getSessionId()

void Security::CommunicationSecrets::getSessionId ( const Session session)

Definition at line 128 of file

References IgnorePlaceholder(), and SSL_SESSION_get_id().

Referenced by CommunicationSecrets().

◆ gotAll()

bool Security::CommunicationSecrets::gotAll ( ) const

Definition at line 35 of file

Referenced by Security::KeyLogger::maybeLog().

◆ learnNew()

bool Security::CommunicationSecrets::learnNew ( const CommunicationSecrets news)

copy all new secrets (i.e. previously unknown or changed) while preserving previously known secrets that have disappeared

whether any secrets were copied (i.e. this object has changed)

Definition at line 41 of file

References id, SBuf::isEmpty(), key, and random.

Referenced by Security::KeyLogger::maybeLog().

◆ record()

void Security::CommunicationSecrets::record ( std::ostream &  os) const

Definition at line 74 of file

References PrintSecret().

Referenced by Security::KeyLog::record().

Member Data Documentation

◆ id

SBuf Security::CommunicationSecrets::id

Definition at line 48 of file CommunicationSecrets.h.

Referenced by learnNew().

◆ key

SBuf Security::CommunicationSecrets::key

Definition at line 50 of file CommunicationSecrets.h.

Referenced by learnNew().

◆ random

SBuf Security::CommunicationSecrets::random

Definition at line 49 of file CommunicationSecrets.h.

Referenced by learnNew().

The documentation for this class was generated from the following files:






Web Site Translations