Rework RSA_PKCS1_PSS_PADDING handling in rsa_item_sign()
authortb <tb@openbsd.org>
Tue, 7 Nov 2023 16:04:12 +0000 (16:04 +0000)
committertb <tb@openbsd.org>
Tue, 7 Nov 2023 16:04:12 +0000 (16:04 +0000)
commitc5211295574e9ff78d875516cff6f83c954cb1e6
tree747678cf123a23c994d1d1a35825ecbb535f1b4c
parent8d53fb6c5dad2c061fd42805c55b511f1148fcfc
Rework RSA_PKCS1_PSS_PADDING handling in rsa_item_sign()

The current convoluted mess can be handled with two calls to the new
rsa_alg_set_pss_padding() helper. Not that this would be obvious at
all.

This fixes two more leaks in case of X509_ALGOR_set0() failure.

ok jsing
lib/libcrypto/rsa/rsa_ameth.c