diff options
author | Richard Levitte <levitte@openssl.org> | 2016-03-08 23:12:14 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-03-08 23:24:03 +0100 |
commit | a8a355402cf2b75fd8fffcd56f9abf6e9c5fae4a (patch) | |
tree | b410537376510f74e4cd1f9f18e1635791739290 /engines | |
parent | Convert mem_dbg and mem_sec to the new Thread API (diff) | |
download | openssl-a8a355402cf2b75fd8fffcd56f9abf6e9c5fae4a.tar.xz openssl-a8a355402cf2b75fd8fffcd56f9abf6e9c5fae4a.zip |
Adapt e_capi to the DSA_SIG_get0() API
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'engines')
-rw-r--r-- | engines/e_capi.c | 10 |
1 files changed, 4 insertions, 6 deletions
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; |