CommunicationSecrets.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_SRC_SECURITY_COMMUNICATION_SECRETS_H
10#define SQUID_SRC_SECURITY_COMMUNICATION_SECRETS_H
11
12#include "sbuf/SBuf.h"
13#include "security/Session.h"
14
15#include <iosfwd>
16
17namespace Security {
18
22{
23public:
25 explicit CommunicationSecrets(const Connection &sconn);
26
28 bool gotAll() const;
29
33 bool learnNew(const CommunicationSecrets &news);
34
36 void record(std::ostream &) const;
37
38private:
39#if USE_OPENSSL
40 void getClientRandom(const Connection &sconn);
41 void getSessionId(const Session &session);
42 void getMasterKey(const Session &session);
43#else
44 // Secret extraction is not supported in builds using other TLS libraries.
45 // Secret extraction is impractical in builds without TLS libraries.
46#endif
47
51};
52
53} // namespace Security
54
55#endif /* SQUID_SRC_SECURITY_COMMUNICATION_SECRETS_H */
56
Definition: SBuf.h:94
SBuf key
TLS session (pre-)master key.
SBuf random
CLIENT_RANDOM from the TLS connection.
void getClientRandom(const Connection &sconn)
void getMasterKey(const Session &session)
void getSessionId(const Session &session)
bool learnNew(const CommunicationSecrets &news)
void record(std::ostream &) const
logs all known secrets using a (multiline) SSLKEYLOGFILE format
bool gotAll() const
whether we know all the secrets that could be extracted
Network/connection security abstraction layer.
Definition: Connection.h:34
SSL_SESSION Session
Definition: Session.h:47
SSL Connection
Definition: Session.h:45

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors