stub_libsslsquid.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 
15 /* Stub File for the ssl/libsslsquid.la convenience library */
16 
17 #define STUB_API "ssl/libsslsquid.la"
18 #include "tests/STUB.h"
19 
20 #include "ssl/Config.h"
22 #if USE_SSL_CRTD
23  ssl_crtd(NULL),
24 #endif
25  ssl_crt_validator(NULL)
26 {
27  ssl_crt_validator_Children.concurrency = 1;
28  STUB_NOP
29 }
31 Ssl::Config Ssl::TheConfig;
32 
33 #include "ssl/context_storage.h"
34 //Ssl::CertificateStorageAction::CertificateStorageAction(const Mgr::Command::Pointer &cmd) STUB
36 void Ssl::CertificateStorageAction::dump(StoreEntry *sentry) STUB
37 void Ssl::GlobalContextStorage::addLocalStorage(Ip::Address const & address, size_t size_of_store) STUB
38 Ssl::LocalContextStorage *Ssl::GlobalContextStorage::getLocalStorage(Ip::Address const & address)
39 { fatal(STUB_API " required"); static Ssl::LocalContextStorage v(0,0); return &v; }
41 //Ssl::GlobalContextStorage Ssl::TheGlobalContextStorage;
42 
43 #include "ssl/ErrorDetail.h"
44 Security::ErrorCode parseErrorString(const char *name) STUB_RETVAL(0)
45 //const char *Ssl::getErrorName(Security::ErrorCode value) STUB_RETVAL(NULL)
46 Ssl::ErrorDetail::ErrorDetail(Security::ErrorCode, X509 *, X509 *, const char *) STUB
47 Ssl::ErrorDetail::ErrorDetail(ErrorDetail const &) STUB
48 const String & Ssl::ErrorDetail::toString() const STUB_RETSTATREF(String)
49 
50 #include "ssl/support.h"
51 namespace Ssl
52 {
54 bool InitClientContext(Security::ContextPointer &, Security::PeerOptions &, const char *) STUB_RETVAL(false)
55 void SetupVerifyCallback(Security::ContextPointer &) STUB
56 void MaybeSetupRsaCallback(Security::ContextPointer &) STUB
57 } // namespace Ssl
58 const char *sslGetUserEmail(SSL *ssl) STUB_RETVAL(NULL)
59 const char *sslGetUserAttribute(SSL *ssl, const char *attribute_name) STUB_RETVAL(NULL)
60 const char *sslGetCAAttribute(SSL *ssl, const char *attribute_name) STUB_RETVAL(NULL)
61 const char *sslGetUserCertificatePEM(SSL *ssl) STUB_RETVAL(NULL)
62 const char *sslGetUserCertificateChainPEM(SSL *ssl) STUB_RETVAL(NULL)
63 namespace Ssl
64 {
65 //GETX509ATTRIBUTE GetX509UserAttribute;
66 //GETX509ATTRIBUTE GetX509CAAttribute;
67 //GETX509ATTRIBUTE GetX509Fingerprint;
68 std::vector<const char *> BumpModeStr = {""};
69 bool generateUntrustedCert(Security::CertPointer &, Security::PrivateKeyPointer &, Security::CertPointer const &, Security::PrivateKeyPointer const &) STUB_RETVAL(false)
70 Security::ContextPointer GenerateSslContext(CertificateProperties const &, Security::ServerOptions &, bool) STUB_RETVAL(Security::ContextPointer())
71 bool verifySslCertificate(Security::ContextPointer &, CertificateProperties const &) STUB_RETVAL(false)
72 Security::ContextPointer GenerateSslContextUsingPkeyAndCertFromMemory(const char *, Security::ServerOptions &, bool) STUB_RETVAL(Security::ContextPointer())
73 void addChainToSslContext(Security::ContextPointer &, STACK_OF(X509) *) STUB
74 void readCertChainAndPrivateKeyFromFiles(Security::CertPointer &, Security::PrivateKeyPointer &, Security::CertList &, char const *, char const *) STUB
75 int matchX509CommonNames(X509 *peer_cert, void *check_data, int (*check_func)(void *check_data, ASN1_STRING *cn_data)) STUB_RETVAL(0)
76 bool checkX509ServerValidity(X509 *cert, const char *server) STUB_RETVAL(false)
77 int asn1timeToString(ASN1_TIME *tm, char *buf, int len) STUB_RETVAL(0)
78 bool setClientSNI(SSL *ssl, const char *fqdn) STUB_RETVAL(false)
79 } //namespace Ssl
80 
81 #endif
82 
bool verifySslCertificate(Security::ContextPointer &, CertificateProperties const &)
Definition: support.cc:902
bool setClientSNI(SSL *ssl, const char *fqdn)
Definition: support.cc:927
void addChainToSslContext(Security::ContextPointer &, Security::CertList &)
Definition: support.cc:946
void readCertChainAndPrivateKeyFromFiles(Security::CertPointer &cert, Security::PrivateKeyPointer &pkey, Security::CertList &chain, char const *certFilename, char const *keyFilename)
Definition: support.cc:1269
const char * sslGetUserAttribute(SSL *ssl, const char *attribute_name)
Definition: support.cc:681
Security::ContextPointer GenerateSslContextUsingPkeyAndCertFromMemory(const char *data, Security::ServerOptions &, bool trusted)
Definition: support.cc:808
const char * sslGetCAAttribute(SSL *ssl, const char *attribute_name)
Definition: support.cc:694
Security::ContextPointer GenerateSslContext(CertificateProperties const &, Security::ServerOptions &, bool trusted)
Definition: support.cc:822
bool InitServerContext(Security::ContextPointer &, AnyP::PortCfg &)
initialize a TLS server context with OpenSSL specific settings
Definition: support.cc:510
#define STUB_RETVAL(x)
Definition: STUB.h:41
const char * sslGetUserCertificateChainPEM(SSL *ssl)
Definition: support.cc:752
int ErrorCode
Squid defined error code (<0), an error code returned by X.509 API, or SSL_ERROR_NONE.
Definition: forward.h:116
#define STUB
macro to stub a void function.
Definition: STUB.h:33
Definition: LruMap.h:17
bool InitClientContext(Security::ContextPointer &, Security::PeerOptions &, long flags)
initialize a TLS client context with OpenSSL specific settings
Definition: support.cc:540
std::shared_ptr< SSL_CTX > ContextPointer
Definition: Context.h:28
void fatal(const char *message)
Definition: fatal.cc:39
void MaybeSetupRsaCallback(Security::ContextPointer &)
if required, setup callback for generating ephemeral RSA keys
Definition: support.cc:150
void reconfigureStart()
When reconfigring should be called this method.
static STACK_OF(X509)*PeerValidationCertificatesChain(const Security
int unsigned int const char *desc STUB void int len
Definition: stub_fd.cc:20
LruMap< SBuf, Security::ContextPointer, SSL_CTX_SIZE > LocalContextStorage
bool checkX509ServerValidity(X509 *cert, const char *server)
Definition: support.cc:231
static char server[MAXLINE]
bool generateUntrustedCert(Security::CertPointer &untrustedCert, Security::PrivateKeyPointer &untrustedPkey, Security::CertPointer const &cert, Security::PrivateKeyPointer const &pkey)
Definition: support.cc:1297
int asn1timeToString(ASN1_TIME *tm, char *buf, int len)
Definition: support.cc:158
const char * sslGetUserCertificatePEM(SSL *ssl)
Definition: support.cc:714
int matchX509CommonNames(X509 *peer_cert, void *check_data, int(*check_func)(void *check_data, ASN1_STRING *cn_data))
Definition: support.cc:172
#define STUB_NOP
Definition: STUB.h:37
static Pointer Create(const Mgr::Command::Pointer &cmd)
void SetupVerifyCallback(Security::ContextPointer &)
set the certificate verify callback for a context
Definition: support.cc:380
#define STUB_API
const char * sslGetUserEmail(SSL *ssl)
Definition: support.cc:708
class SquidConfig Config
Definition: SquidConfig.cc:12
#define NULL
Definition: types.h:166
#define STUB_RETSTATREF(x)
Definition: STUB.h:54
#define false
Definition: GnuRegex.c:233
Definition: Address.cc:190

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors