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

Unified Diff: nss/lib/softoken/fipstokn.c

Issue 1017413002: Uprev NSS to 3.18 RTM (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@nspr_uprev
Patch Set: Rebased Created 5 years, 9 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 | « nss/lib/pki/trustdomain.c ('k') | nss/lib/softoken/lowpbe.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nss/lib/softoken/fipstokn.c
diff --git a/nss/lib/softoken/fipstokn.c b/nss/lib/softoken/fipstokn.c
index 9435e71c661cf4688f8f1f48b4ce699fd4f7b816..3cb6b794def339613425fc2c7989fe6ffb1e8b98 100644
--- a/nss/lib/softoken/fipstokn.c
+++ b/nss/lib/softoken/fipstokn.c
@@ -720,13 +720,22 @@ CK_RV FC_GetSlotInfo(CK_SLOT_ID slotID, CK_SLOT_INFO_PTR pInfo) {
CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount,
CK_OBJECT_HANDLE_PTR phObject) {
CK_OBJECT_CLASS * classptr;
+ CK_RV rv = CKR_OK;
- SFTK_FIPSCHECK();
CHECK_FORK();
classptr = (CK_OBJECT_CLASS *)fc_getAttribute(pTemplate,ulCount,CKA_CLASS);
if (classptr == NULL) return CKR_TEMPLATE_INCOMPLETE;
+ if (*classptr == CKO_NETSCAPE_NEWSLOT || *classptr == CKO_NETSCAPE_DELSLOT) {
+ if (sftk_fatalError)
+ return CKR_DEVICE_ERROR;
+ } else {
+ rv = sftk_fipsCheck();
+ if (rv != CKR_OK)
+ return rv;
+ }
+
/* FIPS can't create keys from raw key material */
if (SFTK_IS_NONPUBLIC_KEY_OBJECT(*classptr)) {
rv = CKR_ATTRIBUTE_VALUE_INVALID;
« no previous file with comments | « nss/lib/pki/trustdomain.c ('k') | nss/lib/softoken/lowpbe.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698