summaryrefslogtreecommitdiffstats
path: root/net/ocsp
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-14 14:25:09 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-14 14:25:09 +0000
commit8c434cbca7f80a688d546288c5497e184062be66 (patch)
treea21a10b9ad17e5169530346dd229ea38e2632cf6 /net/ocsp
parentb647ed2eaab8f34ba9ae19c6472fa5021b0913d4 (diff)
downloadchromium_src-8c434cbca7f80a688d546288c5497e184062be66.zip
chromium_src-8c434cbca7f80a688d546288c5497e184062be66.tar.gz
chromium_src-8c434cbca7f80a688d546288c5497e184062be66.tar.bz2
net: always enable NSS's HTTP fetches
By tying them to revocation checking and disabling revocation checking by default, I broke AIA chasing on Linux. This change also renames the public functions in nss_ocsp.cc to better reflect that HTTP fetching is used for more than just OCSP. BUG=117832 TEST=none (yet) Review URL: https://chromiumcodereview.appspot.com/9693004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126637 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ocsp')
-rw-r--r--net/ocsp/nss_ocsp.cc8
-rw-r--r--net/ocsp/nss_ocsp.h30
2 files changed, 20 insertions, 18 deletions
diff --git a/net/ocsp/nss_ocsp.cc b/net/ocsp/nss_ocsp.cc
index 1eb0b21..07cd019 100644
--- a/net/ocsp/nss_ocsp.cc
+++ b/net/ocsp/nss_ocsp.cc
@@ -915,7 +915,7 @@ char* GetAlternateOCSPAIAInfo(CERTCertificate *cert) {
namespace net {
-void SetMessageLoopForOCSP() {
+void SetMessageLoopForNSSHttpIO() {
// Must have a MessageLoopForIO.
DCHECK(MessageLoopForIO::current());
@@ -925,17 +925,17 @@ void SetMessageLoopForOCSP() {
DCHECK(!used);
}
-void EnsureOCSPInit() {
+void EnsureNSSHttpIOInit() {
g_ocsp_io_loop.Get().StartUsing();
g_ocsp_nss_initialization.Get();
}
-void ShutdownOCSP() {
+void ShutdownNSSHttpIO() {
g_ocsp_io_loop.Get().Shutdown();
}
// This function would be called before NSS initialization.
-void SetURLRequestContextForOCSP(URLRequestContext* request_context) {
+void SetURLRequestContextForNSSHttpIO(URLRequestContext* request_context) {
pthread_mutex_lock(&g_request_context_lock);
if (request_context) {
DCHECK(!g_request_context);
diff --git a/net/ocsp/nss_ocsp.h b/net/ocsp/nss_ocsp.h
index bf67751..d56dd26 100644
--- a/net/ocsp/nss_ocsp.h
+++ b/net/ocsp/nss_ocsp.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -12,22 +12,24 @@ namespace net {
class URLRequestContext;
-// Sets the MessageLoop for OCSP to the current message loop.
-// This should be called before EnsureOCSPInit() if you want to
-// control the message loop for OCSP.
-NET_EXPORT void SetMessageLoopForOCSP();
+// Sets the MessageLoop for NSS's HTTP client functions (i.e. OCSP, CA
+// certificate and CRL fetches) to the current message loop. This should be
+// called before EnsureNSSHttpIOInit() if you want to control the message loop.
+NET_EXPORT void SetMessageLoopForNSSHttpIO();
-// Initializes OCSP handlers for NSS. This must be called before any
-// certificate verification functions. This function is thread-safe, and OCSP
-// handlers will only ever be initialized once. ShutdownOCSP() must be called
-// on shutdown.
-NET_EXPORT void EnsureOCSPInit();
+// Initializes HTTP client functions for NSS. This must be called before any
+// certificate verification functions. This function is thread-safe, and HTTP
+// handlers will only ever be initialized once. ShutdownNSSHttpIO() must be
+// called on shutdown.
+NET_EXPORT void EnsureNSSHttpIOInit();
-// This should be called once on shutdown to stop issuing URLRequests for OCSP.
-NET_EXPORT void ShutdownOCSP();
+// This should be called once on shutdown to stop issuing URLRequests for NSS
+// related HTTP fetches.
+NET_EXPORT void ShutdownNSSHttpIO();
-// Set URLRequestContext for OCSP handlers.
-NET_EXPORT void SetURLRequestContextForOCSP(URLRequestContext* request_context);
+// Sets the URLRequestContext for HTTP requests issued by NSS.
+NET_EXPORT void SetURLRequestContextForNSSHttpIO(
+ URLRequestContext* request_context);
} // namespace net