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

Unified Diff: crypto/nss_util.cc

Issue 11411013: Initialize NSS in the PPAPI process for ClearKey CDM. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase and address Brett's comment. Created 8 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
« crypto/nss_util.h ('K') | « crypto/nss_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/nss_util.cc
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc
index 26626e7f7d5c5811ff386e4a8418953aae809b3c..335d9cfa92decfb2ebcf59aec716c311870227fd 100644
--- a/crypto/nss_util.cc
+++ b/crypto/nss_util.cc
@@ -650,6 +650,17 @@ void EnsureNSPRInit() {
g_nspr_singleton.Get();
}
+void WarmUpNSSSafely() {
+ // We might fork, but we haven't loaded any security modules.
+ crypto::DisableNSSForkCheck();
+ // If we're sandboxed, we shouldn't be able to open user security modules,
+ // but it's more correct to tell NSS to not even try.
+ // Loading user security modules would have security implications.
+ crypto::ForceNSSNoDBInit();
+ // Initialize NSS.
+ crypto::EnsureNSSInit();
wtc 2012/11/21 00:28:21 Remove the crypto:: prefixes because this is insid
+}
+
void EnsureNSSInit() {
// Initializing SSL causes us to do blocking IO.
// Temporarily allow it until we fix
« crypto/nss_util.h ('K') | « crypto/nss_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698