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 3// found in the LICENSE file. 4 5#ifndef NET_OCSP_NSS_OCSP_H_ 6#define NET_OCSP_NSS_OCSP_H_ 7 8#include "net/base/net_export.h" 9 10namespace net { 11 12class URLRequestContext; 13 14// Sets the MessageLoop for NSS's HTTP client functions (i.e. OCSP, CA 15// certificate and CRL fetches) to the current message loop. This should be 16// called before EnsureNSSHttpIOInit() if you want to control the message loop. 17NET_EXPORT void SetMessageLoopForNSSHttpIO(); 18 19// Initializes HTTP client functions for NSS. This must be called before any 20// certificate verification functions. This function is thread-safe, and HTTP 21// handlers will only ever be initialized once. ShutdownNSSHttpIO() must be 22// called on shutdown. 23NET_EXPORT void EnsureNSSHttpIOInit(); 24 25// This should be called once on shutdown to stop issuing URLRequests for NSS 26// related HTTP fetches. 27NET_EXPORT void ShutdownNSSHttpIO(); 28 29// Can be called after a call to |ShutdownNSSHttpIO()| to reset internal state 30// and associate it with the current thread. 31NET_EXPORT void ResetNSSHttpIOForTesting(); 32 33// Sets the URLRequestContext for HTTP requests issued by NSS. 34NET_EXPORT void SetURLRequestContextForNSSHttpIO( 35 URLRequestContext* request_context); 36 37} // namespace net 38 39#endif // NET_OCSP_NSS_OCSP_H_ 40