Session.cc
  
Go to the documentation of this file.
  102 CreateSession(const Security::ContextPointer &ctx, const Comm::ConnectionPointer &conn, Security::PeerOptions &opts, Security::Io::Type type, const char *squidCtx)
  118         debugs(83, DBG_IMPORTANT, "ERROR: TLS failure: " << errAction << ": " << Security::ErrorString(errCode));
  127     debugs(83, 5, "gnutls_init " << (type == Security::Io::BIO_TO_SERVER ? "client" : "server" )<< " session=" << (void*)session.get());
  131         debugs(83, DBG_IMPORTANT, "ERROR: TLS failure: " << errAction << ": " << Security::ErrorString(errCode));
  183 Security::CreateClientSession(FuturePeerContext &ctx, const Comm::ConnectionPointer &c, const char *squidCtx)
  194 Security::CreateServerSession(const Security::ContextPointer &ctx, const Comm::ConnectionPointer &c, Security::PeerOptions &o, const char *squidCtx)
  226 Security::MaybeGetSessionResumeData(const Security::SessionPointer &s, Security::SessionStatePointer &data)
  242         debugs(83, 5, "session=" << (void*)s.get() << " data=" << (void*)data.get() << ", do nothing.");
  247 Security::SetSessionResumeData(const Security::SessionPointer &s, const Security::SessionStatePointer &data)
  264         debugs(83, DBG_CRITICAL, "no TLS library. session=" << (void*)s.get() << " data=" << (void*)data.get());
  298     // XXX: the other calls [to openForReading()] do not copy the sessionId to a char buffer, does this really have to?
  354     if (const auto slot = SessionCache->openForReading(static_cast<const cache_key*>(sessionID), pos)) {
static void Link(SSL *ssl, BIO *bio)
Tells ssl connection to use BIO and monitor state via stateChanged()
Definition: bio.cc:89
struct SquidConfig::@97 SSL
static bool CreateSession(const Security::ContextPointer &ctx, const Comm::ConnectionPointer &conn, Security::PeerOptions &opts, Security::Io::Type type, const char *squidCtx)
Definition: Session.cc:102
a MemMap basic element, holding basic shareable memory block info
Definition: MemMap.h:33
void MaybeGetSessionResumeData(const Security::SessionPointer &, Security::SessionStatePointer &data)
Definition: Session.cc:226
A map of MemMapSlots indexed by their keys, with read/write slot locking.
Definition: MemMap.h:56
const Slot * openForReading(const cache_key *const key, sfileno &fileno)
open slot for reading, increments read level
Definition: MemMap.cc:153
static int tls_write_method(int fd, const char *buf, int len)
Definition: Session.cc:63
void closeForWriting(const sfileno fileno)
successfully finish writing the entry
Definition: MemMap.cc:91
Definition: Segment.h:84
bool IamWorkerProcess()
whether the current process handles HTTP transactions and such
Definition: stub_tools.cc:47
A combination of PeerOptions and the corresponding Context.
Definition: PeerOptions.h:154
void SessionSendGoodbye(const Security::SessionPointer &)
send the shutdown/bye notice for an active TLS session.
Definition: Session.cc:200
bool SessionIsResumed(const Security::SessionPointer &)
whether the session is a resumed one
Definition: Session.cc:213
void SetSessionCacheCallbacks(Security::ContextPointer &)
Setup the given TLS context with callbacks used to manage the session cache.
Definition: Session.cc:376
static Owner * Init(const char *const path, const int limit)
initialize shared memory
Definition: MemMap.cc:36
Security::SessionPointer NewSessionObject(const Security::ContextPointer &)
Definition: Session.cc:90
static void remove_session_cb(SSL_CTX *, SSL_SESSION *sessionID)
Definition: Session.cc:320
Definition: Pointer.h:25
bool CreateServerSession(const Security::ContextPointer &, const Comm::ConnectionPointer &, Security::PeerOptions &, const char *squidCtx)
Definition: Session.cc:194
Definition: forward.h:15
DefineRunnerRegistrator(SharedSessionCacheRr)
static SSL_SESSION * get_session_cb(SSL *, unsigned char *sessionID, int len, int *copy)
Definition: Session.cc:342
const unsigned char * SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len)
Definition: openssl.h:147
bool CreateClientSession(FuturePeerContext &, const Comm::ConnectionPointer &, const char *squidCtx)
Definition: Session.cc:183
Slot * openForWriting(const cache_key *const key, sfileno &fileno)
Definition: MemMap.cc:42
std::unique_ptr< SSL_SESSION, HardFun< void, SSL_SESSION *, &SSL_SESSION_free > > SessionStatePointer
Definition: Session.h:55
void updateSessionOptions(Security::SessionPointer &)
setup any library-specific options that can be set for the given session
Definition: PeerOptions.cc:779
void free(const sfileno fileno)
mark the slot as waiting to be freed and, if possible, free it
Definition: MemMap.cc:138
const char * ErrorString(const LibErrorCode code)
converts numeric LibErrorCode into a human-friendlier string
Definition: forward.h:152
void closeForReading(const sfileno fileno)
close slot after reading, decrements read level
Definition: MemMap.cc:207
void SetSessionResumeData(const Security::SessionPointer &, const Security::SessionStatePointer &)
Definition: Session.cc:247
Introduction
- About Squid
 - Why Squid?
 - Squid Developers
 - How to Donate
 - How to Help Out
 - Getting Squid
 - Squid Source Packages
 - Squid Deployment Case-Studies
 - Squid Software Foundation
 
Documentation
- Quick Setup
 - Configuration:
 - FAQ and Wiki
 - Guide Books:
 - Non-English
 - More...
 
Support
- Security Advisories
 - Bugzilla Database
 - Mailing lists
 - Contacting us
 - Commercial services
 - Project Sponsors
 - Squid-based products
 
