PeekingPeerConnector.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2019 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_PEEKINGPEERCONNECTOR_H
10 #define SQUID_SRC_SSL_PEEKINGPEERCONNECTOR_H
11 
12 #include "security/PeerConnector.h"
13 
14 #if USE_OPENSSL
15 
16 namespace Ssl
17 {
18 
22 public:
24  const Comm::ConnectionPointer &aServerConn,
25  const Comm::ConnectionPointer &aClientConn,
26  AsyncCall::Pointer &aCallback,
27  const AccessLogEntryPointer &alp,
28  const time_t timeout = 0) :
29  AsyncJob("Ssl::PeekingPeerConnector"),
30  Security::PeerConnector(aServerConn, aCallback, alp, timeout),
31  clientConn(aClientConn),
32  splice(false),
35  {
36  request = aRequest;
37  }
38 
39  /* Security::PeerConnector API */
40  virtual bool initialize(Security::SessionPointer &);
42  virtual void noteWantWrite();
43  virtual void noteNegotiationError(const int result, const int ssl_error, const int ssl_lib_error);
44  virtual void noteNegotiationDone(ErrorState *error);
45 
49 
52  void checkForPeekAndSplice();
53 
56 
58  void checkForPeekAndSpliceMatched(const Ssl::BumpMode finalMode);
59 
62 
66 
68  static void cbCheckForPeekAndSpliceDone(allow_t answer, void *data);
69 
70 private:
71 
74 
77  bool splice;
80 };
81 
82 } // namespace Ssl
83 
84 #endif /* USE_OPENSSL */
85 #endif /* SQUID_SRC_SSL_PEEKINGPEERCONNECTOR_H */
86 
Ssl::BumpMode checkForPeekAndSpliceGuess() const
Guesses the final bumping decision when no ssl_bump rules match.
CBDATA_CLASS(PeekingPeerConnector)
void tunnelInsteadOfNegotiating()
Inform caller class that the SSL negotiation aborted.
static void cbCheckForPeekAndSpliceDone(allow_t answer, void *data)
A wrapper function for checkForPeekAndSpliceDone for use with acl.
virtual void noteNegotiationDone(ErrorState *error)
bool splice
whether we are going to splice or not
Definition: Acl.h:113
PeerConnector(const Comm::ConnectionPointer &aServerConn, AsyncCall::Pointer &aCallback, const AccessLogEntryPointer &alp, const time_t timeout=0)
void error(char *format,...)
Comm::ConnectionPointer clientConn
TCP connection to the client.
A PeerConnector for HTTP origin servers. Capable of SslBumping.
virtual Security::ContextPointer getTlsContext()
void const char HLPCB void * data
Definition: stub_helper.cc:16
PeekingPeerConnector(HttpRequestPointer &aRequest, const Comm::ConnectionPointer &aServerConn, const Comm::ConnectionPointer &aClientConn, AsyncCall::Pointer &aCallback, const AccessLogEntryPointer &alp, const time_t timeout=0)
virtual bool initialize(Security::SessionPointer &)
bool serverCertificateHandled
whether handleServerCertificate() succeeded
std::shared_ptr< SSL_CTX > ContextPointer
Definition: Context.h:29
Network/connection security abstraction layer.
Definition: Connection.h:31
void checkForPeekAndSpliceDone(allow_t answer)
Callback function for ssl_bump acl check in step3 SSL bump step.
AsyncCall::Pointer closeHandler
we call this when the connection closed
HttpRequestPointer request
peer connection trigger or cause
bool resumingSession
whether it is an SSL resuming session connection
Definition: Xaction.cc:47
virtual void noteNegotiationError(const int result, const int ssl_error, const int ssl_lib_error)
BumpMode
Definition: support.h:135
void checkForPeekAndSpliceMatched(const Ssl::BumpMode finalMode)
Handles the final bumping decision.
#define false
Definition: GnuRegex.c:233
std::shared_ptr< SSL > SessionPointer
Definition: Session.h:42

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors