rmsg.size = 1024;
rmsg.size = sizeof(tempbuf);
static int hwcrhk_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,			const BIGNUM *m, BN_CTX *ctx)	{	char tempbuf[1024];	HWCryptoHook_ErrMsgBuf rmsg;	/* Since HWCryptoHook_MPI is pretty compatible with BIGNUM's,	   we use them directly, plus a little macro magic.  We only	   thing we need to make sure of is that enough space is allocated. */	HWCryptoHook_MPI m_a, m_p, m_n, m_r;	int to_return, ret; 	to_return = 0; /* expect failure */	rmsg.buf = tempbuf;	rmsg.size = 1024;	if(!hwcrhk_context)		{		HWCRHKerr(HWCRHK_F_HWCRHK_MOD_EXP,HWCRHK_R_NOT_INITIALISED);		goto err;		}	/* Prepare the params */	bn_expand2(r, m->top);	/* Check for error !! */	BN2MPI(m_a, a);	BN2MPI(m_p, p);	BN2MPI(m_n, m);	MPI2BN(r, m_r);	/* Perform the operation */	ret = p_hwcrhk_ModExp(hwcrhk_context, m_a, m_p, m_n, &m_r, &rmsg);	/* Convert the response */	r->top = m_r.size / sizeof(BN_ULONG);	bn_fix_top(r);	if (ret < 0)		{		/* FIXME: When this error is returned, HWCryptoHook is		   telling us that falling back to software computation		   might be a good thing. */		if(ret == HWCRYPTOHOOK_ERROR_FALLBACK)			{			HWCRHKerr(HWCRHK_F_HWCRHK_MOD_EXP,HWCRHK_R_REQUEST_FALLBACK);			}		else			{			HWCRHKerr(HWCRHK_F_HWCRHK_MOD_EXP,HWCRHK_R_REQUEST_FAILED);			}		ERR_add_error_data(1,rmsg.buf);		goto err;		}	to_return = 1;err:	return to_return;	}