--- lib/softoken/pkcs11c.c.orig 2020-05-01 21:08:55 UTC +++ lib/softoken/pkcs11c.c @@ -6106,9 +6106,6 @@ sftk_unwrapPrivateKey(SFTKObject *key, SECItem *bpki) break; case NSSLOWKEYDSAKey: keyType = CKK_DSA; - crv = (sftk_hasAttribute(key, CKA_NSS_DB)) ? CKR_OK : CKR_KEY_TYPE_INCONSISTENT; - if (crv != CKR_OK) - break; crv = sftk_AddAttributeType(key, CKA_KEY_TYPE, &keyType, sizeof(keyType)); if (crv != CKR_OK) @@ -6148,9 +6145,6 @@ sftk_unwrapPrivateKey(SFTKObject *key, SECItem *bpki) /* what about fortezza??? */ case NSSLOWKEYECKey: keyType = CKK_EC; - crv = (sftk_hasAttribute(key, CKA_NSS_DB)) ? CKR_OK : CKR_KEY_TYPE_INCONSISTENT; - if (crv != CKR_OK) - break; crv = sftk_AddAttributeType(key, CKA_KEY_TYPE, &keyType, sizeof(keyType)); if (crv != CKR_OK)