File libgcrypt-binary_integrity_in_non-FIPS.patch of Package libgcrypt.9623

Index: libgcrypt-1.8.4/src/fips.c
===================================================================
--- libgcrypt-1.8.4.orig/src/fips.c	2018-11-26 17:30:28.040692529 +0100
+++ libgcrypt-1.8.4/src/fips.c	2018-11-26 17:59:04.130934181 +0100
@@ -663,7 +663,11 @@ check_binary_integrity (void)
               /* Open the file.  */
               fp = fopen (fname, "r");
               if (!fp)
-                err = gpg_error_from_syserror ();
+                {
+                  /* Missing checksum is a problem only in FIPS mode */
+                  if (fips_mode() || errno != ENOENT)
+                    err = gpg_error_from_syserror ();
+                }
               else
                 {
                   /* A buffer of 64 bytes plus one for a LF and one to
openSUSE Build Service is sponsored by