1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-02-22 19:58:29 +01:00

10755 Commits

Author SHA1 Message Date
Werner Koch
bec71fdbe5
speedo: Do not build gpgme anymore.
* build-aux/speedo.mk: Remove support gpgme.
* build-aux/speedo/w32/inst.nsi: Ditto.
* build-aux/speedo/w32/wixlib.wxs: Remove the gpgme components.
--

GPGME is either already availabale on Unix platforms or can be
installed on Widnows with gpg4win.  GnuPG itself does not require
gpgme.
2025-02-21 12:58:39 +01:00
Werner Koch
48978ccb4e
gpg: Fix a verification DoS due to a malicious subkey in the keyring.
* g10/getkey.c (get_pubkey): Factor code out to ...
(get_pubkey_bykid): new.  Add feature to return the keyblock.
(get_pubkey_for_sig): Add arg r_keyblock to return the used keyblock.
Request a signing usage.
(get_pubkeyblock_for_sig): Remove.
(finish_lookup): Improve debug output.
* g10/sig-check.c (check_signature): Add arg r_keyblock and pass it
down.
* g10/mainproc.c (do_check_sig): Ditto.
(check_sig_and_print): Use the keyblock returned by do_check_sig to
show further information instead of looking it up again with
get_pubkeyblock_for_sig.  Also re-check the signature after the import
of an included keyblock.
--

The problem here is that it is possible to import a key from someone
who added a signature subkey from another public key and thus inhibits
that a good signature good be verified.

Such a malicious key signature subkey must have been created w/o the
mandatory backsig which bind a signature subkey to its primary key.
For encryption subkeys this is not an issue because the existence of a
decryption private key is all you need to decrypt something and then
it does not matter if the public subkey or its binding signature has
been put below another primary key; in fact we do the latter for
ADSKs.

GnuPG-bug-id: 7527
2025-02-21 12:17:46 +01:00
Werner Koch
5e87e452e4
gpg: Remove a signature check function wrapper.
* g10/sig-check.c (check_signature2): Rename to
(check_signature): this and remove the old wrapper. Adjust all
callers.
2025-02-20 14:50:20 +01:00
Werner Koch
4c11359aec
doc: Declare --disable-http as legacy.
--
2025-02-19 11:56:46 +01:00
Werner Koch
feeceed970
agent: Improve diagnostics for a bind call failure.
* agent/gpg-agent.c (create_server_socket): Fix translation.  Add
diagnostic for bind retry.  Print windows error code after bind
failure.
--

GnuPG-bug-id: 7434
2025-02-18 12:19:49 +01:00
Werner Koch
3239a41dde
doc: Add some notes
--
2025-02-18 09:21:15 +01:00
Werner Koch
80491dd91a
Post release updates
--
2025-02-12 11:59:51 +01:00
Werner Koch
ec6c2e38f1
Release 2.5.4 gnupg-2.5.4 2025-02-12 11:42:00 +01:00
Werner Koch
f2297f1952
po: msgmerge
--
2025-02-12 11:41:53 +01:00
Emir SARI
fc8619fce2
Update Turkish translations 2025-02-12 11:37:39 +01:00
Werner Koch
7a47252516
agent: New option --change-std-env-name.
* common/session-env.c (stdenvnames): Add field "disabled".
(INITIAL_ARRAYSIZE): Increase size a bit.
(session_env_mod_stdenvnames): New.
(session_env_list_stdenvnames): Handle the disabled flag.
* agent/gpg-agent.c (oChangeStdEnvName): New.
(opts): Add --change-std-env-name.
(main): Implement option.
--

GnuPG-bug-id: 7522
2025-02-12 11:15:21 +01:00
Werner Koch
8c753cb7c9
gpgsm: Remove unused function.
* sm/misc.c (setup_pinentry_env): Remove.
2025-02-12 10:31:06 +01:00
Daniel Kahn Gillmor
503c9e3451
doc: Do not install gnupg.7.html into usr/share/man/manh/
* doc/Makefile.am: Ship gnupg.7.html with other html, not with
manpages.

--

Without this change, gnupg.7.html gets placed in /usr/share/manh/
Since it can't be correctly rendered by groff, this is undesirable.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2025-02-12 09:55:45 +01:00
Werner Koch
70049e5f16
gpg: Lookup key for merging/inserting only beu primary key.
* g10/getkey.c (get_keyblock_byfpr_fast): Add arg primary_only and
implement.
* g10/import.c (import_one_real): Simplify filling the fpr buffer with
zeroes.
(import_one_real): Find key only by primary fingerprint.
--

This should have been done early: When looking up the original
keyblock we want to update, we need to lookup it up only using the
primary key.  This avoids to find a key which has the primary key also
has a subkey.

GnuPG-bug-id: 7527
2025-02-11 14:46:19 +01:00
Werner Koch
ef4acfd77b
Update NEWS
--
2025-02-07 11:56:27 +01:00
Werner Koch
3738b0a99a
gpg: Store Link attributes for composite keys.
* g10/call-agent.c (agent_crosslink_keys): New.
* g10/keygen.c (common_gen): Store the Link attribute.
--

The Link attribute may be useful to quickly find the other part of a
composite private key.

GnuPG-bug-id: 6638
2025-02-07 11:10:09 +01:00
Werner Koch
00c31f8b04
gpg: New option --disable-pqc-encryption.
* g10/options.h (flags): Add field disable_pqc_encryption.
* g10/gpg.c (oDisablePQCEncryption): New.
(opts): Add --option.
(main): Set option.
* g10/getkey.c (finish_lookup): Skip subkeys if option is set.
--

This option can be used to avoid the use of Kyber encryption subkeys
if this does not make sense (i.e. protection of local files).
2025-02-06 17:45:23 +01:00
Werner Koch
da9fb6bd16
kbx: Fix for building without keyboxd.
* kbx/keybox-fwddecl.h: New.
* kbx/keybox.h: Replace typedef for KEYBOX_HANDLE by including the new
file.
* g10/keydb-private.h: Ditto.
--

The duplicated typedef was a bit ugly and will fail, depending on
compiler, iof for example building without keyboxd.  Fix only tested
in the standard case but the fix is obvious.
2025-02-06 15:46:15 +01:00
Werner Koch
3a523b43d4
gpgscm: Fix possible segv in the process functions.
* tests/gpgscm/ffi.c (do_process_spawn_io): Fix use of FD_ISSET.
--

This bug was detected on an i686 with gcc 4.1 and Linux 2.6.18

Fixes-commit: 1b0ce9918c321a5060fb7c59a234ab683187e8c1
2025-02-06 15:35:49 +01:00
Werner Koch
0ec989ee3f
gpgscm: Fix for gcc < 4.5
* tests/gpgscm/scheme.c (MY_GCC_VERSION): New.
(type_to_string): Use gcc build in only when supported.
--

Note that we do not wnat to use the GPGRT macro to keep this file as
close to upstream as possible.
2025-02-06 14:40:46 +01:00
Werner Koch
9dba5ab403
gpg: Fix --quick-add-key for Weierstrass ECC with usage given.
* g10/keygen.c (adjust_algo_for_ecdh_ecdsa): New.
(parse_algo_usage_expire): Adjust key algo.
--

GnuPG-bug-id: 7506
2025-02-05 11:03:30 +01:00
Daniel Cerqueira
8ae8f12e53
po: Update to po/pt.po
--

Signed-off-by: Daniel Cerqueira <dan.git@lispclub.com>
2025-02-03 14:11:43 +01:00
Werner Koch
c2ff47d5bc
gpg: Base compliance "de-vs" now on "gnupg" and not on "openpgp".
* g10/gpg.c (set_compliance_option) <oDE_VS>: Change.
--

This version has not yet been evaluated and thus we are able to
change it to a more useful default.
2025-02-03 11:49:54 +01:00
Werner Koch
4b2729b983
gpg: Simplify the compliance settings.
* g10/gpg.c (set_compliance_option): Base most settings on oGnuPG.
For oGnuPG explictly clear the allow_old_cipher_algos flag.
--

Note that --allow-old-cipher-algos must now come after a compliance
settings.  This avoids a bug when first setting oRFC2440 and then
oGnuPG which would not clear the flag.

GnuPG-bug-id: T7501
2025-02-03 11:46:57 +01:00
Daniel Kahn Gillmor via Gnupg-devel
aa46ba28ba
doc: Record that gpg policy compliance options are last-one-wins
* doc/gpg.texi (Compliance options): Explain that when multiple
--compliance options are given, the final one supersedes any previous
option.

--

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2025-02-03 11:22:09 +01:00
Daniel Kahn Gillmor via Gnupg-devel
04d58ff847
gpg: --compliance={pgp7, pgp8} also now restore default options
* g10/gpg.c (set_compliance_option): oPGP7 and oPGP8 both restore
policy-relevant default options before setting the compliance flag.

--

With this change, any ordering of --compliance options will always
result in the options selected from the last option given.

GnuPG-bug-id: 7501
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2025-02-03 11:21:36 +01:00
Daniel Kahn Gillmor via Gnupg-devel
0bdf585993
gpg: --compliance=gnupg restores default for policy-affected options
* g10/gpg.c (set_compliance_option): oGnuPG restores default
policy-affected options, moved from...
(main): ...here.  Invoke set_compliance_option(oGnuPG) directly
instead of just setting opt.compliance.

--

Some of these default option values (flags.dsa2, rfc2440_text,
allow_non_selfsigned_uid, allow_freeform_uid) had to be inferrerd from
the fact that the opt struct is static and therefore initialized to
zero by the compiler.

With this change, --compliance=gnupg now completely reverts to the
defaults that were changed from other --compliance= options.

GnuPG-bug-id: T7501
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2025-02-03 11:21:16 +01:00
Daniel Kahn Gillmor via Gnupg-devel
54a8770aeb
gpg: --compliance=rfc2440 does not require cross-certification
* g10/gpg.c (set_compliance_option): clear
opt.flags.require_cross_cert with oRFC2440

--
This aligns with the expectations in RFC 2440, which doesn't specify
any cross-certifications.  As doc/gpg.texi says: "This is dangerous",
but it aligns with the specification.

The comment above says that 4880 is the same as 2440, "but with [...]
--require-cross-certification", so we align the code with the intent
from the comment.  It looks like opt.require_cross_cert was turned on
by default after that comment (and the oRFC2440 section) was written,
but the oRFC2440 section was never updated to turn it off.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2025-02-03 11:20:17 +01:00
Werner Koch
159e801043
gpgsm: Allow unattended PKCS#12 export without passphrase.
* sm/gpgsm.c (oNoProtection): New.
(opts): Add "--no-protection".
(main): PArse it.
* sm/gpgsm.h (struct server_control_s): Add field no_protection.
* sm/server.c (option_handler): Add option "no-protection".
(reset_notify): Clear option.
* sm/export.c (export_p12): Use empty passphrase if option is set.
2025-01-29 18:06:15 +01:00
Werner Koch
89055f24f4
gpgsm: Allow CSR generation with an unprotected key.
* sm/call-agent.c (gpgsm_agent_genkey): Add arg no_protection.
* sm/certreqgen.c (struct reqgen_ctrl_s): Add field no_protection.
(read_parameters): Add keyword "%no-protection".
(proc_parameters): Pass no_protection to gpgsm_agent_genkey.
2025-01-29 16:32:03 +01:00
Werner Koch
2469dc5aae
agent: Fix ssh-agent's request_identities for skipped keys.
* agent/command-ssh.c (ssh_send_available_keys): Adjust key counter
for skipped keys.
--

Fixes-commit: 8b8a8b246c443d5631a88ec59b88edf00aa0ff51
which introduced a regression due to an extra variable for counting
the keys.

The bug showed up for example if a card with a Brainpool Auth key was
also used.  Unfortunately OpenSSH still does not allow for Brainpool
keys.
2025-01-22 16:12:49 +01:00
NIIBE Yutaka
b1857a2836
gpg: Fix handling with no CRC armor.
* g10/armor.c (radix64_read): Set ->any_data if any data is available.

--

GnuPG-bug-id: 7071
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2025-01-20 15:07:19 +09:00
NIIBE Yutaka
6c01d97b17
build: Remove defining GPG_ERR_ENABLE_ERRNO_MACROS.
* configure.ac (GPG_ERR_ENABLE_ERRNO_MACROS): Remove.

--

It was for Windows CE.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2025-01-15 15:42:46 +09:00
Werner Koch
81e129ab3e
speedo: Do not package zlib and bzip2 object files
* build-aux/speedo.mk (dist-source): Exclude them.
--
GnuPG-bug-id: 7442
2025-01-14 17:43:41 +01:00
Sorah Fukumori
137481fa10
agent: Fix a memory leak.
* agent/findkey.c (read_key_file): Free BUF.

--

Fixes-commit: 434a641d40cbff82beb9f485e0adca72419bfdf2
Signed-off-by: Sorah Fukumori <her@sorah.jp>
2025-01-14 11:01:05 +09:00
Werner Koch
e0a2e9e9c5
build: Also emit the size of the w32 source tarball
--

Not tested.
2025-01-10 10:44:45 +01:00
NIIBE Yutaka
ddff3b01f4
po: Update Japanese Translation.
--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2025-01-10 15:04:27 +09:00
Werner Koch
5ac8446ca8
tools: Some tweaks to gpg-authcode-sign.sh
* tools/gpg-authcode-sign.sh: Skip too short files and rename certain
files to ".dll".
--

osslsigncode requires file suffixes of exe or dll but not dll-x or
dll-ex which we use in our gpg4win build system.  This adds
workarounds for this and for short dummy files.
2025-01-09 17:20:45 +01:00
Werner Koch
cbc7fa0c8e
gpg: Show the default PIN hint also before "name" and "key-attr"
* g10/card-util.c (USER_PIN_DEFAULT): Move to the top.  Same for the
other constants.
(show_pin_hint): New.
(generate_card_keys): Use show_pin_hint.
(do_change_keyattr): Also show pin hint here.
(change_name): And here.
--

We used to show a hint for the default PINs only before generate.
However it is often useful to first change the attributes and thus the
hint should be show here as well.

The above is only done if no name has yet been set, thus before
setting the name we also show the hint.
2025-01-09 11:42:02 +01:00
Werner Koch
f476370916
Post release updates
--
2025-01-09 10:04:56 +01:00
Werner Koch
cc3e34b82a
Release 2.5.3 gnupg-2.5.3 2025-01-09 09:22:27 +01:00
Werner Koch
94045bce41
po: msgmerge run
--
2025-01-09 09:12:43 +01:00
Werner Koch
a2f2523b99
Remove the default keyserver. 2025-01-08 18:19:49 +01:00
Werner Koch
a04c936096
doc: One typo fix.
--
GnuPG-bug-id: 7479
2025-01-08 17:26:17 +01:00
Werner Koch
a019a0fcd8
Stronger deprecate the --supervised option.
* agent/gpg-agent.c (opts): Rename option supervised.
* dirmngr/dirmngr.c (opts): Ditto.
--

The --supervised way to start gpg-agent has been deprecated for 2.5
years and will probably entirely removed with version 2.6.0.  To allow
its use until its removal the systemd service description need to be
adjusted to use this option.  The reason for the deprecation are
conflicts with the way systemd starts gpg-agent and gpg expects how
gpg-agent is started.  In particular gpg expects that the gpg-agent
matching its own version is started.  Further the systemd way is not
portable to other platforms and long term experience on Windows has
show that the standard way of starting gpg-agent is less error prone.

Note to those who want to re-introduse this option: Pretty please do
not use socket names conflicting with our standard socket names.  For
example use /run/user/1000/foo-gnupg/S.gpg-agent.
2025-01-08 17:17:42 +01:00
Werner Koch
faa2d3a2e7
Update README and copyright years.
--
2025-01-08 15:39:02 +01:00
Werner Koch
b9028f869d
gpg: Print a warning if the card backup key could not be written.
* g10/keygen.c (card_write_key_to_backup_file): Fix error handing by
removing the RC variable.  Add warning note.
--

GnuPG-bug-id: 2169
2025-01-08 14:04:23 +01:00
Damien Goutte-Gattat via Gnupg-devel
72e3fddbfe
gpg: Force the use of AES-256 in some cases
* g10/encrypt.c (create_dek_with_warnings): Forcefully use AES-256 if
PQC encryption was required or if all recipient keys are Kyber keys.
--

If --require-pqc-encryption was set, then it should be safe to always
force AES-256, without even checking if we are encrypting to Kyber keys
(if some recipients do not have Kyber keys, --require-pqc-encryption
will fail elsewhere).

Otherwise, we force AES-256 if we encrypt *only* to Kyber keys -- unless
the user explicitly requested another algo, in which case we assume they
know what they are doing.

GnuPG-bug-id: 7472
Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>

Man page entry extended

Signed-off-by: Werner Koch <wk@gnupg.org>
2025-01-06 18:17:07 +01:00
Damien Goutte-Gattat via Gnupg-devel
80828512b6
gpg: Allow smaller session keys with Kyber
* g10/pubkey-enc.c (get_it): Do not error out when decrypting a session
key of less than 32 octets encrypted to a Kyber key.
--

GnuPG-bug-id: 7472
Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
2025-01-06 18:11:59 +01:00
bubu
647fa16be7
po: Update French translation
--

(proofread by the debian-l10n-french team)

GnuPG-bug-id:7469

Changed original patch to use positional arguments for
"un hachage de %1$u bits n'est pa[...]"
2025-01-02 16:07:47 +01:00