#include <bio.h>

Inheritance diagram for Ssl::ClientBio:
Collaboration diagram for Ssl::ClientBio:

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 SBufrBufData ()
 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

Definition at line 67 of file bio.h.

Constructor & Destructor Documentation

Ssl::ClientBio::ClientBio ( const int  anFd)
explicit

Definition at line 171 of file bio.cc.

References FadingCounter::configure(), and renegotiations.

Member Function Documentation

BIO * Ssl::Bio::Create ( const int  fd,
Security::Io::Type  type 
)
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 66 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().

int Ssl::Bio::fd ( ) const
inlineinherited

Definition at line 46 of file bio.h.

References Ssl::Bio::fd_.

Referenced by squid_bio_ctrl().

virtual void Ssl::Bio::flush ( BIO *  table)
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 44 of file bio.h.

Referenced by squid_bio_ctrl().

void Ssl::ClientBio::hold ( bool  h)
inline

Definition at line 83 of file bio.h.

References holdRead_, and holdWrite_.

Referenced by ConnStateData::doPeekAndSpliceStep(), and ConnStateData::startPeekAndSplice().

void Ssl::Bio::Link ( SSL *  ssl,
BIO *  bio 
)
staticinherited

Definition at line 92 of file bio.cc.

References squid_ssl_info().

Referenced by CreateSession().

const SBuf& Ssl::Bio::rBufData ( )
inlineinherited

Definition at line 58 of file bio.h.

References Ssl::Bio::rbuf.

Referenced by Ssl::PeekingPeerConnector::initialize(), and switchToTunnel().

int Ssl::ClientBio::read ( char *  buf,
int  size,
BIO *  table 
)
virtual

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 220 of file bio.cc.

References debugs, int, and Ssl::Bio::read().

void Ssl::ClientBio::setReadBufData ( SBuf data)
inline

Sets the buffered input data (Bio::rbuf). Used to pass payload data (normally client HELLO data) retrieved by the caller.

Definition at line 88 of file bio.h.

References data, and Ssl::Bio::rbuf.

Referenced by ConnStateData::getSslContextDone(), and ConnStateData::startPeekAndSplice().

void Ssl::ClientBio::stateChanged ( const SSL *  ssl,
int  where,
int  ret 
)
virtual

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 182 of file bio.cc.

References DBG_IMPORTANT, debugs, fd_table, and Ssl::Bio::stateChanged().

int Ssl::ClientBio::write ( const char *  buf,
int  size,
BIO *  table 
)
virtual

Reimplemented from Ssl::Bio.

Definition at line 203 of file bio.cc.

References debugs, and Ssl::Bio::write().

Member Data Documentation

const char* Ssl::ClientBio::abortReason
private

Definition at line 102 of file bio.h.

const int Ssl::Bio::fd_
protectedinherited

Definition at line 60 of file bio.h.

Referenced by Ssl::Bio::Bio(), and Ssl::Bio::fd().

int Ssl::ClientBio::helloSize
private

Definition at line 98 of file bio.h.

bool Ssl::ClientBio::holdRead_
private

Definition at line 96 of file bio.h.

Referenced by hold().

bool Ssl::ClientBio::holdWrite_
private

Definition at line 97 of file bio.h.

Referenced by hold().

SBuf Ssl::Bio::rbuf
protectedinherited

Definition at line 61 of file bio.h.

Referenced by Ssl::Bio::rBufData(), and setReadBufData().

FadingCounter Ssl::ClientBio::renegotiations
private

Definition at line 99 of file bio.h.

Referenced by ClientBio().

const int Ssl::ClientBio::RenegotiationsLimit = 5
staticprivate

Definition at line 94 of file bio.h.

const time_t Ssl::ClientBio::RenegotiationsWindow = 10
staticprivate

Definition at line 91 of file bio.h.


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors