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