const SECHashObject *hashObj = SEC_GetRawHashObject(hash);
const SECHashObject *hashObj = HASH_GetRawHashObject(hash);
sftk_doHMACInit(SFTKSessionContext *context,HASH_HashType hash,					SFTKObject *key, CK_ULONG mac_size){    SFTKAttribute *keyval;    HMACContext *HMACcontext;    CK_ULONG *intpointer;    const SECHashObject *hashObj = SEC_GetRawHashObject(hash);    PRBool isFIPS = (key->slot->slotID == FIPS_SLOT_ID);    /* required by FIPS 198 Section 4 */    if (isFIPS && (mac_size < 4 || mac_size < hashObj->length/2)) {	return CKR_BUFFER_TOO_SMALL;    }    keyval = sftk_FindAttribute(key,CKA_VALUE);    if (keyval == NULL) return CKR_KEY_SIZE_RANGE;    HMACcontext = HMAC_Create(hashObj, 		(const unsigned char*)keyval->attrib.pValue,		keyval->attrib.ulValueLen, isFIPS);    context->hashInfo = HMACcontext;    context->multi = PR_TRUE;    sftk_FreeAttribute(keyval);    if (context->hashInfo == NULL) {	if (PORT_GetError() == SEC_ERROR_INVALID_ARGS) {	    return CKR_KEY_SIZE_RANGE;	}	return CKR_HOST_MEMORY;    }    context->hashUpdate = (SFTKHash) HMAC_Update;    context->end = (SFTKEnd) HMAC_Finish;    context->hashdestroy = (SFTKDestroy) sftk_HMAC_Destroy;    intpointer = (CK_ULONG *) PORT_Alloc(sizeof(CK_ULONG));    if (intpointer == NULL) {	return CKR_HOST_MEMORY;    }    *intpointer = mac_size;    context->cipherInfo = (void *) intpointer;    context->destroy = (SFTKDestroy) sftk_Space;    context->update = (SFTKCipher) sftk_HMACCopy;    context->verify = (SFTKVerify) sftk_HMACCmp;    context->maxLen = hashObj->length;    HMAC_Begin(HMACcontext);    return CKR_OK;}