ServerBump.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 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_SSL_SERVERBUMP_H
10 #define SQUID_SRC_SSL_SERVERBUMP_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 #include "Store.h"
19 #include "XactionStep.h"
20 
21 class ConnStateData;
22 class store_client;
23 class ClientHttpRequest;
24 
25 namespace Ssl
26 {
27 
29 
34 {
36 
37 public:
38  explicit ServerBump(ClientHttpRequest *http, StoreEntry *e = nullptr, Ssl::BumpMode mode = Ssl::bumpServerFirst);
39  ~ServerBump();
42 
44  bool connectedOk() const {return entry && entry->isEmpty();}
45 
47  bool at(const BumpStep stp) const { return step == stp; }
48 
50  bool at(const BumpStep step1, const BumpStep step2) const { return at(step1) || at(step2); }
51 
58  struct {
62  } act;
64 
65 private:
68 };
69 
70 } // namespace Ssl
71 
72 #endif /* SQUID_SRC_SSL_SERVERBUMP_H */
73 
store_client * sc
dummy client to prevent entry trimming
Definition: ServerBump.h:67
BumpMode
Definition: support.h:132
Security::CertErrors * sslErrors() const
SSL [certificate validation] errors.
Definition: ServerBump.cc:66
Ssl::BumpStep step
The SSL bumping step.
Definition: ServerBump.h:63
StoreEntry * entry
Definition: ServerBump.h:54
HttpRequest::Pointer request
faked, minimal request; required by Client API
Definition: ServerBump.h:53
@ bumpServerFirst
Definition: support.h:132
XactionStep
Definition: XactionStep.h:12
void attachServerSession(const Security::SessionPointer &)
Sets the server TLS session object.
Definition: ServerBump.cc:60
Definition: Xaction.cc:39
Ssl::BumpMode step1
The SSL bump mode at step1.
Definition: ServerBump.h:59
std::shared_ptr< SSL > SessionPointer
Definition: Session.h:53
bool at(const BumpStep stp) const
whether we are currently performing the given processing step
Definition: ServerBump.h:47
bool isEmpty() const
Definition: Store.h:65
Ssl::BumpMode step2
The SSL bump mode at step2.
Definition: ServerBump.h:60
Ssl::BumpMode step3
The SSL bump mode at step3.
Definition: ServerBump.h:61
Security::CertPointer serverCert
Definition: ServerBump.h:57
bool connectedOk() const
whether there was a successful connection to (and peeking at) the origin server
Definition: ServerBump.h:44
struct Ssl::ServerBump::@110 act
bumping actions at various bumping steps
Security::SessionPointer serverSession
The TLS session object on server side.
Definition: ServerBump.h:66
CBDATA_CLASS(ServerBump)
ServerBump(ClientHttpRequest *http, StoreEntry *e=nullptr, Ssl::BumpMode mode=Ssl::bumpServerFirst)
Definition: ServerBump.cc:23
bool at(const BumpStep step1, const BumpStep step2) const
whether we are currently performing one of the given processing steps
Definition: ServerBump.h:50

 

Introduction

Documentation

Support

Miscellaneous