]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ssl/ServerBump.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / ssl / ServerBump.h
1 /*
2 * Copyright (C) 1996-2014 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_SSL_PEEKER_H
10 #define _SQUID_SSL_PEEKER_H
11
12 #include "base/AsyncJob.h"
13 #include "base/CbcPointer.h"
14 #include "comm/forward.h"
15 #include "HttpRequest.h"
16 #include "ip/Address.h"
17
18 class ConnStateData;
19 class store_client;
20
21 namespace Ssl
22 {
23
24 /**
25 * Maintains bump-server-first related information.
26 */
27 class ServerBump
28 {
29 CBDATA_CLASS(ServerBump);
30
31 public:
32 explicit ServerBump(HttpRequest *fakeRequest, StoreEntry *e = NULL, Ssl::BumpMode mode = Ssl::bumpServerFirst);
33 ~ServerBump();
34
35 /// faked, minimal request; required by Client API
36 HttpRequest::Pointer request;
37 StoreEntry *entry; ///< for receiving Squid-generated error messages
38 Ssl::X509_Pointer serverCert; ///< HTTPS server certificate
39 Ssl::CertErrors *sslErrors; ///< SSL [certificate validation] errors
40 struct {
41 Ssl::BumpMode step1; ///< The SSL bump mode at step1
42 Ssl::BumpMode step2; ///< The SSL bump mode at step2
43 Ssl::BumpMode step3; ///< The SSL bump mode at step3
44 } act; ///< bumping actions at various bumping steps
45 Ssl::BumpStep step; ///< The SSL bumping step
46 SBuf clientSni; ///< the SSL client SNI name
47
48 private:
49 store_client *sc; ///< dummy client to prevent entry trimming
50 };
51
52 } // namespace Ssl
53
54 #endif
55