X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=engines%2Fe_capi.c;h=58283e506d49de4b9e56b478b11b2511984c5289;hb=e4646a8963fa6bc6f475afe7a9b9a46b151cfd1a;hp=8e78354b70f735f33553eb08e6a7ff95080ab5f7;hpb=7b548d3f11adccc67123e1f6f5c118aef857a8d2;p=oweals%2Fopenssl.git diff --git a/engines/e_capi.c b/engines/e_capi.c index 8e78354b70..58283e506d 100644 --- a/engines/e_capi.c +++ b/engines/e_capi.c @@ -1022,15 +1022,13 @@ static DSA_SIG *capi_dsa_do_sign(const unsigned char *digest, int dlen, capi_addlasterror(); goto err; } else { + BIGNUM *r = NULL, *s = NULL; ret = DSA_SIG_new(); if (ret == NULL) goto err; - ret->r = BN_new(); - ret->s = BN_new(); - if (ret->r == NULL || ret->s == NULL) - goto err; - if (!lend_tobn(ret->r, csigbuf, 20) - || !lend_tobn(ret->s, csigbuf + 20, 20)) { + DSA_SIG_get0(&r, &s, ret); + if (!lend_tobn(r, csigbuf, 20) + || !lend_tobn(s, csigbuf + 20, 20)) { DSA_SIG_free(ret); ret = NULL; goto err;