diff options
author | relyea%netscape.com <devnull@localhost> | 2000-09-28 17:40:48 +0000 |
---|---|---|
committer | relyea%netscape.com <devnull@localhost> | 2000-09-28 17:40:48 +0000 |
commit | 7663da7888488917bc30ffbb025116ef939735c6 (patch) | |
tree | c73facafa81d2955f3e73cabbdefa98e238a2b1c | |
parent | bfa4a6fcf080345ed6d071989e7b2b42a5e306fb (diff) | |
download | nss-hg-7663da7888488917bc30ffbb025116ef939735c6.tar.gz |
Add function for determining if we have root cert modules.
fix bug in internal root cert modules.
-rw-r--r-- | security/nss/lib/pk11wrap/pk11func.h | 1 | ||||
-rw-r--r-- | security/nss/lib/pk11wrap/pk11slot.c | 4 | ||||
-rw-r--r-- | security/nss/lib/pk11wrap/pk11util.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/security/nss/lib/pk11wrap/pk11func.h b/security/nss/lib/pk11wrap/pk11func.h index 47d06d0f5..130daeba9 100644 --- a/security/nss/lib/pk11wrap/pk11func.h +++ b/security/nss/lib/pk11wrap/pk11func.h @@ -155,6 +155,7 @@ SECMODModuleID PK11_GetModuleID(PK11SlotInfo *slot); SECStatus PK11_GetSlotInfo(PK11SlotInfo *slot, CK_SLOT_INFO *info); SECStatus PK11_GetTokenInfo(PK11SlotInfo *slot, CK_TOKEN_INFO *info); PRBool PK11_IsDisabled(PK11SlotInfo *slot); +PRBool PK11_HasRootCerts(PK11SlotInfo *slot); PK11DisableReasons PK11_GetDisabledReason(PK11SlotInfo *slot); /* Prevents the slot from being used, and set disable reason to user-disable */ /* NOTE: Mechanisms that were ON continue to stay ON */ diff --git a/security/nss/lib/pk11wrap/pk11slot.c b/security/nss/lib/pk11wrap/pk11slot.c index 18a36f4fb..b2e27ec96 100644 --- a/security/nss/lib/pk11wrap/pk11slot.c +++ b/security/nss/lib/pk11wrap/pk11slot.c @@ -1907,6 +1907,10 @@ PRBool PK11_UserEnableSlot(PK11SlotInfo *slot) { return PR_TRUE; } +PRBool PK11_HasRootCerts(PK11SlotInfo *slot) { + return slot->hasRootCerts; +} + /* Get the module this slot is attatched to */ SECMODModule * PK11_GetModule(PK11SlotInfo *slot) diff --git a/security/nss/lib/pk11wrap/pk11util.c b/security/nss/lib/pk11wrap/pk11util.c index 98b5984dc..1a79c4e14 100644 --- a/security/nss/lib/pk11wrap/pk11util.c +++ b/security/nss/lib/pk11wrap/pk11util.c @@ -139,11 +139,9 @@ void SECMOD_init(char *dbname) { if (thisModule->module->internal) { found++; internalModule = SECMOD_ReferenceModule(thisModule->module); - break; } if (secmod_ModuleHasRoots(thisModule->module)) { rootFound++; - break; } } |