From 694ce314a88fa9c203e6fdff7ecefed607f6bee4 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 30 May 2008 17:44:36 +0000 Subject: [PATCH] DSA method slightly more tested and fixed ;-) --- engines/e_capi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engines/e_capi.c b/engines/e_capi.c index 445ec91af0..deea50c723 100644 --- a/engines/e_capi.c +++ b/engines/e_capi.c @@ -865,6 +865,10 @@ static DSA_SIG *capi_dsa_do_sign(const unsigned char *digest, int dlen, ret = DSA_SIG_new(); if (!ret) goto err; + ret->r = BN_new(); + ret->s = BN_new(); + if (!ret->r || !ret->s) + goto err; if (!lend_tobn(ret->r, csigbuf, 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: OPENSSL_cleanse(csigbuf, 40); CryptDestroyHash(hash); - return ret; } -- 2.25.1