Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1245)

Unified Diff: net/base/openssl_util.cc

Issue 4646001: Implement LoadTemporaryRoot for Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/net/base
Patch Set: bulach and wtc feedback Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/openssl_util.cc
diff --git a/net/base/openssl_util.cc b/net/base/openssl_util.cc
index 51797ac88c205db021dfbfc5a4efea51ffa7de1f..a4f61c1fe9dd2bcdf87da62319b2606cc9aad66f 100644
--- a/net/base/openssl_util.cc
+++ b/net/base/openssl_util.cc
@@ -35,13 +35,11 @@ SSL_CTX* CreateSSL_CTX() {
OpenSSLInitSingleton::OpenSSLInitSingleton()
: ssl_ctx_(CreateSSL_CTX()),
- store_(X509_STORE_new()) {
+ store_(NULL) {
CHECK(ssl_ctx_.get());
- CHECK(store_.get());
+ ReinitializeStore();
SSL_CTX_set_cert_verify_callback(ssl_ctx_.get(), NoOpVerifyCallback, NULL);
- X509_STORE_set_default_paths(store_.get());
- // TODO(bulach): Enable CRL (see X509_STORE_set_flags(X509_V_FLAG_CRL_CHECK)).
int num_locks = CRYPTO_num_locks();
for (int i = 0; i < num_locks; ++i)
locks_.push_back(new Lock());
@@ -82,5 +80,12 @@ void OpenSSLInitSingleton::OnLockingCallback(int mode,
locks_[n]->Release();
}
+void OpenSSLInitSingleton::ReinitializeStore() {
+ store_.reset(X509_STORE_new());
+ CHECK(store_.get());
+ X509_STORE_set_default_paths(store_.get());
+ // TODO(bulach): Enable CRL (see X509_STORE_set_flags(X509_V_FLAG_CRL_CHECK)).
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698