CK_BBOOL cktrue = CK_TRUE; CK_BBOOL ckfalse = CK_FALSE; PK11Attribute *attribute = NULL;
pk11_handleSecretKeyObject(PK11Object *object,CK_KEY_TYPE key_type,								PRBool isFIPS){    CK_RV crv;    CK_BBOOL cktrue = CK_TRUE;    CK_BBOOL ckfalse = CK_FALSE;    PK11Attribute *attribute = NULL;    SECKEYLowPrivateKey *privKey = NULL;    SECItem pubKey;    pubKey.data = 0;    /* First validate and set defaults */    crv = validateSecretKey(object, key_type, isFIPS);    if (crv != CKR_OK) goto loser;    /* If the object is a TOKEN object, store in the database */    if (pk11_isTrue(object,CKA_TOKEN)) {	char *label;	SECStatus rv = SECSuccess;	privKey=pk11_mkSecretKeyRep(object);	if (privKey == NULL) return CKR_HOST_MEMORY;	label = object->label = pk11_getString(object,CKA_LABEL);	crv = pk11_Attribute2SecItem(NULL,&pubKey,object,CKA_ID);  /* Should this be ID? */	if (crv != CKR_OK) goto loser;	rv = SECKEY_StoreKeyByPublicKey(SECKEY_GetDefaultKeyDB(),			privKey, &pubKey, label,			(SECKEYGetPasswordKey) pk11_givePass, object->slot);	if (rv != SECSuccess) {	    crv = CKR_DEVICE_ERROR;	}	object->inDB = PR_TRUE;        object->handle |= (PK11_TOKEN_MAGIC | PK11_TOKEN_TYPE_PRIV);    }loser:    if (privKey) SECKEY_LowDestroyPrivateKey(privKey);    if (pubKey.data) PORT_Free(pubKey.data);    return crv;}