KeyLogger.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2022 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_KEY_LOGGER_H
10 #define SQUID_SRC_SECURITY_KEY_LOGGER_H
11 
12 #include "acl/forward.h"
14 
15 #include <iosfwd>
16 
17 class MasterXaction;
19 
20 namespace Security {
21 
23 class KeyLogger
24 {
25 public:
28  void checkpoint(const Connection &, const Acl::ChecklistFiller &);
29 
30 private:
32  void maybeLog(const Connection &, const Acl::ChecklistFiller &);
33 
35  bool shouldLog(const Acl::ChecklistFiller &) const;
36 
39 
41  bool done_ = false;
42 
44  mutable bool wanted_ = false;
45 };
46 
47 } // namespace Security
48 
49 inline void
51 {
52  if (!done_)
53  maybeLog(sconn, caller);
54 }
55 
56 #endif /* SQUID_SRC_SECURITY_KEY_LOGGER_H */
57 
void checkpoint(const Connection &, const Acl::ChecklistFiller &)
Definition: KeyLogger.h:50
bool wanted_
whether we know that the admin wants us to log this connection keys
Definition: KeyLogger.h:44
CommunicationSecrets secrets
connection secrets learned so far
Definition: KeyLogger.h:38
manages collecting and logging secrets of a TLS connection to tls_key_log
Definition: KeyLogger.h:24
SSL Connection
Definition: Session.h:45
void maybeLog(const Connection &, const Acl::ChecklistFiller &)
(slowly checks logging preconditions and) logs if possible
Definition: KeyLogger.cc:22
RefCount< MasterXaction > MasterXactionPointer
Definition: KeyLogger.h:17
bool shouldLog(const Acl::ChecklistFiller &) const
(slowly checks) whether logging is possible now
Definition: KeyLogger.cc:44
Network/connection security abstraction layer.
Definition: Connection.h:34
bool done_
whether to prevent further logging attempts
Definition: KeyLogger.h:41
an interface for those capable of configuring an ACLFilledChecklist object

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors