DSA method slightly more tested and fixed ;-)
This commit is contained in:
parent
94299a36a6
commit
694ce314a8
@ -865,6 +865,10 @@ static DSA_SIG *capi_dsa_do_sign(const unsigned char *digest, int dlen,
|
|||||||
ret = DSA_SIG_new();
|
ret = DSA_SIG_new();
|
||||||
if (!ret)
|
if (!ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
ret->r = BN_new();
|
||||||
|
ret->s = BN_new();
|
||||||
|
if (!ret->r || !ret->s)
|
||||||
|
goto err;
|
||||||
if (!lend_tobn(ret->r, csigbuf, 20)
|
if (!lend_tobn(ret->r, csigbuf, 20)
|
||||||
|| !lend_tobn(ret->s, csigbuf + 20, 20))
|
|| !lend_tobn(ret->s, csigbuf + 20, 20))
|
||||||
{
|
{
|
||||||
@ -879,7 +883,6 @@ static DSA_SIG *capi_dsa_do_sign(const unsigned char *digest, int dlen,
|
|||||||
err:
|
err:
|
||||||
OPENSSL_cleanse(csigbuf, 40);
|
OPENSSL_cleanse(csigbuf, 40);
|
||||||
CryptDestroyHash(hash);
|
CryptDestroyHash(hash);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user