]>
Commit | Line | Data |
---|---|---|
4e0938ef | 1 | /* |
b8ae064d | 2 | * Copyright (C) 1996-2023 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 |
23 | Ssl::Config::Config(): |
24 | #if USE_SSL_CRTD | |
aee3523a | 25 | ssl_crtd(nullptr), |
c29aceab | 26 | #endif |
aee3523a | 27 | ssl_crt_validator(nullptr) |
c29aceab AJ |
28 | { |
29 | ssl_crt_validator_Children.concurrency = 1; | |
30 | STUB_NOP | |
31 | } | |
814f9a2e | 32 | Ssl::Config::~Config() STUB_NOP |
1b76e6c1 AJ |
33 | Ssl::Config Ssl::TheConfig; |
34 | ||
35 | #include "ssl/context_storage.h" | |
8b082ed9 FC |
36 | //Ssl::CertificateStorageAction::CertificateStorageAction(const Mgr::Command::Pointer &) STUB |
37 | Ssl::CertificateStorageAction::Pointer Ssl::CertificateStorageAction::Create(const Mgr::Command::Pointer &) STUB_RETSTATREF(Ssl::CertificateStorageAction::Pointer) | |
38 | void Ssl::CertificateStorageAction::dump(StoreEntry *) STUB | |
39 | void Ssl::GlobalContextStorage::addLocalStorage(Ip::Address const &, size_t ) STUB | |
40 | Ssl::LocalContextStorage *Ssl::GlobalContextStorage::getLocalStorage(Ip::Address const &) | |
72247610 | 41 | { fatal(STUB_API " required"); static LocalContextStorage v(0); return &v; } |
1b76e6c1 AJ |
42 | void Ssl::GlobalContextStorage::reconfigureStart() STUB |
43 | //Ssl::GlobalContextStorage Ssl::TheGlobalContextStorage; | |
44 | ||
45 | #include "ssl/ErrorDetail.h" | |
1b76e6c1 | 46 | #include "ssl/support.h" |
36378e12 AJ |
47 | namespace Ssl |
48 | { | |
8b082ed9 | 49 | bool ParseErrorString(const char *, Security::Errors &) STUB_RETVAL(false) |
51e09c08 | 50 | int AskPasswordCb(char *, int, int, void *) STUB_RETVAL(0) |
b23f5f9c | 51 | bool InitServerContext(Security::ContextPointer &, AnyP::PortCfg &) STUB_RETVAL(false) |
983fab6e | 52 | bool InitClientContext(Security::ContextPointer &, Security::PeerOptions &, Security::ParsedPortFlags) STUB_RETVAL(false) |
53 | void ConfigurePeerVerification(Security::ContextPointer &, const Security::ParsedPortFlags) STUB | |
54 | void DisablePeerVerification(Security::ContextPointer &) STUB | |
cf487124 | 55 | void MaybeSetupRsaCallback(Security::ContextPointer &) STUB |
36378e12 | 56 | } // namespace Ssl |
8b082ed9 FC |
57 | const char *sslGetUserEmail(SSL *) STUB_RETVAL(nullptr) |
58 | const char *sslGetUserAttribute(SSL *, const char *) STUB_RETVAL(nullptr) | |
59 | const char *sslGetCAAttribute(SSL *, const char *) STUB_RETVAL(nullptr) | |
60 | SBuf sslGetUserCertificatePEM(SSL *) STUB_RETVAL(SBuf()) | |
61 | SBuf sslGetUserCertificateChainPEM(SSL *) STUB_RETVAL(SBuf()) | |
36378e12 AJ |
62 | namespace Ssl |
63 | { | |
64 | //GETX509ATTRIBUTE GetX509UserAttribute; | |
65 | //GETX509ATTRIBUTE GetX509CAAttribute; | |
66 | //GETX509ATTRIBUTE GetX509Fingerprint; | |
ba6fffba | 67 | std::vector<const char *> BumpModeStr = {""}; |
cf487124 AJ |
68 | bool generateUntrustedCert(Security::CertPointer &, Security::PrivateKeyPointer &, Security::CertPointer const &, Security::PrivateKeyPointer const &) STUB_RETVAL(false) |
69 | Security::ContextPointer GenerateSslContext(CertificateProperties const &, Security::ServerOptions &, bool) STUB_RETVAL(Security::ContextPointer()) | |
8b082ed9 | 70 | bool verifySslCertificate(const Security::ContextPointer &, CertificateProperties const &) STUB_RETVAL(false) |
cf487124 | 71 | Security::ContextPointer GenerateSslContextUsingPkeyAndCertFromMemory(const char *, Security::ServerOptions &, bool) STUB_RETVAL(Security::ContextPointer()) |
8b082ed9 FC |
72 | int matchX509CommonNames(X509 *, void *, int (*)(void *, ASN1_STRING *)) STUB_RETVAL(0) |
73 | bool checkX509ServerValidity(X509 *, const char *) STUB_RETVAL(false) | |
74 | int asn1timeToString(ASN1_TIME *, char *, int) STUB_RETVAL(0) | |
75 | void setClientSNI(SSL *, const char *) STUB | |
76 | SBuf GetX509PEM(X509 *) STUB_RETVAL(SBuf()) | |
36378e12 | 77 | } //namespace Ssl |
0bf57f33 AJ |
78 | |
79 | #endif | |
f53969cc | 80 |