gpg2/gnupg-add_legacy_FIPS_mode_option.patch
Pedro Monreal Gonzalez c957356fce - Update to 2.5.1:
* gpg: The support for composite Kyber+ECC public key algorithms
    does now use the final FIPS-203 and LibrePGP specifications. The
    experimental keys from 2.5.0 are no longer supported. [T6815]
  * gpg: New commands --add-recipients and --change-recipients. [T1825]
  * gpg: New option --proc-all-sigs. [T7261]
  * gpg: Fix a regression in 2.5.0 in gpgme's tests. [T7195]
  * gpg: Make --no-literal work again for -c and --store. [T5852]
  * gpg: Improve detection of input data read errors. [T6528]
  * gpg: Fix getting key by IPGP record (rfc-4398). [T7288]
  * gpgsm: New option --assert-signer. [T7286]
  * gpgsm: More improvements to PKCS#12 parsing to cope with latest
    IVBB changes. [T7213]
  * agent: Fix KEYTOCARD command when used with a loopback pinentry. [T7283]
  * gpg-mail-tube: Make sure GNUPGHOME is set in vsd mode.  New option
    --as-attach. [rG4511997e9e1b]
  * Now uses the process spawn API from libgpg-error. [T7192,T7194]
  * Removed the --enable-gpg-is-gpg2 configure time option.
    [rG2125f228d36c]
  * Rebase patches:
    - gnupg-add_legacy_FIPS_mode_option.patch
    - gnupg-revert-rfc4880bis.patch
    - gnupg-nobetasuffix.patch

OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=306
2024-10-23 06:41:50 +00:00

70 lines
2.7 KiB
Diff

---
doc/gpg.texi | 18 ++++++++++++++++++
g10/gpg.c | 9 +++++++++
2 files changed, 27 insertions(+)
Index: gnupg-2.5.1/doc/gpg.texi
===================================================================
--- gnupg-2.5.1.orig/doc/gpg.texi
+++ gnupg-2.5.1/doc/gpg.texi
@@ -2340,6 +2340,24 @@ implies, this option is for experts only
understand the implications of what it allows you to do, leave this
off. @option{--no-expert} disables this option.
+@item --set-legacy-fips
+@itemx --set-legacy-fips
+@opindex set-legacy-fips
+Enable legacy support even when the libgcrypt library is in FIPS 140-2
+mode. The legacy mode of libgcrypt allows the use of all ciphers,
+including non-approved ciphers. This mode is needed when for legacy
+reasons a message must be encrypted or decrypted. Legacy reasons for
+decryptions include the decryption of old messages created with a
+public key that use cipher settings which do not meet FIPS 140-2
+requirements. Legacy reasons for encryption include the encryption
+of messages with a recipients public key where the recipient is not
+bound to FIPS 140-2 regulation and therefore provided a key using
+non-approved ciphers. Although the legacy mode is a violation of strict
+FIPS 140-2 rule interpretations, it is wise to use this mode or
+either not being able to access old messages or not being able
+to create encrypted messages to a recipient that is not adhering
+to FIPS 140-2 rules.
+
@end table
Index: gnupg-2.5.1/g10/gpg.c
===================================================================
--- gnupg-2.5.1.orig/g10/gpg.c
+++ gnupg-2.5.1/g10/gpg.c
@@ -455,6 +455,7 @@ enum cmd_and_opt_values
oForceSignKey,
oForbidGenKey,
oRequireCompliance,
+ oSetLegacyFips,
oCompatibilityFlags,
oAddDesigRevoker,
oAssertSigner,
@@ -906,6 +907,7 @@ static gpgrt_opt_t opts[] = {
ARGPARSE_s_s (oCipherAlgo, "cipher-algo", "@"),
ARGPARSE_s_s (oDigestAlgo, "digest-algo", "@"),
ARGPARSE_s_s (oCertDigestAlgo, "cert-digest-algo", "@"),
+ ARGPARSE_s_n (oSetLegacyFips, "set-legacy-fips", "@"),
ARGPARSE_s_n (oRequirePQCEncryption, "require-pqc-encryption", "@"),
ARGPARSE_header (NULL, N_("Options for unattended use")),
@@ -3855,6 +3857,14 @@ main (int argc, char **argv)
keybox_set_buffersize (pargs.r.ret_ulong, 0);
break;
+ case oSetLegacyFips:
+ if(gcry_fips_mode_active())
+ gcry_control (GCRYCTL_INACTIVATE_FIPS_FLAG,
+ "Enable legacy support in FIPS 140-2 mode");
+ else
+ log_info ("Command set-legacy-fips ignored as libgcrypt is not in FIPS mode\n");
+ break;
+
case oNoop: break;
default: