File libgcrypt-FIPS-SLI-Disallow-RSA-keys-with-size-lt-2048.patch of Package libgcrypt.38414

Index: libgcrypt-1.10.3/cipher/rsa.c
===================================================================
--- libgcrypt-1.10.3.orig/cipher/rsa.c
+++ libgcrypt-1.10.3/cipher/rsa.c
@@ -413,13 +413,8 @@ rsa_check_keysize (unsigned int nbits)
 static gpg_err_code_t
 rsa_check_verify_keysize (unsigned int nbits)
 {
-  if (fips_mode ())
-    {
-      if ((nbits >= 1024 && (nbits % 256) == 0) || nbits >= 2048)
-        return GPG_ERR_NO_ERROR;
-
-      return GPG_ERR_INV_VALUE;
-    }
+  if (fips_mode () && nbits < 2048)
+      fips_service_indicator_mark_non_compliant ();
 
   return GPG_ERR_NO_ERROR;
 }
openSUSE Build Service is sponsored by