]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/stub_libsslsquid.cc
Merged from v5 r15006
[thirdparty/squid.git] / src / tests / stub_libsslsquid.cc
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"
21 Ssl::Config::Config():
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 }
30 Ssl::Config::~Config() STUB_NOP
31 Ssl::Config Ssl::TheConfig;
32
33 #include "ssl/context_storage.h"
34 //Ssl::CertificateStorageAction::CertificateStorageAction(const Mgr::Command::Pointer &cmd) STUB
35 Ssl::CertificateStorageAction::Pointer Ssl::CertificateStorageAction::Create(const Mgr::Command::Pointer &cmd) STUB_RETSTATREF(Ssl::CertificateStorageAction::Pointer)
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; }
40 void Ssl::GlobalContextStorage::reconfigureStart() STUB
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 {
53 bool InitServerContext(Security::ContextPointer &, AnyP::PortCfg &) STUB_RETVAL(false)
54 bool InitClientContext(Security::ContextPointer &, Security::PeerOptions &, const char *) STUB_RETVAL(false)
55 } // namespace Ssl
56 const char *sslGetUserEmail(SSL *ssl) STUB_RETVAL(NULL)
57 const char *sslGetUserAttribute(SSL *ssl, const char *attribute_name) STUB_RETVAL(NULL)
58 const char *sslGetCAAttribute(SSL *ssl, const char *attribute_name) STUB_RETVAL(NULL)
59 const char *sslGetUserCertificatePEM(SSL *ssl) STUB_RETVAL(NULL)
60 const char *sslGetUserCertificateChainPEM(SSL *ssl) STUB_RETVAL(NULL)
61 namespace Ssl
62 {
63 //GETX509ATTRIBUTE GetX509UserAttribute;
64 //GETX509ATTRIBUTE GetX509CAAttribute;
65 //GETX509ATTRIBUTE GetX509Fingerprint;
66 std::vector<const char *> BumpModeStr = {""};
67 bool generateUntrustedCert(Security::CertPointer & untrustedCert, EVP_PKEY_Pointer & untrustedPkey, Security::CertPointer const & cert, EVP_PKEY_Pointer const & pkey) STUB_RETVAL(false)
68 Security::ContextPointer generateSslContext(CertificateProperties const &, AnyP::PortCfg &) STUB_RETVAL(Security::ContextPointer())
69 bool verifySslCertificate(Security::ContextPointer &, CertificateProperties const &) STUB_RETVAL(false)
70 Security::ContextPointer generateSslContextUsingPkeyAndCertFromMemory(const char *, AnyP::PortCfg &) STUB_RETVAL(Security::ContextPointer())
71 void addChainToSslContext(Security::ContextPointer &, STACK_OF(X509) *) STUB
72 void readCertChainAndPrivateKeyFromFiles(Security::CertPointer & cert, EVP_PKEY_Pointer & pkey, X509_STACK_Pointer & chain, char const * certFilename, char const * keyFilename) STUB
73 int matchX509CommonNames(X509 *peer_cert, void *check_data, int (*check_func)(void *check_data, ASN1_STRING *cn_data)) STUB_RETVAL(0)
74 bool checkX509ServerValidity(X509 *cert, const char *server) STUB_RETVAL(false)
75 int asn1timeToString(ASN1_TIME *tm, char *buf, int len) STUB_RETVAL(0)
76 bool setClientSNI(SSL *ssl, const char *fqdn) STUB_RETVAL(false)
77 } //namespace Ssl
78
79 #endif
80