[389-commits] admserv/cgi-src40
Noriko Hosoi
nhosoi at fedoraproject.org
Wed May 27 20:12:31 UTC 2015
admserv/cgi-src40/security.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 8fc8d1dca1546a285dd7505a8ecb6602c748ac8b
Author: Noriko Hosoi <nhosoi at redhat.com>
Date: Wed May 27 13:10:53 2015 -0700
Ticket #47493 - Configuration Tab does not work with FIPS mode enabled
Description: To invoke Manage Certificate window, NSS slot needs to be
found by looking up the token name. When the token name is "internal
(software)", the slot is supposed to be found by PK11_GetInternalKeySlot
that provides the support for FIPS instead of PK11_FindSlotByName. This
patch calls the right api based upon the token type.
https://fedorahosted.org/389/ticket/47493
Reviewed by mreynolds at redhat.com (Thank you, Mark!!)
diff --git a/admserv/cgi-src40/security.c b/admserv/cgi-src40/security.c
index 34bf3a7..2d7f38d 100644
--- a/admserv/cgi-src40/security.c
+++ b/admserv/cgi-src40/security.c
@@ -890,13 +890,20 @@ static void listCert(char* tokenName) {
CERTCertList *certList;
CERTCertListNode *cln;
- PK11SlotInfo *slot = PK11_FindSlotByName(tokenName);
+ PK11SlotInfo *slot = NULL;
PK11SlotInfo *internal_slot;
char *internalTokenName;
+ if (tokenName && (!strcasecmp(tokenName, "internal") ||
+ !strcasecmp(tokenName, "internal (software)"))) {
+ slot = PK11_GetInternalKeySlot();
+ } else {
+ slot = PK11_FindSlotByName(tokenName);
+ }
+
if (!slot) {
- errorRpt(GENERAL_FAILURE, getResourceString(DBT_TOKEN_NAME));
- return;
+ errorRpt(GENERAL_FAILURE, getResourceString(DBT_TOKEN_NAME));
+ return;
}
if (PK11_IsInternal(slot)) {
More information about the 389-commits
mailing list