]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ssl/helper.h
Sync with trunk rev.13542
[thirdparty/squid.git] / src / ssl / helper.h
1 #ifndef SQUID_SSL_HELPER_H
2 #define SQUID_SSL_HELPER_H
3
4 #include "../helper.h"
5 #include "base/LruMap.h"
6 #include "ssl/cert_validate_message.h"
7 #include "ssl/crtd_message.h"
8
9 namespace Ssl
10 {
11 /**
12 * Set of thread for ssl_crtd. This class is singleton. Use this class only
13 * over GetIntance() static method. This class use helper structure
14 * for threads management.
15 */
16 #if USE_SSL_CRTD
17 class Helper
18 {
19 public:
20 static Helper * GetInstance(); ///< Instance class.
21 void Init(); ///< Init helper structure.
22 void Shutdown(); ///< Shutdown helper structure.
23 /// Submit crtd message to external crtd server.
24 void sslSubmit(CrtdMessage const & message, HLPCB * callback, void *data);
25 private:
26 Helper();
27 ~Helper();
28
29 helper * ssl_crtd; ///< helper for management of ssl_crtd.
30 };
31 #endif
32
33 class CertValidationRequest;
34 class CertValidationResponse;
35 class CertValidationHelper
36 {
37 public:
38 typedef void CVHCB(void *, Ssl::CertValidationResponse const &);
39 static CertValidationHelper * GetInstance(); ///< Instance class.
40 void Init(); ///< Init helper structure.
41 void Shutdown(); ///< Shutdown helper structure.
42 /// Submit crtd request message to external crtd server.
43 void sslSubmit(Ssl::CertValidationRequest const & request, CVHCB * callback, void *data);
44 private:
45 CertValidationHelper();
46 ~CertValidationHelper();
47
48 helper * ssl_crt_validator; ///< helper for management of ssl_crtd.
49 public:
50 static LruMap<Ssl::CertValidationResponse> *HelperCache; ///< cache for cert validation helper
51 };
52
53 } //namespace Ssl
54 #endif // SQUID_SSL_HELPER_H