PeekingPeerConnector.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_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,
27  const AccessLogEntryPointer &alp,
28  time_t timeout = 0);
29 
30  /* Security::PeerConnector API */
31  bool initialize(Security::SessionPointer &) override;
32  Security::FuturePeerContext *peerContext() const override;
33  void noteWantWrite() override;
35  void noteNegotiationDone(ErrorState *error) override;
36 
40 
43  void checkForPeekAndSplice();
44 
47 
49  void checkForPeekAndSpliceMatched(const Ssl::BumpMode finalMode);
50 
53 
57 
59  void startTunneling();
60 
62  static void cbCheckForPeekAndSpliceDone(Acl::Answer, void *data);
63 
64 private:
65 
68 
71  bool splice;
73 };
74 
75 } // namespace Ssl
76 
77 #endif /* USE_OPENSSL */
78 #endif /* SQUID_SRC_SSL_PEEKINGPEERCONNECTOR_H */
79 
void startTunneling()
Abruptly stops TLS negotiation and starts tunneling.
void noteNegotiationDone(ErrorState *error) override
void error(char *format,...)
BumpMode
Definition: support.h:132
Ssl::BumpMode checkForPeekAndSpliceGuess() const
Guesses the final bumping decision when no ssl_bump rules match.
A combination of PeerOptions and the corresponding Context.
Definition: PeerOptions.h:154
A PeerConnector for HTTP origin servers. Capable of SslBumping.
PeekingPeerConnector(HttpRequestPointer &aRequest, const Comm::ConnectionPointer &aServerConn, const Comm::ConnectionPointer &aClientConn, const AsyncCallback< Security::EncryptorAnswer > &aCallback, const AccessLogEntryPointer &alp, time_t timeout=0)
bool splice
whether we are going to splice or not
Definition: Xaction.cc:39
AsyncCall::Pointer closeHandler
we call this when the connection closed
Security::FuturePeerContext * peerContext() const override
Comm::ConnectionPointer clientConn
TCP connection to the client.
bool serverCertificateHandled
whether handleServerCertificate() succeeded
CBDATA_CHILD(PeekingPeerConnector)
std::shared_ptr< SSL > SessionPointer
Definition: Session.h:53
void checkForPeekAndSpliceDone(Acl::Answer)
Callback function for ssl_bump acl check in step3 SSL bump step.
static void cbCheckForPeekAndSpliceDone(Acl::Answer, void *data)
A wrapper function for checkForPeekAndSpliceDone for use with acl.
bool initialize(Security::SessionPointer &) override
void checkForPeekAndSpliceMatched(const Ssl::BumpMode finalMode)
Handles the final bumping decision.
void noteNegotiationError(const Security::ErrorDetailPointer &) override
Called when the SSL_connect function aborts with an SSL negotiation error.
void tunnelInsteadOfNegotiating()
Inform caller class that the SSL negotiation aborted.

 

Introduction

Documentation

Support

Miscellaneous