]> git.ipfire.org Git - thirdparty/squid.git/blame - src/tests/stub_libsslsquid.cc
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / tests / stub_libsslsquid.cc
CommitLineData
4e0938ef 1/*
77b1029d 2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
4e0938ef
AJ
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
f7f3304a 9#include "squid.h"
0bf57f33 10
cb4f4424 11#if USE_OPENSSL
0bf57f33 12
1b76e6c1 13#include "fatal.h"
12b5040f 14#include "sbuf/SBuf.h"
1b76e6c1
AJ
15
16/* Stub File for the ssl/libsslsquid.la convenience library */
17
0bf57f33
AJ
18#define STUB_API "ssl/libsslsquid.la"
19#include "tests/STUB.h"
1b76e6c1 20
1b76e6c1 21#include "ssl/Config.h"
c29aceab
AJ
22Ssl::Config::Config():
23#if USE_SSL_CRTD
f53969cc 24 ssl_crtd(NULL),
c29aceab 25#endif
f53969cc 26 ssl_crt_validator(NULL)
c29aceab
AJ
27{
28 ssl_crt_validator_Children.concurrency = 1;
29 STUB_NOP
30}
814f9a2e 31Ssl::Config::~Config() STUB_NOP
1b76e6c1
AJ
32Ssl::Config Ssl::TheConfig;
33
34#include "ssl/context_storage.h"
35//Ssl::CertificateStorageAction::CertificateStorageAction(const Mgr::Command::Pointer &cmd) STUB
0bf57f33 36Ssl::CertificateStorageAction::Pointer Ssl::CertificateStorageAction::Create(const Mgr::Command::Pointer &cmd) STUB_RETSTATREF(Ssl::CertificateStorageAction::Pointer)
1b76e6c1 37void Ssl::CertificateStorageAction::dump(StoreEntry *sentry) STUB
1b76e6c1 38void Ssl::GlobalContextStorage::addLocalStorage(Ip::Address const & address, size_t size_of_store) STUB
d4018dfb
CT
39Ssl::LocalContextStorage *Ssl::GlobalContextStorage::getLocalStorage(Ip::Address const & address)
40{ fatal(STUB_API " required"); static Ssl::LocalContextStorage v(0,0); return &v; }
1b76e6c1
AJ
41void Ssl::GlobalContextStorage::reconfigureStart() STUB
42//Ssl::GlobalContextStorage Ssl::TheGlobalContextStorage;
43
44#include "ssl/ErrorDetail.h"
13cd7dee
AJ
45Security::ErrorCode parseErrorString(const char *name) STUB_RETVAL(0)
46//const char *Ssl::getErrorName(Security::ErrorCode value) STUB_RETVAL(NULL)
47Ssl::ErrorDetail::ErrorDetail(Security::ErrorCode, X509 *, X509 *, const char *) STUB
1b76e6c1 48Ssl::ErrorDetail::ErrorDetail(ErrorDetail const &) STUB
0bf57f33 49const String & Ssl::ErrorDetail::toString() const STUB_RETSTATREF(String)
1b76e6c1
AJ
50
51#include "ssl/support.h"
36378e12
AJ
52namespace Ssl
53{
51e09c08 54int AskPasswordCb(char *, int, int, void *) STUB_RETVAL(0)
b23f5f9c 55bool InitServerContext(Security::ContextPointer &, AnyP::PortCfg &) STUB_RETVAL(false)
cc488ec9 56bool InitClientContext(Security::ContextPointer &, Security::PeerOptions &, const char *) STUB_RETVAL(false)
cf487124
AJ
57void SetupVerifyCallback(Security::ContextPointer &) STUB
58void MaybeSetupRsaCallback(Security::ContextPointer &) STUB
36378e12 59} // namespace Ssl
1b76e6c1 60const char *sslGetUserEmail(SSL *ssl) STUB_RETVAL(NULL)
36378e12
AJ
61const char *sslGetUserAttribute(SSL *ssl, const char *attribute_name) STUB_RETVAL(NULL)
62const char *sslGetCAAttribute(SSL *ssl, const char *attribute_name) STUB_RETVAL(NULL)
12b5040f
DN
63SBuf sslGetUserCertificatePEM(SSL *ssl) STUB_RETVAL(SBuf())
64SBuf sslGetUserCertificateChainPEM(SSL *ssl) STUB_RETVAL(SBuf())
36378e12
AJ
65namespace Ssl
66{
67//GETX509ATTRIBUTE GetX509UserAttribute;
68//GETX509ATTRIBUTE GetX509CAAttribute;
69//GETX509ATTRIBUTE GetX509Fingerprint;
ba6fffba 70std::vector<const char *> BumpModeStr = {""};
cf487124
AJ
71bool generateUntrustedCert(Security::CertPointer &, Security::PrivateKeyPointer &, Security::CertPointer const &, Security::PrivateKeyPointer const &) STUB_RETVAL(false)
72Security::ContextPointer GenerateSslContext(CertificateProperties const &, Security::ServerOptions &, bool) STUB_RETVAL(Security::ContextPointer())
b23f5f9c 73bool verifySslCertificate(Security::ContextPointer &, CertificateProperties const &) STUB_RETVAL(false)
cf487124 74Security::ContextPointer GenerateSslContextUsingPkeyAndCertFromMemory(const char *, Security::ServerOptions &, bool) STUB_RETVAL(Security::ContextPointer())
36378e12
AJ
75int matchX509CommonNames(X509 *peer_cert, void *check_data, int (*check_func)(void *check_data, ASN1_STRING *cn_data)) STUB_RETVAL(0)
76bool checkX509ServerValidity(X509 *cert, const char *server) STUB_RETVAL(false)
77int asn1timeToString(ASN1_TIME *tm, char *buf, int len) STUB_RETVAL(0)
428819f3 78void setClientSNI(SSL *ssl, const char *fqdn) STUB
12b5040f 79SBuf GetX509PEM(SSL *ssl) STUB_RETVAL(SBuf())
36378e12 80} //namespace Ssl
0bf57f33
AJ
81
82#endif
f53969cc 83