]> git.ipfire.org Git - thirdparty/squid.git/blame - src/security/EncryptorAnswer.h
Maintenance: automate header guards 2/3 (#1655)
[thirdparty/squid.git] / src / security / EncryptorAnswer.h
CommitLineData
fcfdf7f9 1/*
b8ae064d 2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
fcfdf7f9
AJ
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
ff9d9458
FC
9#ifndef SQUID_SRC_SECURITY_ENCRYPTORANSWER_H
10#define SQUID_SRC_SECURITY_ENCRYPTORANSWER_H
fcfdf7f9
AJ
11
12#include "base/CbcPointer.h"
a7b75c64 13#include "comm/Connection.h"
fcfdf7f9
AJ
14
15class ErrorState;
16
17namespace Security {
18
19/// Peer encrypted connection setup results (supplied via a callback).
20/// The connection to peer was secured if and only if the error member is nil.
21class EncryptorAnswer
22{
23public:
56753478 24 EncryptorAnswer(): tunneled(false) {}
fcfdf7f9
AJ
25 ~EncryptorAnswer(); ///< deletes error if it is still set
26 Comm::ConnectionPointer conn; ///< peer connection (secured on success)
27
2f8abb64 28 /// answer recipients must clear the error member in order to keep its info
fcfdf7f9
AJ
29 /// XXX: We should refcount ErrorState instead of cbdata-protecting it.
30 CbcPointer<ErrorState> error; ///< problem details (nil on success)
56753478
CT
31
32 /// whether we spliced the connections instead of negotiating encryption
33 bool tunneled;
fcfdf7f9
AJ
34};
35
25ecffe5 36std::ostream &operator <<(std::ostream &, const EncryptorAnswer &);
fcfdf7f9 37
2f8abb64 38} // namespace Security
fcfdf7f9 39
ff9d9458 40#endif /* SQUID_SRC_SECURITY_ENCRYPTORANSWER_H */
fcfdf7f9 41