#include <CommunicationSecrets.h>
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]
|
default |
◆ CommunicationSecrets() [2/2]
|
explicit |
Definition at line 19 of file CommunicationSecrets.cc.
References getClientRandom(), getMasterKey(), and getSessionId().
Member Function Documentation
◆ getClientRandom()
|
private |
Definition at line 112 of file CommunicationSecrets.cc.
References IgnorePlaceholder(), and SSL_get_client_random().
Referenced by CommunicationSecrets().
◆ getMasterKey()
|
private |
Definition at line 142 of file CommunicationSecrets.cc.
References IgnorePlaceholder(), and SSL_SESSION_get_master_key().
Referenced by CommunicationSecrets().
◆ getSessionId()
|
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
|
private |
Definition at line 48 of file CommunicationSecrets.h.
Referenced by learnNew().
◆ key
|
private |
Definition at line 50 of file CommunicationSecrets.h.
Referenced by learnNew().
◆ random
|
private |
Definition at line 49 of file CommunicationSecrets.h.
Referenced by learnNew().
The documentation for this class was generated from the following files:
- src/security/CommunicationSecrets.h
- src/security/CommunicationSecrets.cc