9#ifndef SQUID_SRC_SECURITY_SESSION_H
10#define SQUID_SRC_SECURITY_SESSION_H
22#include <openssl/ssl.h>
27#if HAVE_GNUTLS_GNUTLS_H
28#include <gnutls/gnutls.h>
36class FuturePeerContext;
55typedef std::unique_ptr<SSL_SESSION, HardFun<void, SSL_SESSION*, &SSL_SESSION_free>>
SessionStatePointer;
67inline void squid_gnutls_free(
void *d) {gnutls_free(d);}
68typedef std::unique_ptr<gnutls_datum_t, HardFun<void, void*, &Security::squid_gnutls_free>>
SessionStatePointer;
111 auto *ctx = SSL_get_SSL_CTX(s.get());
TLS squid.conf settings for a remote server peer.
Network/connection security abstraction layer.
void SetSessionCacheCallbacks(Security::ContextPointer &)
Setup the given TLS context with callbacks used to manage the session cache.
std::shared_ptr< SSL_CTX > ContextPointer
bool CreateClientSession(FuturePeerContext &, const Comm::ConnectionPointer &, const char *squidCtx)
bool CreateServerSession(const Security::ContextPointer &, const Comm::ConnectionPointer &, Security::PeerOptions &, const char *squidCtx)
Security::SessionPointer NewSessionObject(const Security::ContextPointer &)
void SetSessionResumeData(const Security::SessionPointer &, const Security::SessionStatePointer &)
std::shared_ptr< SSL > SessionPointer
bool SessionIsResumed(const Security::SessionPointer &)
whether the session is a resumed one
void SessionSendGoodbye(const Security::SessionPointer &)
send the shutdown/bye notice for an active TLS session.
Security::ContextPointer GetFrom(Security::SessionPointer &s)
Helper function to retrieve a (non-locked) ContextPointer from a SessionPointer.
std::unique_ptr< SSL_SESSION, HardFun< void, SSL_SESSION *, &SSL_SESSION_free > > SessionStatePointer
void MaybeGetSessionResumeData(const Security::SessionPointer &, Security::SessionStatePointer &data)