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 ( )
default

◆ CommunicationSecrets() [2/2]

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

Definition at line 19 of file CommunicationSecrets.cc.

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

Member Function Documentation

◆ getClientRandom()

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

Definition at line 112 of file CommunicationSecrets.cc.

References IgnorePlaceholder(), and SSL_get_client_random().

Referenced by CommunicationSecrets().

◆ getMasterKey()

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

Definition at line 142 of file CommunicationSecrets.cc.

References IgnorePlaceholder(), and SSL_SESSION_get_master_key().

Referenced by CommunicationSecrets().

◆ getSessionId()

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

Definition at line 129 of file CommunicationSecrets.cc.

References IgnorePlaceholder(), and SSL_SESSION_get_id().

Referenced by CommunicationSecrets().

◆ gotAll()

bool Security::CommunicationSecrets::gotAll ( ) const

Definition at line 36 of file CommunicationSecrets.cc.

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

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

Definition at line 42 of file CommunicationSecrets.cc.

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

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

◆ record()

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

Definition at line 75 of file CommunicationSecrets.cc.

References PrintSecret().

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

Member Data Documentation

◆ id

SBuf Security::CommunicationSecrets::id
private

Definition at line 48 of file CommunicationSecrets.h.

Referenced by learnNew().

◆ key

SBuf Security::CommunicationSecrets::key
private

Definition at line 50 of file CommunicationSecrets.h.

Referenced by learnNew().

◆ random

SBuf Security::CommunicationSecrets::random
private

Definition at line 49 of file CommunicationSecrets.h.

Referenced by learnNew().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors