]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/ssl/helper.h
2 * Copyright (C) 1996-2017 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_SSL_HELPER_H
10 #define SQUID_SSL_HELPER_H
14 #include "base/AsyncJobCalls.h"
15 #include "base/LruMap.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. Use this class only
26 * over GetIntance() static method. This class use helper structure
27 * for threads management.
32 static Helper
* GetInstance(); ///< Instance class.
33 void Init(); ///< Init helper structure.
34 void Shutdown(); ///< Shutdown helper structure.
35 /// Submit crtd message to external crtd server.
36 void sslSubmit(CrtdMessage
const & message
, HLPCB
* callback
, void *data
);
41 helper
* ssl_crtd
; ///< helper for management of ssl_crtd.
45 class CertValidationRequest
;
46 class CertValidationResponse
;
47 class CertValidationHelper
50 typedef UnaryMemFunT
<Security::PeerConnector
, CertValidationResponse::Pointer
> CbDialer
;
52 typedef void CVHCB(void *, Ssl::CertValidationResponse
const &);
53 static CertValidationHelper
* GetInstance(); ///< Instance class.
54 void Init(); ///< Init helper structure.
55 void Shutdown(); ///< Shutdown helper structure.
56 /// Submit crtd request message to external crtd server.
57 void sslSubmit(Ssl::CertValidationRequest
const & request
, AsyncCall::Pointer
&);
59 CertValidationHelper();
60 ~CertValidationHelper();
62 helper
* ssl_crt_validator
; ///< helper for management of ssl_crtd.
64 typedef LruMap
<Ssl::CertValidationResponse::Pointer
, sizeof(Ssl::CertValidationResponse::Pointer
) + sizeof(Ssl::CertValidationResponse
)> LruCache
;
65 static LruCache
*HelperCache
; ///< cache for cert validation helper
70 #endif /* USE_OPENSSL */
71 #endif // SQUID_SSL_HELPER_H