#include <bio.h>


Public Member Functions | |
ClientBio (const int anFd) | |
virtual void | stateChanged (const SSL *ssl, int where, int ret) |
virtual int | write (const char *buf, int size, BIO *table) |
The ClientBio version of the Ssl::Bio::write method. More... | |
virtual int | read (char *buf, int size, BIO *table) |
void | hold (bool h) |
Prevents or allow writting on socket. More... | |
void | setReadBufData (SBuf &data) |
virtual void | flush (BIO *table) |
int | fd () const |
The SSL socket descriptor. More... | |
const SBuf & | rBufData () |
The buffered input data. More... | |
Static Public Member Functions | |
static BIO * | Create (const int fd, Security::Io::Type type) |
static void | Link (SSL *ssl, BIO *bio) |
Tells ssl connection to use BIO and monitor state via stateChanged() More... | |
Protected Attributes | |
const int | fd_ |
the SSL socket we are reading and writing More... | |
SBuf | rbuf |
Used to buffer input data. More... | |
Private Attributes | |
bool | holdRead_ |
The read hold state of the bio. More... | |
bool | holdWrite_ |
The write hold state of the bio. More... | |
int | helloSize |
The SSL hello message sent by client size. More... | |
FadingCounter | renegotiations |
client requested renegotiations limit control More... | |
const char * | abortReason |
why we should terminate the connection during next TLS operation (or nil) More... | |
Static Private Attributes | |
static const time_t | RenegotiationsWindow = 10 |
approximate size of a time window for computing client-initiated renegotiation rate (in seconds) More... | |
static const int | RenegotiationsLimit = 5 |
the maximum tolerated number of client-initiated renegotiations in RenegotiationsWindow More... | |
Detailed Description
BIO node to handle socket IO for squid client side If bumping is enabled this Bio detects and analyses client hello message to retrieve the SSL features supported by the client
Constructor & Destructor Documentation
◆ ClientBio()
|
explicit |
Definition at line 167 of file bio.cc.
References FadingCounter::configure(), and renegotiations.
Member Function Documentation
◆ Create()
|
staticinherited |
Creates a low-level BIO table, creates a high-level Ssl::Bio object for a given socket, and then links the two together via BIO_C_SET_FD.
Definition at line 62 of file bio.cc.
References NULL, squid_bio_create(), squid_bio_ctrl(), squid_bio_destroy(), squid_bio_puts(), squid_bio_read(), squid_bio_write(), and SquidMethods.
Referenced by CreateSession(), and Ssl::Bio::fd().
◆ fd()
|
inlineinherited |
Definition at line 49 of file bio.h.
References Ssl::Bio::Create(), Ssl::Bio::fd_, Ssl::Bio::Link(), Ssl::Bio::stateChanged(), and type.
Referenced by squid_bio_ctrl().
◆ flush()
|
inlinevirtualinherited |
Flushes any buffered data to socket. The Ssl::Bio does not buffer any data, so this method has nothing to do
Reimplemented in Ssl::ServerBio.
Definition at line 47 of file bio.h.
Referenced by squid_bio_ctrl().
◆ hold()
|
inline |
Definition at line 86 of file bio.h.
Referenced by ConnStateData::doPeekAndSpliceStep(), and ConnStateData::startPeekAndSplice().
◆ Link()
|
staticinherited |
Definition at line 88 of file bio.cc.
References squid_ssl_info().
Referenced by CreateSession(), and Ssl::Bio::fd().
◆ rBufData()
|
inlineinherited |
Definition at line 61 of file bio.h.
References Ssl::Bio::rbuf.
Referenced by Ssl::PeekingPeerConnector::initialize(), and switchToTunnel().
◆ read()
The ClientBio version of the Ssl::Bio::read method If the holdRead flag is true then it does not write any data to socket and sets the "read retry" flag of the BIO to true
Reimplemented from Ssl::Bio.
Definition at line 216 of file bio.cc.
References abortReason, SBuf::consume(), debugs, Ssl::Bio::fd_, holdRead_, int, SBuf::isEmpty(), SBuf::length(), SBuf::rawContent(), Ssl::Bio::rbuf, Ssl::Bio::read(), and size.
◆ setReadBufData()
|
inline |
Sets the buffered input data (Bio::rbuf). Used to pass payload data (normally client HELLO data) retrieved by the caller.
Definition at line 91 of file bio.h.
References data, and Ssl::Bio::rbuf.
Referenced by ConnStateData::getSslContextDone(), and ConnStateData::startPeekAndSplice().
◆ stateChanged()
The ClientBio version of the Ssl::Bio::stateChanged method When the client hello message retrieved, fill the "features" member with the client provided informations.
Reimplemented from Ssl::Bio.
Definition at line 178 of file bio.cc.
References abortReason, FadingCounter::count(), DBG_IMPORTANT, debugs, Ssl::Bio::fd_, fd_table, FadingCounter::remembered(), renegotiations, RenegotiationsLimit, RenegotiationsWindow, and Ssl::Bio::stateChanged().
◆ write()
Reimplemented from Ssl::Bio.
Definition at line 199 of file bio.cc.
References abortReason, debugs, Ssl::Bio::fd_, holdWrite_, and Ssl::Bio::write().
Member Data Documentation
◆ abortReason
|
private |
Definition at line 105 of file bio.h.
Referenced by read(), stateChanged(), and write().
◆ fd_
|
protectedinherited |
Definition at line 63 of file bio.h.
Referenced by Ssl::Bio::Bio(), Ssl::Bio::fd(), Ssl::Bio::read(), read(), Ssl::ServerBio::readAndParse(), Ssl::Bio::stateChanged(), stateChanged(), Ssl::Bio::write(), write(), Ssl::ServerBio::write(), and Ssl::Bio::~Bio().
◆ helloSize
◆ holdRead_
◆ holdWrite_
|
private |
◆ rbuf
|
protectedinherited |
Definition at line 64 of file bio.h.
Referenced by Ssl::ServerBio::giveBuffered(), Ssl::Bio::rBufData(), read(), Ssl::ServerBio::readAndBuffer(), Ssl::ServerBio::readAndGive(), Ssl::ServerBio::readAndParse(), and setReadBufData().
◆ renegotiations
|
private |
Definition at line 102 of file bio.h.
Referenced by ClientBio(), and stateChanged().
◆ RenegotiationsLimit
|
staticprivate |
Definition at line 97 of file bio.h.
Referenced by stateChanged().
◆ RenegotiationsWindow
|
staticprivate |
Definition at line 94 of file bio.h.
Referenced by stateChanged().
The documentation for this class was generated from the following files: