2014-06-18 10:59:08 +02:00
|
|
|
---
|
|
|
|
doc/gpg.texi | 18 ++++++++++++++++++
|
|
|
|
g10/gpg.c | 9 +++++++++
|
|
|
|
2 files changed, 27 insertions(+)
|
|
|
|
|
2022-05-08 21:52:27 +02:00
|
|
|
Index: gnupg-2.3.5/doc/gpg.texi
|
2014-05-02 19:21:25 +02:00
|
|
|
===================================================================
|
2022-05-08 21:52:27 +02:00
|
|
|
--- gnupg-2.3.5.orig/doc/gpg.texi
|
|
|
|
+++ gnupg-2.3.5/doc/gpg.texi
|
|
|
|
@@ -2197,6 +2197,24 @@ implies, this option is for experts only
|
2014-05-02 19:21:25 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2022-05-08 21:52:27 +02:00
|
|
|
Index: gnupg-2.3.5/g10/gpg.c
|
2014-05-02 19:21:25 +02:00
|
|
|
===================================================================
|
2022-05-08 21:52:27 +02:00
|
|
|
--- gnupg-2.3.5.orig/g10/gpg.c
|
|
|
|
+++ gnupg-2.3.5/g10/gpg.c
|
|
|
|
@@ -443,6 +443,7 @@ enum cmd_and_opt_values
|
2021-11-27 00:50:50 +01:00
|
|
|
oForceSignKey,
|
2021-12-23 17:53:35 +01:00
|
|
|
oForbidGenKey,
|
2022-05-08 21:52:27 +02:00
|
|
|
oRequireCompliance,
|
2014-05-02 19:21:25 +02:00
|
|
|
+ oSetLegacyFips,
|
|
|
|
|
|
|
|
oNoop
|
|
|
|
};
|
2022-05-08 21:52:27 +02:00
|
|
|
@@ -878,6 +879,7 @@ static gpgrt_opt_t opts[] = {
|
2021-11-27 00:50:50 +01:00
|
|
|
ARGPARSE_s_s (oDigestAlgo, "digest-algo", "@"),
|
|
|
|
ARGPARSE_s_s (oCertDigestAlgo, "cert-digest-algo", "@"),
|
2021-12-23 17:53:35 +01:00
|
|
|
ARGPARSE_s_n (oOverrideComplianceCheck, "override-compliance-check", "@"),
|
2014-05-02 19:21:25 +02:00
|
|
|
+ ARGPARSE_s_n (oSetLegacyFips, "set-legacy-fips", "@"),
|
|
|
|
|
2015-01-21 21:50:33 +01:00
|
|
|
|
2021-11-27 00:50:50 +01:00
|
|
|
ARGPARSE_header (NULL, N_("Options for unattended use")),
|
2022-05-08 21:52:27 +02:00
|
|
|
@@ -3737,6 +3739,14 @@ main (int argc, char **argv)
|
|
|
|
opt.flags.require_compliance = 1;
|
2016-12-29 22:41:42 +01:00
|
|
|
break;
|
2014-05-02 19:21:25 +02:00
|
|
|
|
2021-11-27 00:50:50 +01:00
|
|
|
+ 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;
|
2014-05-02 19:21:25 +02:00
|
|
|
+
|
|
|
|
case oNoop: break;
|
|
|
|
|
|
|
|
default:
|