stub_libsecurity.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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 "HttpRequest.h"
13
14#define STUB_API "security/libsecurity.la"
15#include "tests/STUB.h"
16
19namespace Security
20{
22Security::ContextPointer BlindPeerConnector::getTlsContext() STUB_RETVAL(Security::ContextPointer())
23void BlindPeerConnector::noteNegotiationDone(ErrorState *) STUB
24}
25
26#include "security/EncryptorAnswer.h"
28std::ostream &Security::operator <<(std::ostream &os, const Security::EncryptorAnswer &) STUB_RETVAL(os)
29
30#include "security/Certificate.h"
34std::ostream &operator <<(std::ostream &os, Security::Certificate &) STUB_RETVAL(os)
35
36#include "security/Handshake.h"
39
40#include "security/Io.h"
44
45#include "security/KeyData.h"
46namespace Security
47{
48void KeyData::loadFromFiles(const AnyP::PortCfg &, const char *) STUB
49}
50
51#include "security/KeyLogger.h"
53
56#if USE_OPENSSL
58#elif USE_GNUTLS
60#endif
63SBuf Security::ErrorDetail::brief() const STUB_RETVAL(SBuf())
65const char *Security::ErrorNameFromCode(ErrorCode, bool) STUB_RETVAL("")
66
67#include "security/NegotiationHistory.h"
69void Security::NegotiationHistory::retrieveNegotiatedInfo(const Security::SessionPointer &) STUB
70void Security::NegotiationHistory::retrieveParsedInfo(Security::TlsDetails::Pointer const &) STUB
71const char *Security::NegotiationHistory::cipherName() const STUB
72const char *Security::NegotiationHistory::printTlsVersion(AnyP::ProtocolVersion const &) const STUB
73
74#include "security/PeerConnector.h"
75class TlsNegotiationDetails: public RefCountable {};
76namespace Security
77{
79 AsyncJob("Security::PeerConnector") {STUB}
80PeerConnector::~PeerConnector() STUB
81void PeerConnector::start() STUB
82bool PeerConnector::doneAll() const STUB_RETVAL(true)
83void PeerConnector::swanSong() STUB
84const char *PeerConnector::status() const STUB_RETVAL("")
85void PeerConnector::fillChecklist(ACLFilledChecklist &) const STUB
86void PeerConnector::commCloseHandler(const CommCloseCbParams &) STUB
87void PeerConnector::commTimeoutHandler(const CommTimeoutCbParams &) STUB
88bool PeerConnector::initialize(Security::SessionPointer &) STUB_RETVAL(false)
89void PeerConnector::negotiate() STUB
90bool PeerConnector::sslFinalized() STUB_RETVAL(false)
91void PeerConnector::handleNegotiationResult(const Security::IoResult &) STUB;
92void PeerConnector::noteWantRead() STUB
93void PeerConnector::noteWantWrite() STUB
94void PeerConnector::noteNegotiationError(const Security::ErrorDetailPointer &) STUB
95// virtual Security::ContextPointer getTlsContext() = 0;
96void PeerConnector::bail(ErrorState *) STUB
97void PeerConnector::sendSuccess() STUB
98void PeerConnector::callBack() STUB
99void PeerConnector::disconnect() STUB
100void PeerConnector::countFailingConnection(const ErrorState *) STUB
101void PeerConnector::recordNegotiationDetails() STUB
102EncryptorAnswer &PeerConnector::answer() STUB_RETREF(EncryptorAnswer)
103}
104
105#include "security/PeerOptions.h"
108#if USE_OPENSSL
109 parsedOptions = 0;
110#endif
112}
113void Security::PeerOptions::parse(char const*) STUB
115void Security::PeerOptions::updateTlsVersionLimits() STUB
116Security::ContextPointer Security::PeerOptions::createBlankContext() const STUB_RETVAL(Security::ContextPointer())
117void Security::PeerOptions::updateContextCa(Security::ContextPointer &) STUB
118void Security::PeerOptions::updateContextCrl(Security::ContextPointer &) STUB
119void Security::PeerOptions::updateContextTrust(Security::ContextPointer &) STUB
120void Security::PeerOptions::updateSessionOptions(Security::SessionPointer &) STUB
121void Security::PeerOptions::dumpCfg(std::ostream &, char const*) const STUB
122void Security::PeerOptions::parseOptions() STUB
123void parse_securePeerOptions(Security::PeerOptions *) STUB
124
125#include "security/ServerOptions.h"
126//Security::ServerOptions::ServerOptions(const Security::ServerOptions &) STUB
128void Security::ServerOptions::parse(const char *) STUB
129void Security::ServerOptions::dumpCfg(std::ostream &, const char *) const STUB
131void Security::ServerOptions::initServerContexts(AnyP::PortCfg&) STUB
132bool Security::ServerOptions::createStaticServerContext(AnyP::PortCfg &) STUB_RETVAL(false)
133void Security::ServerOptions::createSigningContexts(const AnyP::PortCfg &) STUB
134bool Security::ServerOptions::updateContextConfig(Security::ContextPointer &) STUB_RETVAL(false)
135void Security::ServerOptions::updateContextEecdh(Security::ContextPointer &) STUB
136void Security::ServerOptions::updateContextClientCa(Security::ContextPointer &) STUB
137void Security::ServerOptions::syncCaFiles() STUB
138void Security::ServerOptions::updateContextSessionId(Security::ContextPointer &) STUB
139
140#include "security/Session.h"
141namespace Security {
143bool CreateServerSession(const Security::ContextPointer &, const Comm::ConnectionPointer &, Security::PeerOptions &, const char *) STUB_RETVAL(false)
148#if USE_OPENSSL
151#endif
152} // namespace Security
153
#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
a smart AsyncCall pointer for delivery of future results
interface for supplying additional information about a transaction failure
Definition: Detail.h:21
Definition: SBuf.h:94
bool initialize(Security::SessionPointer &) override
~EncryptorAnswer()
deletes error if it is still set
SBuf verbose(const HttpRequestPointer &) const override
Definition: ErrorDetail.cc:534
ErrorDetail(ErrorCode err_no, const CertPointer &peer, const CertPointer &broken, const char *aReason=nullptr)
Definition: ErrorDetail.cc:466
void setPeerCertificate(const CertPointer &)
Definition: ErrorDetail.cc:490
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:180
void maybeLog(const Connection &, const Acl::ChecklistFiller &)
(slowly checks logging preconditions and) logs if possible
Definition: KeyLogger.cc:22
PeerConnector(const Comm::ConnectionPointer &aServerConn, const AsyncCallback< EncryptorAnswer > &, const AccessLogEntryPointer &alp, const time_t timeout=0)
TLS squid.conf settings for a remote server peer.
Definition: PeerOptions.h:26
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:97
TLS squid.conf settings for a listening port.
Definition: ServerOptions.h:26
Security::ContextPointer createBlankContext() const override
generate an unset security context object
void parse(const char *) override
parse a TLS squid.conf option
void dumpCfg(std::ostream &, const char *pfx) const override
output squid.conf syntax with 'pfx' prefix on parameters for the stored settings
ServerOptions & operator=(const ServerOptions &)
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:132
const char * ErrorNameFromCode(ErrorCode err, bool prefixRawCode=false)
Definition: ErrorDetail.cc:430
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:139
X509 Certificate
Definition: forward.h:77
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:86
ErrorCode ErrorCodeFromName(const char *name)
Definition: ErrorDetail.cc:410
bool CreateClientSession(const Security::ContextPointer &, const Comm::ConnectionPointer &, const char *squidCtx)
Definition: Session.cc:183
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
std::ostream & operator<<(std::ostream &, const EncryptorAnswer &)
void ForgetErrors()
clear any errors that a TLS library has accumulated in its global storage
Definition: Io.cc:57
STL namespace.
CBDATA_NAMESPACED_CLASS_INIT(Security, BlindPeerConnector)

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors