]> git.ipfire.org Git - thirdparty/squid.git/blame_incremental - src/ssl/helper.h
Simplify appending SBuf to String (#2108)
[thirdparty/squid.git] / src / ssl / helper.h
... / ...
CommitLineData
1/*
2 * Copyright (C) 1996-2025 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#ifndef SQUID_SRC_SSL_HELPER_H
10#define SQUID_SRC_SSL_HELPER_H
11
12#if USE_OPENSSL
13
14#include "base/AsyncJobCalls.h"
15#include "base/ClpMap.h"
16#include "helper/forward.h"
17#include "security/forward.h"
18#include "ssl/cert_validate_message.h"
19#include "ssl/crtd_message.h"
20
21namespace Ssl
22{
23#if USE_SSL_CRTD
24/**
25 * Set of thread for ssl_crtd. This class is singleton.
26 * This class use helper structure for threads management.
27 */
28class Helper
29{
30public:
31 static void Init(); ///< Init helper structure.
32 static void Shutdown(); ///< Shutdown helper structure.
33 static void Reconfigure(); ///< Reconfigure helper structure.
34 /// Submit crtd message to external crtd server.
35 static void Submit(CrtdMessage const & message, HLPCB * callback, void *data);
36private:
37 static ::Helper::ClientPointer ssl_crtd; ///< helper for management of ssl_crtd.
38};
39#endif
40
41class CertValidationRequest;
42class CertValidationResponse;
43class CertValidationHelper
44{
45public:
46 using Answer = CertValidationResponse::Pointer;
47 using Callback = AsyncCallback<Answer>;
48
49 typedef void CVHCB(void *, Ssl::CertValidationResponse const &);
50 static void Init(); ///< Init helper structure.
51 static void Shutdown(); ///< Shutdown helper structure.
52 static void Reconfigure(); ///< Reconfigure helper structure
53 /// Submit crtd request message to external crtd server.
54 static void Submit(const Ssl::CertValidationRequest &, const Callback &);
55private:
56 static ::Helper::ClientPointer ssl_crt_validator; ///< helper for management of ssl_crtd.
57public:
58 typedef ClpMap<SBuf, CertValidationResponse::Pointer, CertValidationResponse::MemoryUsedByResponse> CacheType;
59 static CacheType *HelperCache; ///< cache for cert validation helper
60};
61
62} //namespace Ssl
63
64#endif /* USE_OPENSSL */
65#endif /* SQUID_SRC_SSL_HELPER_H */
66