libkeynote: stop reaching into EVP_PKEY internals.
authortb <tb@openbsd.org>
Wed, 24 Nov 2021 04:32:52 +0000 (04:32 +0000)
committertb <tb@openbsd.org>
Wed, 24 Nov 2021 04:32:52 +0000 (04:32 +0000)
commit5cc80106ccf9c64c83c3e231c5fab2cd4170d294
tree61e3d11a8f02c3544d15cac4e5c7fd66c3007ce2
parentaff4783b2de3fd9c8b45e987654b59aed9e7bbde
libkeynote: stop reaching into EVP_PKEY internals.

Use EVP_PKEY_get0_RSA() instead of pPublicKey->pkey.rsa.

Fix a couple of leaks in the vicinity: we need a reference on the RSA,
which is what keynote_free_key() frees, not on the EVP_PKEY. Also, don't
leak the entire certificate on success.

ok beck
lib/libkeynote/signature.c