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

Unified Diff: net/cert/nss_profile_filter_chromeos.cc

Issue 123633002: ChromeOS: Fix crash if login profile triggers client auth. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 6 years, 11 months 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
« no previous file with comments | « crypto/nss_util_internal.h ('k') | net/cert/nss_profile_filter_chromeos_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/nss_profile_filter_chromeos.cc
diff --git a/net/cert/nss_profile_filter_chromeos.cc b/net/cert/nss_profile_filter_chromeos.cc
index e4debce9d8b3682cda2837eb7d12fdf37fc0439b..48718174e8b37a4f0626c95fce7340034e795bd5 100644
--- a/net/cert/nss_profile_filter_chromeos.cc
+++ b/net/cert/nss_profile_filter_chromeos.cc
@@ -47,9 +47,16 @@ bool NSSProfileFilterChromeOS::IsModuleAllowed(PK11SlotInfo* slot) const {
// If this is one of the public/private slots for this profile, allow it.
if (slot == public_slot_.get() || slot == private_slot_.get())
return true;
- // If it's from the read-only slot, allow it.
- if (PK11_IsInternalKeySlot(slot))
+ // Allow the root certs module.
+ if (PK11_HasRootCerts(slot))
return true;
+ // If it's from the read-only slots, allow it.
+ if (PK11_IsInternal(slot) && !PK11_IsRemovable(slot))
+ return true;
+ // If |public_slot_| or |private_slot_| is null, there isn't a way to get the
+ // modules to use in the final test.
+ if (!public_slot_.get() || !private_slot_.get())
+ return false;
// If this is not the internal (file-system) module or the TPM module, allow
// it.
SECMODModule* module_for_slot = PK11_GetModule(slot);
« no previous file with comments | « crypto/nss_util_internal.h ('k') | net/cert/nss_profile_filter_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698