summaryrefslogtreecommitdiffstats
path: root/engines
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2007-05-31 12:32:27 +0000
committerDr. Stephen Henson <steve@openssl.org>2007-05-31 12:32:27 +0000
commit0aa08a2e34bd905d14e2f684df724d4fd925b43b (patch)
treee1432e08535490e28acb8d6881e77934eb2273d9 /engines
parentf20af723121b9a14dd248053b875ef9272ba7ffd (diff)
Fix for GOST engine on platforms where sizeof(size_t) != sizeof(int).
Diffstat (limited to 'engines')
-rw-r--r--engines/ccgost/gost_pmeth.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/ccgost/gost_pmeth.c b/engines/ccgost/gost_pmeth.c
index 746e681db1..621c209b42 100644
--- a/engines/ccgost/gost_pmeth.c
+++ b/engines/ccgost/gost_pmeth.c
@@ -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)