2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_SRC_SSL_HELPER_H
10 #define SQUID_SRC_SSL_HELPER_H
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"
25 * Set of thread for ssl_crtd. This class is singleton.
26 * This class use helper structure for threads management.
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
);
37 static ::Helper::ClientPointer ssl_crtd
; ///< helper for management of ssl_crtd.
41 class CertValidationRequest
;
42 class CertValidationResponse
;
43 class CertValidationHelper
46 using Answer
= CertValidationResponse::Pointer
;
47 using Callback
= AsyncCallback
<Answer
>;
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
&);
56 static ::Helper::ClientPointer ssl_crt_validator
; ///< helper for management of ssl_crtd.
58 typedef ClpMap
<SBuf
, CertValidationResponse::Pointer
, CertValidationResponse::MemoryUsedByResponse
> CacheType
;
59 static CacheType
*HelperCache
; ///< cache for cert validation helper
64 #endif /* USE_OPENSSL */
65 #endif /* SQUID_SRC_SSL_HELPER_H */