gpg2/gnupg-add_legacy_FIPS_mode_option.patch

70 lines
2.6 KiB
Diff
Raw Permalink Normal View History

---
doc/gpg.texi | 18 ++++++++++++++++++
g10/gpg.c | 9 +++++++++
2 files changed, 27 insertions(+)
Accepting request 1116649 from security:privacy - Install the internal executables in the /usr/libexec dir instead of /usr/lib64. These files are keyboxd, scdaemon, gpg-auth gpg-check-pattern, gpg-pair-tool, gpg-preset-passphrase, gpg-protect-tool, gpg-wks-client, dirmngr_ldap and tpm2daemon. - Provide the systemd-user files since they have been removed upstream since version 2.4.1. [bsc#1201564] * Add gpg2-systemd-user.tar.xz - Revert back to use the IBM TPM Software stack. - Update to 2.4.3: * gpg: Set default expiration date to 3 years. [T2701] * gpg: Add --list-filter properties "key_expires" and "key_expires_d". [T6529] * gpg: Emit status line and proper diagnostics for write errors. [T6528] * gpg: Make progress work for large files on Windows. [T6534] * gpg: New option --no-compress as alias for -z0. * gpgsm: Print PROGRESS status lines. Add new --input-size-hint. [T6534] * gpgsm: Support SENDCERT_SKI for --call-dirmngr. [rG701a8b30f0] * gpgsm: Major rewrite of the PKCS#12 parser. [T6536] * gpgtar: New option --no-compress. * dirmngr: Extend the AD_QUERY command. [rG207c99567c] * dirmngr: Disable the HTTP redirect rewriting. [T6477] * dirmngr: New option --compatibility-flags. [rGbf04b07327] * dirmngr: New option --ignore-crl-extensions. [T6545] * wkd: Use export-clean for gpg-wks-client's --mirror and --create commands. [rG2c7f7a5a27] * wkd: Make --add-revocs the default in gpg-wks-client. New option --no-add-revocs. [rG10c937ee68] OBS-URL: https://build.opensuse.org/request/show/1116649 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=292
2023-10-10 17:00:55 +02:00
Index: gnupg-2.4.2/doc/gpg.texi
===================================================================
Accepting request 1116649 from security:privacy - Install the internal executables in the /usr/libexec dir instead of /usr/lib64. These files are keyboxd, scdaemon, gpg-auth gpg-check-pattern, gpg-pair-tool, gpg-preset-passphrase, gpg-protect-tool, gpg-wks-client, dirmngr_ldap and tpm2daemon. - Provide the systemd-user files since they have been removed upstream since version 2.4.1. [bsc#1201564] * Add gpg2-systemd-user.tar.xz - Revert back to use the IBM TPM Software stack. - Update to 2.4.3: * gpg: Set default expiration date to 3 years. [T2701] * gpg: Add --list-filter properties "key_expires" and "key_expires_d". [T6529] * gpg: Emit status line and proper diagnostics for write errors. [T6528] * gpg: Make progress work for large files on Windows. [T6534] * gpg: New option --no-compress as alias for -z0. * gpgsm: Print PROGRESS status lines. Add new --input-size-hint. [T6534] * gpgsm: Support SENDCERT_SKI for --call-dirmngr. [rG701a8b30f0] * gpgsm: Major rewrite of the PKCS#12 parser. [T6536] * gpgtar: New option --no-compress. * dirmngr: Extend the AD_QUERY command. [rG207c99567c] * dirmngr: Disable the HTTP redirect rewriting. [T6477] * dirmngr: New option --compatibility-flags. [rGbf04b07327] * dirmngr: New option --ignore-crl-extensions. [T6545] * wkd: Use export-clean for gpg-wks-client's --mirror and --create commands. [rG2c7f7a5a27] * wkd: Make --add-revocs the default in gpg-wks-client. New option --no-add-revocs. [rG10c937ee68] OBS-URL: https://build.opensuse.org/request/show/1116649 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=292
2023-10-10 17:00:55 +02:00
--- gnupg-2.4.2.orig/doc/gpg.texi
+++ gnupg-2.4.2/doc/gpg.texi
@@ -2285,6 +2285,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
Accepting request 1116649 from security:privacy - Install the internal executables in the /usr/libexec dir instead of /usr/lib64. These files are keyboxd, scdaemon, gpg-auth gpg-check-pattern, gpg-pair-tool, gpg-preset-passphrase, gpg-protect-tool, gpg-wks-client, dirmngr_ldap and tpm2daemon. - Provide the systemd-user files since they have been removed upstream since version 2.4.1. [bsc#1201564] * Add gpg2-systemd-user.tar.xz - Revert back to use the IBM TPM Software stack. - Update to 2.4.3: * gpg: Set default expiration date to 3 years. [T2701] * gpg: Add --list-filter properties "key_expires" and "key_expires_d". [T6529] * gpg: Emit status line and proper diagnostics for write errors. [T6528] * gpg: Make progress work for large files on Windows. [T6534] * gpg: New option --no-compress as alias for -z0. * gpgsm: Print PROGRESS status lines. Add new --input-size-hint. [T6534] * gpgsm: Support SENDCERT_SKI for --call-dirmngr. [rG701a8b30f0] * gpgsm: Major rewrite of the PKCS#12 parser. [T6536] * gpgtar: New option --no-compress. * dirmngr: Extend the AD_QUERY command. [rG207c99567c] * dirmngr: Disable the HTTP redirect rewriting. [T6477] * dirmngr: New option --compatibility-flags. [rGbf04b07327] * dirmngr: New option --ignore-crl-extensions. [T6545] * wkd: Use export-clean for gpg-wks-client's --mirror and --create commands. [rG2c7f7a5a27] * wkd: Make --add-revocs the default in gpg-wks-client. New option --no-add-revocs. [rG10c937ee68] OBS-URL: https://build.opensuse.org/request/show/1116649 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=292
2023-10-10 17:00:55 +02:00
Index: gnupg-2.4.2/g10/gpg.c
===================================================================
Accepting request 1116649 from security:privacy - Install the internal executables in the /usr/libexec dir instead of /usr/lib64. These files are keyboxd, scdaemon, gpg-auth gpg-check-pattern, gpg-pair-tool, gpg-preset-passphrase, gpg-protect-tool, gpg-wks-client, dirmngr_ldap and tpm2daemon. - Provide the systemd-user files since they have been removed upstream since version 2.4.1. [bsc#1201564] * Add gpg2-systemd-user.tar.xz - Revert back to use the IBM TPM Software stack. - Update to 2.4.3: * gpg: Set default expiration date to 3 years. [T2701] * gpg: Add --list-filter properties "key_expires" and "key_expires_d". [T6529] * gpg: Emit status line and proper diagnostics for write errors. [T6528] * gpg: Make progress work for large files on Windows. [T6534] * gpg: New option --no-compress as alias for -z0. * gpgsm: Print PROGRESS status lines. Add new --input-size-hint. [T6534] * gpgsm: Support SENDCERT_SKI for --call-dirmngr. [rG701a8b30f0] * gpgsm: Major rewrite of the PKCS#12 parser. [T6536] * gpgtar: New option --no-compress. * dirmngr: Extend the AD_QUERY command. [rG207c99567c] * dirmngr: Disable the HTTP redirect rewriting. [T6477] * dirmngr: New option --compatibility-flags. [rGbf04b07327] * dirmngr: New option --ignore-crl-extensions. [T6545] * wkd: Use export-clean for gpg-wks-client's --mirror and --create commands. [rG2c7f7a5a27] * wkd: Make --add-revocs the default in gpg-wks-client. New option --no-add-revocs. [rG10c937ee68] OBS-URL: https://build.opensuse.org/request/show/1116649 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=292
2023-10-10 17:00:55 +02:00
--- gnupg-2.4.2.orig/g10/gpg.c
+++ gnupg-2.4.2/g10/gpg.c
@@ -446,6 +446,7 @@ enum cmd_and_opt_values
Accepting request 899451 from home:pmonrealgonzalez:branches:Base:System - GnuPG 2.3.1: * The new configuration file common.conf is now used to enable the use of the key database daemon with "use-keyboxd". Using this option in gpg.conf and gpgsm.conf is supported for a transitional period. See doc/example/common.conf for more. * gpg: Force version 5 key creation for ed448 and cv448 algorithms. * gpg: By default do not use the self-sigs-only option when importing from an LDAP keyserver. * gpg: Lookup a missing public key of the active card via LDAP. * gpgsm: New command --show-certs. * scd: Fix CCID driver for SCM SPR332/SPR532. * scd: Further improvements for PKCS#15 cards. * New configure option --with-tss to allow the selection of the TSS library. - Rebase patches: * gnupg-add_legacy_FIPS_mode_option.patch * gnupg-allow-import-of-previously-known-keys-even-without-UIDs.patch * gnupg-dont-fail-with-seahorse-agent.patch * gnupg-set_umask_before_open_outfile.patch - GnuPG 2.3.0: * A new experimental key database daemon is provided. To enable it put "use-keyboxd" into gpg.conf and gpgsm.conf. Keys are stored in a SQLite database and make key lookup much faster. * New tool gpg-card as a flexible frontend for all types of supported smartcards. * New option --chuid for gpg, gpgsm, gpgconf, gpg-card, and gpg-connect-agent. * The gpg-wks-client tool is now installed under bin; a wrapper for its old location at libexec is also installed. OBS-URL: https://build.opensuse.org/request/show/899451 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=267
2021-06-21 16:51:47 +02:00
oForceSignKey,
oForbidGenKey,
oRequireCompliance,
+ oSetLegacyFips,
Accepting request 1112814 from home:pmonrealgonzalez:branches:Base:System - Install the systemd user units in the _userunitdir [bsc#1201564] * Note that, there is no activation by default. - Temporarily revert back to the pre-2.4 default for key generation. The new rfc4880bis has been set as the default in 2.4 version and might create incompatible keys. Note that, rfc4880bis can still be used with the option flag --rfc4880bis as in previous versions. * More info in the gnupg-devel ML: https://lists.gnupg.org/pipermail/gnupg-devel/2022-December/035183.html * Reverted commit https://dev.gnupg.org/rGcaf4b3fc16e9 * Add gnupg-revert-rfc4880bis.patch - Allow 8192 bit RSA keys in keygen UI when large_rsa is set * Add gnupg-allow-large-rsa.patch - Fix broken GPGME QT tests: Upstram dev task dev.gnupg.org/T6313 * The original patch has been modified to expand the changes also to the tests/gpgme/Makefile.in file. * Add gnupg-tests-Fix-tests-gpgme-for-in-source-tree-builds.patch - Updated to require libgpg-error-devel >= 1.46 - Rebased patches: * gnupg-allow-import-of-previously-known-keys-even-without-UIDs.patch * gnupg-add_legacy_FIPS_mode_option.patch - GnuPG 2.4.0: * common: Fix translations in --help for gpgrt < 1.47. * gpg: Do not continue the export after a cancel for the primary key. * gpg: Replace use of PRIu64 in log_debug. * Update NEWS for 2.4.0. * tests: Fix make check with GPGME. OBS-URL: https://build.opensuse.org/request/show/1112814 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=289
2023-09-25 12:24:20 +02:00
oCompatibilityFlags,
Accepting request 1116649 from security:privacy - Install the internal executables in the /usr/libexec dir instead of /usr/lib64. These files are keyboxd, scdaemon, gpg-auth gpg-check-pattern, gpg-pair-tool, gpg-preset-passphrase, gpg-protect-tool, gpg-wks-client, dirmngr_ldap and tpm2daemon. - Provide the systemd-user files since they have been removed upstream since version 2.4.1. [bsc#1201564] * Add gpg2-systemd-user.tar.xz - Revert back to use the IBM TPM Software stack. - Update to 2.4.3: * gpg: Set default expiration date to 3 years. [T2701] * gpg: Add --list-filter properties "key_expires" and "key_expires_d". [T6529] * gpg: Emit status line and proper diagnostics for write errors. [T6528] * gpg: Make progress work for large files on Windows. [T6534] * gpg: New option --no-compress as alias for -z0. * gpgsm: Print PROGRESS status lines. Add new --input-size-hint. [T6534] * gpgsm: Support SENDCERT_SKI for --call-dirmngr. [rG701a8b30f0] * gpgsm: Major rewrite of the PKCS#12 parser. [T6536] * gpgtar: New option --no-compress. * dirmngr: Extend the AD_QUERY command. [rG207c99567c] * dirmngr: Disable the HTTP redirect rewriting. [T6477] * dirmngr: New option --compatibility-flags. [rGbf04b07327] * dirmngr: New option --ignore-crl-extensions. [T6545] * wkd: Use export-clean for gpg-wks-client's --mirror and --create commands. [rG2c7f7a5a27] * wkd: Make --add-revocs the default in gpg-wks-client. New option --no-add-revocs. [rG10c937ee68] OBS-URL: https://build.opensuse.org/request/show/1116649 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=292
2023-10-10 17:00:55 +02:00
oAddDesigRevoker,
oAssertSigner,
@@ -886,6 +887,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", "@"),
Accepting request 1083567 from home:david.anes:branches:Base:System - Rebased patches: * gnupg-add_legacy_FIPS_mode_option.patch - Removed patches (already upstream): * gnupg-tests-Fix-tests-gpgme-for-in-source-tree-builds.patch - Don't ship systemd examples, as they are removed from upstream release tarball. - Update to 2.4.1: * If the ~/.gnupg directory does not exist, the keyboxd is now automagically enabled. * gpg: New option --add-desig-revoker. * gpg: New option --assert-signer. * gpg: New command --quick-add-adsk and other ADSK features. * gpg: New list-option "show-unusable-sigs". Also show "[self-signature]" instead of the user-id in key signature listings. * gpg: For symmetric encryption the default S2K hash is now SHA256. * gpg: Detect already compressed data also when using a pipe. Also detect JPEG and PNG file formats. * gpg: New subcommand "openpgp" for --card-edit. * gpgsm: Verification of detached signatures does now strip trailing zeroes from the input if --assume-binary is used. * gpgsm: Non-armored detached signature are now created without using indefinite form length octets. This improves compatibility with some PDF signature verification software. * gpgtar: Emit progress status lines in create mode. * dirmngr: The LDAP modifyTimestamp is now returned by some keyserver commands. * ssh: Allow specification of the order keys are presented to ssh. See the man page entry for --enable-ssh-support. * gpg: Make list-options "show-sig-subpackets" work again. OBS-URL: https://build.opensuse.org/request/show/1083567 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=284
2023-04-29 09:28:45 +02:00
ARGPARSE_header (NULL, N_("Options for unattended use")),
Accepting request 1116649 from security:privacy - Install the internal executables in the /usr/libexec dir instead of /usr/lib64. These files are keyboxd, scdaemon, gpg-auth gpg-check-pattern, gpg-pair-tool, gpg-preset-passphrase, gpg-protect-tool, gpg-wks-client, dirmngr_ldap and tpm2daemon. - Provide the systemd-user files since they have been removed upstream since version 2.4.1. [bsc#1201564] * Add gpg2-systemd-user.tar.xz - Revert back to use the IBM TPM Software stack. - Update to 2.4.3: * gpg: Set default expiration date to 3 years. [T2701] * gpg: Add --list-filter properties "key_expires" and "key_expires_d". [T6529] * gpg: Emit status line and proper diagnostics for write errors. [T6528] * gpg: Make progress work for large files on Windows. [T6534] * gpg: New option --no-compress as alias for -z0. * gpgsm: Print PROGRESS status lines. Add new --input-size-hint. [T6534] * gpgsm: Support SENDCERT_SKI for --call-dirmngr. [rG701a8b30f0] * gpgsm: Major rewrite of the PKCS#12 parser. [T6536] * gpgtar: New option --no-compress. * dirmngr: Extend the AD_QUERY command. [rG207c99567c] * dirmngr: Disable the HTTP redirect rewriting. [T6477] * dirmngr: New option --compatibility-flags. [rGbf04b07327] * dirmngr: New option --ignore-crl-extensions. [T6545] * wkd: Use export-clean for gpg-wks-client's --mirror and --create commands. [rG2c7f7a5a27] * wkd: Make --add-revocs the default in gpg-wks-client. New option --no-add-revocs. [rG10c937ee68] OBS-URL: https://build.opensuse.org/request/show/1116649 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpg2?expand=0&rev=292
2023-10-10 17:00:55 +02:00
@@ -3756,6 +3758,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: