Home GnuPG

cipher: Check by caller instead, not by callee for RSA-PSS.

Description

cipher: Check by caller instead, not by callee for RSA-PSS.

* cipher/pubkey-internal.h (_gcry_rsa_pss_encode): Change the API.
* cipher/pubkey-util.c (_gcry_pk_util_data_to_mpi): Before the call to
_gcry_rsa_pss_encode, check the condition here, raise GPG_ERR_INV_ARG
if it's not good.
* cipher/rsa-common.c (_gcry_rsa_pss_encode): No check inside.
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Jul 23 2021, 3:41 AM
Parents
rC7f401b9748c4: doc: Fix a typo.
Branches
Unknown
Tags
Unknown