PR_ASSERT(slot != NULL);
Java_org_mozilla_jss_pkcs11_PK11Token_doesAlgorithm  (JNIEnv *env, jobject this, jobject alg){	PK11SlotInfo *slot;    CK_MECHANISM_TYPE mech;	jboolean doesMech = JNI_FALSE;	if( JSS_PK11_getTokenSlotPtr(env, this, &slot) != PR_SUCCESS) {		PR_ASSERT( (*env)->ExceptionOccurred(env) != NULL);		goto finish;	}    mech = JSS_getPK11MechFromAlg(env, alg);    PR_ASSERT( mech != CKM_INVALID_MECHANISM );	if( PK11_DoesMechanism(slot, mech) == PR_TRUE) {		doesMech = JNI_TRUE;	}    /* HACK...exceptions */    if( PK11_IsInternal(slot) && mech == CKM_PBA_SHA1_WITH_SHA1_HMAC ) {        /* Although the internal slot doesn't actually do this mechanism,         * we do it by hand in PK11KeyGenerator.c */        doesMech = JNI_TRUE;    }finish:	return doesMech;}