1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-02-12 18:23:04 +01:00

10740 Commits

Author SHA1 Message Date
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
NIIBE Yutaka
d32a315418
po: Update Japanese Translation.
--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2024-12-20 11:55:40 +09:00
NIIBE Yutaka
ab8a2408a3
scd: Use gpgrt_spawn_actions_set_env_rev to have clean semantics.
* scd/app.c (report_change): Use gpgrt_spawn_actions_set_env_rev.

--

It's UTF-8 string.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2024-12-20 11:45:45 +09:00
NIIBE Yutaka
893e5e7c6f
agent: Clean up for the refactoring.
* agent/call-scd.c (agent_card_pkdecrypt): Remove unused variables.

--

Fixes-commit: fe147645d2397dd77b646a253965c5994f360f26
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2024-12-16 10:19:26 +09:00
NIIBE Yutaka
aa36f6ae8b
gpg: Fix key generation with existing key from card.
* g10/keygen.c (ask_algo): Fix condition.  Continue the loop when
failure.

--

Fixes-commit: e7891225788ab5f6d050a06643b1f488c227771f
GnuPG-bug-id: 7309, 7457
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2024-12-16 09:56:24 +09:00
Werner Koch
36dbca3e69
gpg: Allow for longer signature subpackets.
* g10/parse-packet.c (parse_signature): Increase the cap for hashed
subpackets to 30000.  Print the value in the error message.  Do not
return an error but skip a too long signature.
--

The limit of 10000 served us well for decades but given the option to
put a key into the signature, a larger limit will eventually be
useful.  The second part makes things a bit robust against rogue
subpackets on a keyserver.
2024-12-09 13:23:39 +01:00
Werner Koch
4c830b240c
speedo: Change the default to build a 64 bit version
* build-aux/speedo.mk (W32VERSION): Default to 64 bit.
* build-aux/speedo/w32/inst.nsi: Remove the doc dir.
2024-12-06 12:21:37 +01:00
Werner Koch
7b2748c6d8
gpg: Silence expired trusted-key diagnostics in quiet mode.
* g10/trustdb.c (validate_keys): Take care of --quiet.
--

GnuPG-bug-id: 7351
2024-12-05 16:32:25 +01:00
Werner Koch
0f76dd905d
Post release updates
--
2024-12-05 11:30:56 +01:00
Werner Koch
84e1781201
Release 2.5.2 gnupg-2.5.2 2024-12-05 11:13:14 +01:00
Werner Koch
2efcbbea67
po: Run msgmerge
--
2024-12-05 11:08:35 +01:00
Werner Koch
fba1d1089d
po: Update German translation
--
2024-12-05 11:08:09 +01:00
NIIBE Yutaka
fe147645d2
agent: Use SETDATA --apend for larger data to communicate scdaemon.
* agent/call-scd.c (prepare_setdata): New.
(agent_card_pksign): Use prepare_setdata for SETDATA.
(agent_card_pkdecrypt): Likewise.

--

GnuPG-bug-id: 7436
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2024-12-05 15:31:23 +09:00
Werner Koch
c3bab200d9
Require gpgrt 1.51
* configure.ac (NEED_GPGRT_VERSION): Bump to 1.51.

* g10/keydb.c (internal_keydb_update_keyblock) [!USE_TOFU]: Mark an
arg unused.
* common/homedir.c (create_common_conf) [!BUILD_WITH_KEYBOXD]: Mark an
arg unused.
2024-12-04 11:04:41 +01:00
Werner Koch
7b0be541a9
w32: Introduce Registry key GNUPG_ASSUME_COMPLIANCE.
* common/compliance.c (get_assumed_de_vs_compliance): Also consider a
registry entry.
--

On Windows it is easier to set the registry key than to use an envvar.
2024-12-04 11:02:33 +01:00
Daniel Cerqueira
7b0d49785d
po: Update Portuguese Translation.
Signed-off-by: Daniel Cerqueira <dan.git@lispclub.com>
2024-12-02 13:39:39 +01:00