stub_libsecurity.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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#include "squid.h"
10#include "AccessLogEntry.h"
11#include "comm/Connection.h"
12#include "Downloader.h"
13#include "HttpRequest.h"
14
15#define STUB_API "security/libsecurity.la"
16#include "tests/STUB.h"
17
20namespace Security
21{
23Security::ContextPointer BlindPeerConnector::getTlsContext() STUB_RETVAL(Security::ContextPointer())
24void BlindPeerConnector::noteNegotiationDone(ErrorState *) STUB
25}
26
27#include "security/EncryptorAnswer.h"
29std::ostream &Security::operator <<(std::ostream &os, const Security::EncryptorAnswer &) STUB_RETVAL(os)
30
31#include "security/Certificate.h"
35std::ostream &operator <<(std::ostream &os, Security::Certificate &) STUB_RETVAL(os)
36
37#include "security/Handshake.h"
40
41#include "security/Io.h"
45
46#include "security/KeyData.h"
47namespace Security
48{
49void KeyData::loadFromFiles(const AnyP::PortCfg &, const char *) STUB
50}
51
52#include "security/KeyLogger.h"
54
57#if USE_OPENSSL
59#elif USE_GNUTLS
61#endif
64SBuf Security::ErrorDetail::brief() const STUB_RETVAL(SBuf())
66const char *Security::ErrorNameFromCode(ErrorCode, bool) STUB_RETVAL("")
67
68#include "security/NegotiationHistory.h"
70void Security::NegotiationHistory::retrieveNegotiatedInfo(const Security::SessionPointer &) STUB
71void Security::NegotiationHistory::retrieveParsedInfo(Security::TlsDetails::Pointer const &) STUB
72const char *Security::NegotiationHistory::cipherName() const STUB
73const char *Security::NegotiationHistory::printTlsVersion(AnyP::ProtocolVersion const &) const STUB
74
75#include "security/PeerConnector.h"
76class TlsNegotiationDetails: public RefCountable {};
78namespace Security
79{
81 AsyncJob("Security::PeerConnector") {STUB}
82PeerConnector::~PeerConnector() STUB
83void PeerConnector::start() STUB
84bool PeerConnector::doneAll() const STUB_RETVAL(true)
85void PeerConnector::swanSong() STUB
86const char *PeerConnector::status() const STUB_RETVAL("")
87void PeerConnector::fillChecklist(ACLFilledChecklist &) const STUB
88void PeerConnector::commCloseHandler(const CommCloseCbParams &) STUB
89void PeerConnector::commTimeoutHandler(const CommTimeoutCbParams &) STUB
90bool PeerConnector::initialize(Security::SessionPointer &) STUB_RETVAL(false)
91void PeerConnector::negotiate() STUB
92bool PeerConnector::sslFinalized() STUB_RETVAL(false)
93void PeerConnector::handleNegotiationResult(const Security::IoResult &) STUB;
94void PeerConnector::noteWantRead() STUB
95void PeerConnector::noteWantWrite() STUB
96void PeerConnector::noteNegotiationError(const Security::ErrorDetailPointer &) STUB
97// virtual Security::ContextPointer getTlsContext() = 0;
98void PeerConnector::bail(ErrorState *) STUB
99void PeerConnector::sendSuccess() STUB
100void PeerConnector::callBack() STUB
101void PeerConnector::disconnect() STUB
102void PeerConnector::countFailingConnection() STUB
103void PeerConnector::recordNegotiationDetails() STUB
104EncryptorAnswer &PeerConnector::answer() STUB_RETREF(EncryptorAnswer)
105}
106
107#include "security/PeerOptions.h"
110#if USE_OPENSSL
111 parsedOptions = 0;
112#endif
114}
115void Security::PeerOptions::parse(char const*) STUB
117void Security::PeerOptions::updateTlsVersionLimits() STUB
118Security::ContextPointer Security::PeerOptions::createBlankContext() const STUB_RETVAL(Security::ContextPointer())
119void Security::PeerOptions::updateContextCa(Security::ContextPointer &) STUB
120void Security::PeerOptions::updateContextCrl(Security::ContextPointer &) STUB
121void Security::PeerOptions::updateContextTrust(Security::ContextPointer &) STUB
122void Security::PeerOptions::updateSessionOptions(Security::SessionPointer &) STUB
123void Security::PeerOptions::dumpCfg(Packable*, char const*) const STUB
124void Security::PeerOptions::parseOptions() STUB
125void parse_securePeerOptions(Security::PeerOptions *) STUB
126
127#include "security/ServerOptions.h"
128//Security::ServerOptions::ServerOptions(const Security::ServerOptions &) STUB
130void Security::ServerOptions::parse(const char *) STUB
131void Security::ServerOptions::dumpCfg(Packable *, const char *) const STUB
133void Security::ServerOptions::initServerContexts(AnyP::PortCfg&) STUB
134bool Security::ServerOptions::createStaticServerContext(AnyP::PortCfg &) STUB_RETVAL(false)
135void Security::ServerOptions::createSigningContexts(const AnyP::PortCfg &) STUB
136bool Security::ServerOptions::updateContextConfig(Security::ContextPointer &) STUB_RETVAL(false)
137void Security::ServerOptions::updateContextEecdh(Security::ContextPointer &) STUB
138void Security::ServerOptions::updateContextClientCa(Security::ContextPointer &) STUB
139void Security::ServerOptions::syncCaFiles() STUB
140void Security::ServerOptions::updateContextSessionId(Security::ContextPointer &) STUB
141
142#include "security/Session.h"
143namespace Security {
145bool CreateServerSession(const Security::ContextPointer &, const Comm::ConnectionPointer &, Security::PeerOptions &, const char *) STUB_RETVAL(false)
150#if USE_OPENSSL
153#endif
154} // namespace Security
155
#define true
Definition: GnuRegex.c:241
#define false
Definition: GnuRegex.c:240
#define RefCountable
The locking interface for use on Reference-Counted classes.
Definition: Lock.h:66
void parse_securePeerOptions(Security::PeerOptions *opt)
Definition: PeerOptions.cc:805
#define STUB
macro to stub a void function.
Definition: STUB.h:33
#define STUB_NOP
Definition: STUB.h:37
#define STUB_RETREF(x)
Definition: STUB.h:51
#define STUB_RETVAL(x)
Definition: STUB.h:41
an interface for those capable of configuring an ACLFilledChecklist object
interface for supplying additional information about a transaction failure
Definition: Detail.h:21
Definition: SBuf.h:94
virtual bool initialize(Security::SessionPointer &)
~EncryptorAnswer()
deletes error if it is still set
ErrorDetail(ErrorCode err_no, const CertPointer &peer, const CertPointer &broken, const char *aReason=nullptr)
Definition: ErrorDetail.cc:465
virtual SBuf verbose(const HttpRequestPointer &) const
Definition: ErrorDetail.cc:532
void setPeerCertificate(const CertPointer &)
Definition: ErrorDetail.cc:489
HandshakeParser(MessageSource)
Definition: Handshake.cc:219
bool parseHello(const SBuf &data)
Definition: Handshake.cc:641
a summary a TLS I/O operation outcome
Definition: Io.h:19
void loadFromFiles(const AnyP::PortCfg &, const char *portType)
load the contents of certFile and privateKeyFile into memory cert, pkey and chain
Definition: KeyData.cc:172
void maybeLog(const Connection &, const Acl::ChecklistFiller &)
(slowly checks logging preconditions and) logs if possible
Definition: KeyLogger.cc:22
PeerConnector(const Comm::ConnectionPointer &aServerConn, AsyncCall::Pointer &aCallback, const AccessLogEntryPointer &alp, const time_t timeout=0)
TLS squid.conf settings for a remote server peer.
Definition: PeerOptions.h:24
Security::ContextPointer createClientContext(bool setOptions)
generate a security client-context from these configured options
Definition: PeerOptions.cc:271
virtual void parse(const char *)
parse a TLS squid.conf option
Definition: PeerOptions.cc:33
Security::ParsedOptions parsedOptions
Definition: PeerOptions.h:95
TLS squid.conf settings for a listening port.
Definition: ServerOptions.h:26
virtual void dumpCfg(Packable *, const char *pfx) const
output squid.conf syntax with 'pfx' prefix on parameters for the stored settings
virtual Security::ContextPointer createBlankContext() const
generate an unset security context object
ServerOptions & operator=(const ServerOptions &)
virtual void parse(const char *)
parse a TLS squid.conf option
Definition: forward.h:15
Abstraction layer for TCP, UDP, TLS, UDS and filedescriptor sockets.
Definition: AcceptLimiter.h:17
AnyP::ProtocolVersion ProtocolVersion()
Protocol version to use in Http::Message structures wrapping FTP messages.
Definition: Elements.cc:24
Network/connection security abstraction layer.
Definition: Connection.h:34
void SetSessionCacheCallbacks(Security::ContextPointer &)
Setup the given TLS context with callbacks used to manage the session cache.
Definition: Session.cc:375
SBuf IssuerName(Certificate &)
The Issuer field of the given certificate (if found) or an empty SBuf.
Definition: Certificate.cc:28
std::shared_ptr< SSL_CTX > ContextPointer
Definition: Context.h:29
SSL Connection
Definition: Session.h:45
bool CreateServerSession(const Security::ContextPointer &, const Comm::ConnectionPointer &, Security::PeerOptions &, const char *squidCtx)
Definition: Session.cc:193
IoResult Accept(Comm::Connection &transport)
accept a TLS connection over the specified to-Squid transport connection
Definition: Io.cc:197
int ErrorCode
Squid-defined error code (<0), an error code returned by X.509 API, or zero.
Definition: forward.h:128
const char * ErrorNameFromCode(ErrorCode err, bool prefixRawCode=false)
Definition: ErrorDetail.cc:429
Security::SessionPointer NewSessionObject(const Security::ContextPointer &)
Definition: Session.cc:90
void SetSessionResumeData(const Security::SessionPointer &, const Security::SessionStatePointer &)
Definition: Session.cc:246
std::shared_ptr< SSL > SessionPointer
Definition: Session.h:49
IoResult Connect(Comm::Connection &transport)
establish a TLS connection over the specified from-Squid transport connection
Definition: Io.cc:212
unsigned long LibErrorCode
TLS library-reported non-validation error.
Definition: forward.h:135
X509 Certificate
Definition: forward.h:73
bool SessionIsResumed(const Security::SessionPointer &)
whether the session is a resumed one
Definition: Session.cc:212
void SessionSendGoodbye(const Security::SessionPointer &)
send the shutdown/bye notice for an active TLS session.
Definition: Session.cc:199
SessionPointer::element_type * ConnectionPointer
Definition: Io.cc:23
Security::LockingPointer< X509, X509_free_cpp, HardFun< int, X509 *, X509_up_ref > > CertPointer
Definition: forward.h:82
ErrorCode ErrorCodeFromName(const char *name)
Definition: ErrorDetail.cc:409
bool CreateClientSession(const Security::ContextPointer &, const Comm::ConnectionPointer &, const char *squidCtx)
Definition: Session.cc:183
std::ostream & operator<<(std::ostream &, const Security::EncryptorAnswer &)
PeerOptions ProxyOutgoingConfig
configuration options for DIRECT server access
Definition: PeerOptions.cc:24
SBuf SubjectName(Certificate &)
The SubjectName field of the given certificate (if found) or an empty SBuf.
Definition: Certificate.cc:68
bool IssuedBy(Certificate &cert, Certificate &issuer)
Definition: Certificate.cc:108
std::unique_ptr< SSL_SESSION, HardFun< void, SSL_SESSION *, &SSL_SESSION_free > > SessionStatePointer
Definition: Session.h:51
void MaybeGetSessionResumeData(const Security::SessionPointer &, Security::SessionStatePointer &data)
Definition: Session.cc:225
void ForgetErrors()
clear any errors that a TLS library has accumulated in its global storage
Definition: Io.cc:57
STL namespace.
std::ostream &Security::operator<<(std::ostream &os, const Security::EncryptorAnswer &) STUB_RETVAL(os) SBuf Security CBDATA_NAMESPACED_CLASS_INIT(Security, PeerConnector)

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors