gpg2/gnupg-detect_FIPS_mode.patch
Pedro Monreal Gonzalez 304a894420 - Update to 2.5.3
* gpg: Allow for signature subpackets of up to 30000 octets.
    [rG36dbca3e69]
  * gpg: Silence expired trusted-key diagnostics in quiet mode.  [T7351]
  * gpg: Allow smaller session keys with Kyber and enforce the use of
    AES-256 if useful.  [T7472]
  * gpg: Fix regression in key generation from existing card key.
    [T7309,T7457]
  * gpg: Print a warning if the card backup key could not be written.
    [T2169]
  * The --supervised options of gpg-agent and dirmngr have been
    renamed to --deprecated-supervised as preparation for their removal.
    [rGa019a0fcd8]
  * There is no more default for a keyserver.

OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=313
2025-01-14 16:14:12 +00:00

19 lines
784 B
Diff

Index: gnupg-2.3.8/g10/mainproc.c
===================================================================
--- gnupg-2.3.8.orig/g10/mainproc.c
+++ gnupg-2.3.8/g10/mainproc.c
@@ -1011,7 +1011,12 @@ proc_plaintext( CTX c, PACKET *pkt )
according to 2440, so hopefully it won't come up that often.
There is no good way to specify what algorithms to use in
that case, so these there are the historical answer. */
- gcry_md_enable (c->mfx.md, DIGEST_ALGO_RMD160);
+
+ /* Libgcrypt manual says that gcry_version_check must be called
+ * before calling gcry_fips_mode_active. */
+ gcry_check_version (NULL);
+ if(!gcry_fips_mode_active())
+ gcry_md_enable(c->mfx.md, DIGEST_ALGO_RMD160);
gcry_md_enable (c->mfx.md, DIGEST_ALGO_SHA1);
}
if (DBG_HASHING)