Merge pull request #156 from deepak1556/nss_ocsp_patch
provide request context for oscp session creation
This commit is contained in:
commit
cab52fedc6
1 changed files with 11 additions and 0 deletions
|
@ -44,6 +44,10 @@
|
||||||
#include "url/url_constants.h"
|
#include "url/url_constants.h"
|
||||||
#include "storage/browser/quota/special_storage_policy.h"
|
#include "storage/browser/quota/special_storage_policy.h"
|
||||||
|
|
||||||
|
#if defined(USE_NSS_CERTS)
|
||||||
|
#include "net/cert_net/nss_ocsp.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
using content::BrowserThread;
|
using content::BrowserThread;
|
||||||
|
|
||||||
namespace brightray {
|
namespace brightray {
|
||||||
|
@ -156,6 +160,9 @@ URLRequestContextGetter::URLRequestContextGetter(
|
||||||
}
|
}
|
||||||
|
|
||||||
URLRequestContextGetter::~URLRequestContextGetter() {
|
URLRequestContextGetter::~URLRequestContextGetter() {
|
||||||
|
#if defined(USE_NSS_CERTS)
|
||||||
|
net::SetURLRequestContextForNSSHttpIO(NULL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
net::HostResolver* URLRequestContextGetter::host_resolver() {
|
net::HostResolver* URLRequestContextGetter::host_resolver() {
|
||||||
|
@ -169,6 +176,10 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
|
||||||
auto& command_line = *base::CommandLine::ForCurrentProcess();
|
auto& command_line = *base::CommandLine::ForCurrentProcess();
|
||||||
url_request_context_.reset(new net::URLRequestContext);
|
url_request_context_.reset(new net::URLRequestContext);
|
||||||
|
|
||||||
|
#if defined(USE_NSS_CERTS)
|
||||||
|
net::SetURLRequestContextForNSSHttpIO(url_request_context_.get());
|
||||||
|
#endif
|
||||||
|
|
||||||
// --log-net-log
|
// --log-net-log
|
||||||
net_log_->StartLogging(url_request_context_.get());
|
net_log_->StartLogging(url_request_context_.get());
|
||||||
url_request_context_->set_net_log(net_log_);
|
url_request_context_->set_net_log(net_log_);
|
||||||
|
|
Loading…
Reference in a new issue