diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2022-11-30 12:42:25 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2022-11-30 12:42:25 +0000 |
commit | 886191e4b5a92070eb862ed972032345e65b3056 (patch) | |
tree | 73182c6ea4878a86e99a5483e96c384f2c67cbef /sbin/iked | |
parent | 4066e666b04e930fd981604d227ad5d8b0d58b52 (diff) |
Switch idiom of d2i_ECDSA_SIG() invocation
Instead of the discouraged obj = NULL; d2i_ECDSA_SIG(&obj, ...); use the
recommended obj = d2i_ECDSA_SIG(NULL, ...);. While it makes no difference
here, it's better practice.
suggested by & ok markus
Diffstat (limited to 'sbin/iked')
-rw-r--r-- | sbin/iked/crypto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/iked/crypto.c b/sbin/iked/crypto.c index b8327f33e9e..50ee2757197 100644 --- a/sbin/iked/crypto.c +++ b/sbin/iked/crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.c,v 1.40 2022/11/07 22:39:52 tobhe Exp $ */ +/* $OpenBSD: crypto.c,v 1.41 2022/11/30 12:42:24 tb Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -1057,7 +1057,7 @@ _dsa_sign_ecdsa(struct iked_dsa *dsa, uint8_t *ptr, size_t len) if (EVP_DigestSignFinal(dsa->dsa_ctx, tmp, &tmplen) != 1) goto done; p = tmp; - if (d2i_ECDSA_SIG(&obj, &p, tmplen) == NULL) + if ((obj = d2i_ECDSA_SIG(NULL, &p, tmplen)) == NULL) goto done; ECDSA_SIG_get0(obj, &r, &s); if (BN_num_bytes(r) > bnlen || BN_num_bytes(s) > bnlen) |