1// Copyright (c) 2011 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#pragma once 8 9namespace net { 10 11class URLRequestContext; 12 13// Sets the MessageLoop for OCSP to the current message loop. 14// This should be called before EnsureOCSPInit() if you want to 15// control the message loop for OCSP. 16void SetMessageLoopForOCSP(); 17 18// Initializes OCSP handlers for NSS. This must be called before any 19// certificate verification functions. This function is thread-safe, and OCSP 20// handlers will only ever be initialized once. ShutdownOCSP() must be called 21// on shutdown. 22void EnsureOCSPInit(); 23 24// This should be called once on shutdown to stop issuing URLRequests for OCSP. 25void ShutdownOCSP(); 26 27// Set URLRequestContext for OCSP handlers. 28void SetURLRequestContextForOCSP(URLRequestContext* request_context); 29URLRequestContext* GetURLRequestContextForOCSP(); 30 31} // namespace net 32 33#endif // NET_OCSP_NSS_OCSP_H_ 34