Simplify BIGNUM handling in dsa_builtin_keygen().
authorjsing <jsing@openbsd.org>
Wed, 11 Jan 2023 04:35:26 +0000 (04:35 +0000)
committerjsing <jsing@openbsd.org>
Wed, 11 Jan 2023 04:35:26 +0000 (04:35 +0000)
commitf6b6cc33007e6d3d1d9d24955ba7783b71bb73c4
treeec657a31160d77d41dc1c0c78d54580243b1eedd
parentdfffc42a41129662ba02c852d207f1aaa7dcc06f
Simplify BIGNUM handling in dsa_builtin_keygen().

Rather than having complicated "attempt to reuse" dances, always allocate
priv_key/pub_key, then free and assign on success.

ok tb@
lib/libcrypto/dsa/dsa_key.c