stub_libsslsquid.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
11#if USE_OPENSSL
12
13#include "fatal.h"
14#include "sbuf/Algorithms.h"
15#include "sbuf/SBuf.h"
16
17/* Stub File for the ssl/libsslsquid.la convenience library */
18
19#define STUB_API "ssl/libsslsquid.la"
20#include "tests/STUB.h"
21
22#include "ssl/Config.h"
24#if USE_SSL_CRTD
25 ssl_crtd(nullptr),
26#endif
27 ssl_crt_validator(nullptr)
28{
29 ssl_crt_validator_Children.concurrency = 1;
31}
34
35#include "ssl/context_storage.h"
36//Ssl::CertificateStorageAction::CertificateStorageAction(const Mgr::Command::Pointer &) STUB
41{ fatal(STUB_API " required"); static LocalContextStorage v(0); return &v; }
43//Ssl::GlobalContextStorage Ssl::TheGlobalContextStorage;
44
45#include "ssl/ErrorDetail.h"
46#include "ssl/support.h"
47namespace Ssl
48{
49bool ParseErrorString(const char *, Security::Errors &) STUB_RETVAL(false)
50int AskPasswordCb(char *, int, int, void *) STUB_RETVAL(0)
56} // namespace Ssl
57const char *sslGetUserEmail(SSL *) STUB_RETVAL(nullptr)
58const char *sslGetUserAttribute(SSL *, const char *) STUB_RETVAL(nullptr)
59const char *sslGetCAAttribute(SSL *, const char *) STUB_RETVAL(nullptr)
62namespace Ssl
63{
64//GETX509ATTRIBUTE GetX509UserAttribute;
65//GETX509ATTRIBUTE GetX509CAAttribute;
66//GETX509ATTRIBUTE GetX509Fingerprint;
67std::vector<const char *> BumpModeStr = {""};
68bool generateUntrustedCert(Security::CertPointer &, Security::PrivateKeyPointer &, Security::CertPointer const &, Security::PrivateKeyPointer const &) STUB_RETVAL(false)
70bool verifySslCertificate(const Security::ContextPointer &, CertificateProperties const &) STUB_RETVAL(false)
72int matchX509CommonNames(X509 *, void *, int (*)(void *, ASN1_STRING *)) STUB_RETVAL(0)
73bool checkX509ServerValidity(X509 *, const char *) STUB_RETVAL(false)
74int asn1timeToString(ASN1_TIME *, char *, int) STUB_RETVAL(0)
75void setClientSNI(SSL *, const char *) STUB
77} //namespace Ssl
78
79#endif
80
#define false
Definition: GnuRegex.c:240
#define STUB
macro to stub a void function.
Definition: STUB.h:33
#define STUB_NOP
Definition: STUB.h:37
#define STUB_RETSTATREF(x)
Definition: STUB.h:54
class SquidConfig Config
Definition: SquidConfig.cc:12
Definition: ClpMap.h:41
Definition: SBuf.h:94
TLS squid.conf settings for a listening port.
Definition: ServerOptions.h:26
static Pointer Create(const Mgr::Command::Pointer &cmd)
virtual void dump(StoreEntry *sentry)
void reconfigureStart()
When reconfigring should be called this method.
void addLocalStorage(Ip::Address const &address, size_t size_of_store)
Create new SSL context storage for the local listening address/port.
LocalContextStorage * getLocalStorage(Ip::Address const &address)
Return the local storage for the given listening address/port.
void fatal(const char *message)
Definition: fatal.cc:28
Security::ContextPointer GenerateSslContext(CertificateProperties const &, Security::ServerOptions &, bool trusted)
Definition: support.cc:956
GETX509PEM GetX509PEM
Definition: support.h:115
std::vector< const char * > BumpModeStr
Definition: support.cc:46
SBuf sslGetUserCertificatePEM(SSL *ssl)
Definition: support.cc:891
bool generateUntrustedCert(Security::CertPointer &untrustedCert, Security::PrivateKeyPointer &untrustedPkey, Security::CertPointer const &cert, Security::PrivateKeyPointer const &pkey)
Definition: support.cc:1367
const char * sslGetUserAttribute(SSL *ssl, const char *attribute_name)
Definition: support.cc:858
bool verifySslCertificate(const Security::ContextPointer &, CertificateProperties const &)
Definition: support.cc:1045
bool checkX509ServerValidity(X509 *cert, const char *server)
Definition: support.cc:254
int asn1timeToString(ASN1_TIME *tm, char *buf, int len)
Definition: support.cc:181
const char * sslGetCAAttribute(SSL *ssl, const char *attribute_name)
Definition: support.cc:871
Security::ContextPointer GenerateSslContextUsingPkeyAndCertFromMemory(const char *data, Security::ServerOptions &, bool trusted)
Definition: support.cc:942
SBuf sslGetUserCertificateChainPEM(SSL *ssl)
Definition: support.cc:902
void setClientSNI(SSL *ssl, const char *fqdn)
Definition: support.cc:1070
int matchX509CommonNames(X509 *peer_cert, void *check_data, int(*check_func)(void *check_data, ASN1_STRING *cn_data))
Definition: support.cc:195
Config TheConfig
Definition: Config.cc:16
Definition: forward.h:15
Network/connection security abstraction layer.
Definition: Connection.h:34
std::shared_ptr< SSL_CTX > ContextPointer
Definition: Context.h:29
long ParsedPortFlags
Definition: forward.h:198
std::unordered_set< Security::ErrorCode > Errors
Definition: forward.h:159
Definition: Xaction.cc:49
void DisablePeerVerification(Security::ContextPointer &)
Definition: support.cc:432
bool InitClientContext(Security::ContextPointer &, Security::PeerOptions &, Security::ParsedPortFlags)
initialize a TLS client context with OpenSSL specific settings
Definition: support.cc:710
bool ParseErrorString(const char *name, Security::Errors &)
Definition: ErrorDetail.cc:110
ClpMap< SBuf, Security::ContextPointer, MemoryUsedByContext > LocalContextStorage
int AskPasswordCb(char *buf, int size, int rwflag, void *userdata)
Definition: support.cc:64
void MaybeSetupRsaCallback(Security::ContextPointer &)
if required, setup callback for generating ephemeral RSA keys
Definition: support.cc:171
void ConfigurePeerVerification(Security::ContextPointer &, const Security::ParsedPortFlags)
set the certificate verify callback for a context
Definition: support.cc:405
bool InitServerContext(Security::ContextPointer &, AnyP::PortCfg &)
initialize a TLS server context with OpenSSL specific settings
Definition: support.cc:701
int unsigned int
Definition: stub_fd.cc:19
const char const char * STUB_RETVAL(nullptr) const char *sslGetCAAttribute(SSL *
#define STUB_API
const char * sslGetUserEmail(SSL *) STUB_RETVAL(nullptr) const char *sslGetUserAttribute(SSL *

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors