summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorA. Maitland Bottoms <bottoms@debian.org>2023-05-29 08:28:20 -0400
committerA. Maitland Bottoms <bottoms@debian.org>2023-05-29 08:28:20 -0400
commit668451def296afeb0c358a7d80ff39dc546defab (patch)
tree3c853a08c02469b25f4e7e3193571da78d6605af /apt-pkg
parentf557a5e15bb4715557566d7e88e7367c17e94ebf (diff)
Do not fail on systems running in FIPSmode.
Initialize using gcrypt's GCRYCTL_NO_FIPS_MODE, available since gcrypt version 1.10.0, otherwise apt aborts on FIPS enabled systems.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/hashes.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc
index 313b1d37d..80b9bbf3f 100644
--- a/apt-pkg/contrib/hashes.cc
+++ b/apt-pkg/contrib/hashes.cc
@@ -330,6 +330,9 @@ public:
exit(2);
}
+ // It is OK for apt to use MD5.
+ gcry_control(GCRYCTL_NO_FIPS_MODE, 0);
+
gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
}
}