rsa: Check keylen constraints for key operations.
* cipher/rsa.c (rsa_check_keysize): New. (generate_fips): Factor out the bits check. (rsa_encrypt): Add checking key length. (rsa_decrypt, rsa_sign, rsa_verify): Likewise.
- GnuPG-bug-id: T5512
- Co-authored-by: NIIBE Yutaka <gniibe@fsij.org>
- Signed-off-by: Jakub Jelen <jjelen@redhat.com>