提交 0aa08a2e 编写于 作者: D Dr. Stephen Henson

Fix for GOST engine on platforms where sizeof(size_t) != sizeof(int).

上级 f20af723
......@@ -651,12 +651,16 @@ static int pkey_gost_mac_signctx_init(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx)
static int pkey_gost_mac_signctx(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, EVP_MD_CTX *mctx)
{
unsigned int tmpsiglen=*siglen; /* for platforms where sizeof(int)!=sizeof(size_t)*/
int ret;
if (!sig)
{
*siglen = 4;
return 1;
}
return EVP_DigestFinal_ex(mctx,sig,siglen);
ret=EVP_DigestFinal_ex(mctx,sig,&tmpsiglen);
*siglen = tmpsiglen;
return ret;
}
/* ----------------------------------------------------------------*/
int register_pmeth_gost(int id, EVP_PKEY_METHOD **pmeth,int flags)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册