forked from pool/libgcrypt
b13fa86e81
- Fail selftests when checksum file is missing in FIPS mode only (bsc#1117355) * add libgcrypt-binary_integrity_in_non-FIPS.patch OBS-URL: https://build.opensuse.org/request/show/652048 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libgcrypt?expand=0&rev=119
18 lines
776 B
Diff
18 lines
776 B
Diff
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
|