Rework pkey_dsa_keygen()
authortb <tb@openbsd.org>
Thu, 28 Dec 2023 22:07:23 +0000 (22:07 +0000)
committertb <tb@openbsd.org>
Thu, 28 Dec 2023 22:07:23 +0000 (22:07 +0000)
commita21e684406ff918992e7652163c56a09bda12860
tree315221ecd90925dee317bf1390f25d1e1c2995cf
parent3b26100e012949c92e0c84e97cfc7448dc0f7a54
Rework pkey_dsa_keygen()

Very similar to pkey_dh_keygen(): single exit and hold on to an extra
reference by calling EVP_PKEY_set1_DSA() instead of assigning the DSA
to the pkey. "Fixes" another leak that Coverity missed.

ok jsing
lib/libcrypto/dsa/dsa_pmeth.c