]> git.ipfire.org Git - thirdparty/squid.git/blame - src/tests/stub_libsslsquid.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / tests / stub_libsslsquid.cc
CommitLineData
4e0938ef 1/*
ef57eb7b 2 * Copyright (C) 1996-2016 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
AJ
13#include "fatal.h"
14
15/* Stub File for the ssl/libsslsquid.la convenience library */
16
0bf57f33
AJ
17#define STUB_API "ssl/libsslsquid.la"
18#include "tests/STUB.h"
1b76e6c1 19
1b76e6c1 20#include "ssl/Config.h"
c29aceab
AJ
21Ssl::Config::Config():
22#if USE_SSL_CRTD
f53969cc 23 ssl_crtd(NULL),
c29aceab 24#endif
f53969cc 25 ssl_crt_validator(NULL)
c29aceab
AJ
26{
27 ssl_crt_validator_Children.concurrency = 1;
28 STUB_NOP
29}
814f9a2e 30Ssl::Config::~Config() STUB_NOP
1b76e6c1
AJ
31Ssl::Config Ssl::TheConfig;
32
33#include "ssl/context_storage.h"
34//Ssl::CertificateStorageAction::CertificateStorageAction(const Mgr::Command::Pointer &cmd) STUB
0bf57f33 35Ssl::CertificateStorageAction::Pointer Ssl::CertificateStorageAction::Create(const Mgr::Command::Pointer &cmd) STUB_RETSTATREF(Ssl::CertificateStorageAction::Pointer)
1b76e6c1 36void Ssl::CertificateStorageAction::dump(StoreEntry *sentry) STUB
1b76e6c1 37void Ssl::GlobalContextStorage::addLocalStorage(Ip::Address const & address, size_t size_of_store) STUB
d4018dfb
CT
38Ssl::LocalContextStorage *Ssl::GlobalContextStorage::getLocalStorage(Ip::Address const & address)
39{ fatal(STUB_API " required"); static Ssl::LocalContextStorage v(0,0); return &v; }
1b76e6c1
AJ
40void Ssl::GlobalContextStorage::reconfigureStart() STUB
41//Ssl::GlobalContextStorage Ssl::TheGlobalContextStorage;
42
43#include "ssl/ErrorDetail.h"
13cd7dee
AJ
44Security::ErrorCode parseErrorString(const char *name) STUB_RETVAL(0)
45//const char *Ssl::getErrorName(Security::ErrorCode value) STUB_RETVAL(NULL)
46Ssl::ErrorDetail::ErrorDetail(Security::ErrorCode, X509 *, X509 *, const char *) STUB
1b76e6c1 47Ssl::ErrorDetail::ErrorDetail(ErrorDetail const &) STUB
0bf57f33 48const String & Ssl::ErrorDetail::toString() const STUB_RETSTATREF(String)
1b76e6c1
AJ
49
50#include "ssl/support.h"
36378e12
AJ
51namespace Ssl
52{
b23f5f9c 53bool InitServerContext(Security::ContextPointer &, AnyP::PortCfg &) STUB_RETVAL(false)
64769c79 54bool InitClientContext(Security::ContextPointer &, Security::PeerOptions &, long, const char *) STUB_RETVAL(false)
36378e12 55} // namespace Ssl
1b76e6c1
AJ
56int ssl_read_method(int, char *, int) STUB_RETVAL(0)
57int ssl_write_method(int, const char *, int) STUB_RETVAL(0)
36378e12 58void ssl_shutdown_method(SSL *ssl) STUB
1b76e6c1 59const char *sslGetUserEmail(SSL *ssl) STUB_RETVAL(NULL)
36378e12
AJ
60const char *sslGetUserAttribute(SSL *ssl, const char *attribute_name) STUB_RETVAL(NULL)
61const char *sslGetCAAttribute(SSL *ssl, const char *attribute_name) STUB_RETVAL(NULL)
1b76e6c1
AJ
62const char *sslGetUserCertificatePEM(SSL *ssl) STUB_RETVAL(NULL)
63const char *sslGetUserCertificateChainPEM(SSL *ssl) STUB_RETVAL(NULL)
36378e12
AJ
64namespace Ssl
65{
66//GETX509ATTRIBUTE GetX509UserAttribute;
67//GETX509ATTRIBUTE GetX509CAAttribute;
68//GETX509ATTRIBUTE GetX509Fingerprint;
69const char *BumpModeStr[] = {""};
f97700a0 70bool generateUntrustedCert(Security::CertPointer & untrustedCert, EVP_PKEY_Pointer & untrustedPkey, Security::CertPointer const & cert, EVP_PKEY_Pointer const & pkey) STUB_RETVAL(false)
0476ec45 71Security::ContextPointer generateSslContext(CertificateProperties const &, AnyP::PortCfg &) STUB_RETVAL(Security::ContextPointer())
b23f5f9c 72bool verifySslCertificate(Security::ContextPointer &, CertificateProperties const &) STUB_RETVAL(false)
0476ec45 73Security::ContextPointer generateSslContextUsingPkeyAndCertFromMemory(const char *, AnyP::PortCfg &) STUB_RETVAL(Security::ContextPointer())
b23f5f9c 74void addChainToSslContext(Security::ContextPointer &, STACK_OF(X509) *) STUB
f97700a0 75void readCertChainAndPrivateKeyFromFiles(Security::CertPointer & cert, EVP_PKEY_Pointer & pkey, X509_STACK_Pointer & chain, char const * certFilename, char const * keyFilename) STUB
36378e12
AJ
76int matchX509CommonNames(X509 *peer_cert, void *check_data, int (*check_func)(void *check_data, ASN1_STRING *cn_data)) STUB_RETVAL(0)
77bool checkX509ServerValidity(X509 *cert, const char *server) STUB_RETVAL(false)
78int asn1timeToString(ASN1_TIME *tm, char *buf, int len) STUB_RETVAL(0)
79bool setClientSNI(SSL *ssl, const char *fqdn) STUB_RETVAL(false)
36378e12 80} //namespace Ssl
0bf57f33
AJ
81
82#endif
f53969cc 83