if (!PK11_HasAttributeSet(slot,wrappingKey->pkcs11ID,CKA_PRIVATE)) {
if (SECKEY_HAS_ATTRIBUTE_SET(wrappingKey,CKA_PRIVATE)) {
PK11_PubUnwrapSymKeyWithFlagsPerm(SECKEYPrivateKey *wrappingKey, 	  SECItem *wrappedKey, CK_MECHANISM_TYPE target, 	  CK_ATTRIBUTE_TYPE operation, int keySize,	  CK_FLAGS flags, PRBool isPerm){    CK_MECHANISM_TYPE wrapType = pk11_mapWrapKeyType(wrappingKey->keyType);    CK_BBOOL        cktrue	= CK_TRUE;     CK_ATTRIBUTE    keyTemplate[MAX_TEMPL_ATTRS];    CK_ATTRIBUTE    *attrs;    unsigned int    templateCount;    PK11SlotInfo    *slot = wrappingKey->pkcs11Slot;    attrs = keyTemplate;    if (isPerm) {        PK11_SETATTRS(attrs, CKA_TOKEN,  &cktrue, sizeof(CK_BBOOL)); attrs++;    }    templateCount = attrs-keyTemplate;    templateCount += pk11_FlagsToAttributes(flags, attrs, &cktrue);    if (!PK11_HasAttributeSet(slot,wrappingKey->pkcs11ID,CKA_PRIVATE)) {	PK11_HandlePasswordCheck(slot,wrappingKey->wincx);    }        return pk11_AnyUnwrapKey(slot, wrappingKey->pkcs11ID,	wrapType, NULL, wrappedKey, target, operation, keySize, 	wrappingKey->wincx, keyTemplate, templateCount, isPerm);}