diff -Nru libgcrypt20-1.8.1/debian/changelog libgcrypt20-1.8.1/debian/changelog --- libgcrypt20-1.8.1/debian/changelog 2017-11-15 12:52:21.000000000 -0500 +++ libgcrypt20-1.8.1/debian/changelog 2018-02-16 13:46:16.000000000 -0500 @@ -1,3 +1,12 @@ +libgcrypt20 (1.8.1-4+bionic.2) bionic; urgency=medium + + * Disable the library reading /proc/sys/crypto/fips_enabled file + and going into FIPS mode. libgcrypt is not a FIPS certified library. + LP:1748310 + - debian/patches/disable_fips_enabled_read.patch + + -- Vineetha Pai Fri, 16 Feb 2018 13:45:04 -0500 + libgcrypt20 (1.8.1-4) unstable; urgency=low * Upload to unstable. diff -Nru libgcrypt20-1.8.1/debian/patches/disable_fips_enabled_read.patch libgcrypt20-1.8.1/debian/patches/disable_fips_enabled_read.patch --- libgcrypt20-1.8.1/debian/patches/disable_fips_enabled_read.patch 1969-12-31 19:00:00.000000000 -0500 +++ libgcrypt20-1.8.1/debian/patches/disable_fips_enabled_read.patch 2018-02-16 13:44:29.000000000 -0500 @@ -0,0 +1,34 @@ +commit 94724c949b6ac8cfba18978d115458d2fa6154a9 +Author: Vineetha Hari Pai +Date: Fri Feb 16 13:41:13 2018 -0500 + +From: Vineetha Hari Pai +Decription: Disable libgcrypt reading /proc/sys/crypto/fips_enabled +file and going into FIPS mode. libgcrypt is not a FIPS +certified library. +Bug-Ubuntu: http://bugs.launchpad.net/bugs/1748310 +Forwarded: not-needed + +diff --git a/src/fips.c b/src/fips.c +index af3fe2c..527fa2b 100644 +--- a/src/fips.c ++++ b/src/fips.c +@@ -133,6 +133,10 @@ _gcry_initialize_fips_mode (int force) + goto leave; + } + ++ /* Disabling reading fips_enabled file here to prevent ++ the library going automatically into FIPS mode. ++ LP:1748310 */ ++#if 0 + /* Checking based on /proc file properties. */ + { + static const char procfname[] = "/proc/sys/crypto/fips_enabled"; +@@ -169,6 +173,7 @@ _gcry_initialize_fips_mode (int force) + abort (); + } + } ++#endif + + /* Fips not not requested, set flag. */ + no_fips_mode_required = 1; diff -Nru libgcrypt20-1.8.1/debian/patches/series libgcrypt20-1.8.1/debian/patches/series --- libgcrypt20-1.8.1/debian/patches/series 2017-11-14 13:03:01.000000000 -0500 +++ libgcrypt20-1.8.1/debian/patches/series 2018-02-16 13:44:29.000000000 -0500 @@ -3,3 +3,4 @@ 25_norevisionfromgit.diff 30_Fix-secmem-test-for-machine-with-larger-page.patch 31_tests-Add-HAVE_MMAP-check-for-MinGW.patch +disable_fips_enabled_read.patch