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