]> git.ipfire.org Git - thirdparty/squid.git/blame - src/security/KeyLog.h
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / security / KeyLog.h
CommitLineData
e227da8d 1/*
b8ae064d 2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
e227da8d
AR
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_KEYLOG_H
10#define SQUID_SRC_SECURITY_KEYLOG_H
11
12#include "log/CustomLog.h"
13#include "log/forward.h"
14#include "sbuf/SBuf.h"
15#include "security/forward.h"
16
17namespace Security {
18
19/// a single tls_key_log directive configuration and logging handler
20class KeyLog: public FormattedLog
21{
22public:
23 explicit KeyLog(ConfigParser&);
24
25 /// whether record() preconditions are currently satisfied
26 bool canLog() const { return logfile != nullptr; }
27
28 /// writes a single (but multi-line) key log entry
29 void record(const CommunicationSecrets &);
30
31 /// reproduces explicitly-configured squid.conf settings
32 void dump(std::ostream &) const;
33};
34
35} // namespace Security
36
37#endif /* SQUID_SRC_SECURITY_KEYLOG_H */
38