OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_OCSP_NSS_OCSP_H_ | 5 #ifndef NET_OCSP_NSS_OCSP_H_ |
6 #define NET_OCSP_NSS_OCSP_H_ | 6 #define NET_OCSP_NSS_OCSP_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "net/base/net_export.h" | 9 #include "net/base/net_export.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
12 | 12 |
13 class URLRequestContext; | 13 class URLRequestContext; |
14 | 14 |
15 // Sets the MessageLoop for OCSP to the current message loop. | 15 // Sets the MessageLoop for NSS's HTTP client functions (i.e. OCSP, CA |
16 // This should be called before EnsureOCSPInit() if you want to | 16 // certificate and CRL fetches) to the current message loop. This should be |
17 // control the message loop for OCSP. | 17 // called before EnsureNSSHttpIOInit() if you want to control the message loop. |
18 NET_EXPORT void SetMessageLoopForOCSP(); | 18 NET_EXPORT void SetMessageLoopForNSSHttpIO(); |
19 | 19 |
20 // Initializes OCSP handlers for NSS. This must be called before any | 20 // Initializes HTTP client functions for NSS. This must be called before any |
21 // certificate verification functions. This function is thread-safe, and OCSP | 21 // certificate verification functions. This function is thread-safe, and HTTP |
22 // handlers will only ever be initialized once. ShutdownOCSP() must be called | 22 // handlers will only ever be initialized once. ShutdownNSSHttpIO() must be |
23 // on shutdown. | 23 // called on shutdown. |
24 NET_EXPORT void EnsureOCSPInit(); | 24 NET_EXPORT void EnsureNSSHttpIOInit(); |
25 | 25 |
26 // This should be called once on shutdown to stop issuing URLRequests for OCSP. | 26 // This should be called once on shutdown to stop issuing URLRequests for NSS |
27 NET_EXPORT void ShutdownOCSP(); | 27 // related HTTP fetches. |
| 28 NET_EXPORT void ShutdownNSSHttpIO(); |
28 | 29 |
29 // Set URLRequestContext for OCSP handlers. | 30 // Sets the URLRequestContext for HTTP requests issued by NSS. |
30 NET_EXPORT void SetURLRequestContextForOCSP(URLRequestContext* request_context); | 31 NET_EXPORT void SetURLRequestContextForNSSHttpIO( |
| 32 URLRequestContext* request_context); |
31 | 33 |
32 } // namespace net | 34 } // namespace net |
33 | 35 |
34 #endif // NET_OCSP_NSS_OCSP_H_ | 36 #endif // NET_OCSP_NSS_OCSP_H_ |
OLD | NEW |