Add function for determining if we have root cert modules.

fix bug in internal root cert modules.
This commit is contained in:
relyea%netscape.com 2000-09-28 17:40:48 +00:00
Родитель f027a38474
Коммит 448fea8c67
3 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -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 */

Просмотреть файл

@ -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)

Просмотреть файл

@ -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;
}
}