1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-05-15 08:23:24 +02:00

10812 Commits

Author SHA1 Message Date
Werner Koch
7c2e7bcc41
agent: We should use a macro for the keygrip len in new code.
* agent/divert-scd.c (agent_card_ecc_kem): Use KEYGRIP_LEN constant.
2025-05-13 09:56:59 +02:00
NIIBE Yutaka
309cfb3a4c
agent: Fix ECC key on smartcard for composite KEM with PQC.
* agent/divert-scd.c (agent_card_ecc_kem): Convert binary keygrip to
HEXto call agent_card_pkdecrypt.  Handle the case with prefix.

--

GnuPG-bug-id: 7648
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2025-05-13 15:44:05 +09:00
NIIBE Yutaka
5fb338168e
agent: Recover the old behavior with max-cache-ttl=0.
* agent/cache.c (compute_expiration): Expire newly created entry when
max-cache-ttl is zero.

--

Fixes-commit: 92de0387f04b1e87a4a49ed063323624f25ac3ef
GnuPG-bug-id: 6681
Suggested-by: Lucas Mulling <lucas.mulling@suse.com>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2025-05-13 09:03:09 +09:00
Werner Koch
8833a34bf0
gpg: Fully implement the group key flag.
* g10/getkey.c (merge_selfsigs_main): Do not mask out the group bit.
(merge_selfsigs_subkey): Ditto/
* g10/keygen.c (ask_key_flags_with_mask): Ditto.
(proc_parameter_file): Ditto.
--

Updates-commit: 0988e49c45d0fb73d0b536aa027bd114f9dc65a7
2025-05-12 11:54:50 +02:00
Werner Koch
727e125a4d
Update distsigkey
--

Added Alexander.  Removed Andre.
2025-05-09 16:24:18 +02:00
Werner Koch
fe347b3881
Post release updates
--
2025-05-08 11:20:33 +02:00
Werner Koch
806b0080bb
Release 2.5.6 gnupg-2.5.6 2025-05-08 10:58:37 +02:00
Collin Funk via Gnupg-devel
598296b9fc
tests:gpgscm: Fix build error on AIX.
* tests/gpgscm/ffi.c (ffi_init): Undefine 'open' so it does not get
expanded to 'open64' in the ffi_define_function macro.

--
GnuPG-bug-id: 7632
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
2025-05-08 10:23:27 +02:00
Collin Funk via Gnupg-devel
8ba33fffe9
common: Add Solaris support to get_signal_name.
* configure.ac: Check for _sys_siglist.
* common/signal.c (get_signal_name): Use _sys_siglist.

--

GnuPG-bug-id: 7638
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
2025-05-08 10:22:47 +02:00
Mattia Narducci via Gnupg-devel
1fea386691
po: Fix misspelled italian translation for 'encrypted'
[[PGP Signed Part:No public key for 4893CA2AF4416CED created at 2025-04-16T23:13:02+0200 using EDDSA]]
--

Signed-off-by: Mattia Narducci <mattianarducci1@gmail.com>
2025-05-08 10:22:02 +02:00
Werner Koch
581d8bd087
Update NEWS
--
2025-05-06 16:16:11 +02:00
Werner Koch
9589da97e2
gpgsm: Always print info about certs-only message.
* sm/verify.c (gpgsm_verify): Always print info that a certs-only
message has been processed.
--

Prior to this patch the message was only printed if no data file has
been given.

Reported-by: Albrecht Dreß
2025-05-06 13:47:51 +02:00
Werner Koch
483f2ba02e
gpg: Fix another regression due to the T7547 fix.
* g10/getkey.c (get_pubkey_for_sig): Keep a requested
PUBKEY_USAGE_CERT.
(finish_lookup): For correctness in future use cases allow
PUBKEY_USAGE_CERT to also trigger verify mode.
--

The case here was that a cert-only primary key was removed with
export-clean.

GnuPG-bug-id: 7583
2025-05-02 12:05:36 +02:00
Werner Koch
8968e84903
common: Fix logic for certain recsel conditions.
* common/recsel.c (recsel_select): Change processing of NULL values.
* common/t-recsel.c (run_test_2): Adjust for this change.  Also a type
fix for s/"letter"/"letters"/.
--

The getval function may return NULL which indicates that there is no
useful value available.  For example because the propertyname is not
defined for some external context (e.g. in gpg the packet type).  This
also required to fix the test for boolean tests of a non existing
property name.

Reported-by: shniubobo at gnupg-users on 2025-04-18.
2025-04-30 15:13:11 +02:00
Werner Koch
a9445bbb1d
gpg: Add debug flag "recsel".
* g10/gpg.c: Include recsel.h.
(debug_flags): New flag "recsel".
(set_debug): Set it.
* g10/options.h (DBG_RECSEL_VALUE, DBG_RECSEL): New.
* g10/import.c (impex_filter_getval): Add debug diagnostics.
* g10/keylist.c (parse_and_set_list_filter): Dump the record filter.
* common/recsel.c (recsel_debug): New variable.
(recsel_set_debug): New function.
(recsel_select): Add debug output if requested.
2025-04-30 15:06:40 +02:00
Werner Koch
28591a9f3a
doc: Register DCO for Collin Funk
--
2025-04-30 10:40:27 +02:00
Collin Funk
3c5a143945
Fix access to the bintoasc mapping in the libksba support.
* common/ksba-io-support.c (has_only_base64): Use memchr since calling
strchr on a non-NUL terminated string is undefined behavior.

--

Signed-off-by: Collin Funk <collin.funk1@gmail.com>

This patch has been stripped from Colin's original patch because this
is not just about a warning but an actual bug.  That bug was
introduced in 2003 by me.  - wk
2025-04-30 10:36:18 +02:00
Werner Koch
d90b290f97
gpg: New command --quick-tsign-key.
* g10/gpg.c (aQuickTSignKey): New.
(opts): Add new command.
(main): Parse args for it.
* g10/keyedit.c: Include mbox-util.h.
(parse_trustsig_string): New.
(sign_uids): Add arg trustsig for use in quick mode.
(keyedit_quick_sign): Also add arg trustsig and print a diagnostic on
error.
2025-04-29 18:35:29 +02:00
Werner Koch
6d49e86bba
gpg: Make the internal sign_uids function easier to read.
* g10/keyedit.c (SIGN_UIDS_LOCAL): New.
(SIGN_UIDS_NONREVOCABLE): New.
(SIGN_UIDS_TRUSTSIG): New.
(SIGN_UIDS_INTERACTIVE): New.
(SIGN_UIDS_QUICK): New.
(sign_uids): Replace several boolean args by flags arg.
2025-04-29 16:28:00 +02:00
Werner Koch
41d6ae8f41
gpg: New list options "show-trustsig"
* g10/options.h (LIST_SHOW_TRUSTSIG): New.
* g10/gpg.c (parse_list_options): Add "show-trustsig".
* g10/keylist.c (parse_trust_name): New.
(list_signature_print): Print trust signature info.
2025-04-29 11:33:41 +02:00
Andreas Metzler
cfe7ad203a
doc: Add missing whitespace gnupg7 manpage.
--
2025-04-24 11:43:05 +02:00
Werner Koch
db25aa9887
scd:p15: Accept P15 cards with a zero-length label.
* scd/app-p15.c (read_ef_tokeninfo): Allow for a zero length label.
--

Some versions of the CardOS personalisation software seem to store a
missing labels as zero-length object instead of not storing the object
at all.

Due to a lack of such a card this patch has not been tested.
2025-04-24 11:23:08 +02:00
NIIBE Yutaka
97583cf81a
gpgscm: Fix initialization for fixed size chars.
* tests/gpgscm/opdefines.h: Change the order of arguments.
* tests/gpgscm/scheme-private.h (_OP_DEF): OP comes first, and use
variadic args for the macro.
* tests/gpgscm/scheme.c (_OP_DEF): Likewise.
(TST_*): Use integers.
(check_arguments): Follow the change of TST_LIST.

--

GnuPG-bug-id: 7623
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2025-04-22 14:45:41 +09:00
NIIBE Yutaka
0070c2e3b4
gpgscm: Fix for CHARNAMES.
* tests/gpgscm/scheme.c (charnames): It's an array of
strings, not fixed size characters.

--

GnuPG-bug-id: 7623
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2025-04-22 11:03:09 +09:00
Werner Koch
07dc08aa81
gpgconf: Show also stuff from the Registry emulation.
* tools/gpgconf.c (my_read_reg_string): New.  Use it for the registry
listing stuff.
(show_registry_entries_from_file): Use also on Unix.
2025-04-09 11:31:58 +02:00
NIIBE Yutaka
1ed8b0e7b4
dirmngr: Fix libdns with 127.0.0.1.
* dirmngr/dns.c (dns_so_check): Ifdef-out Linux specific code.  Remove
retrying udp_connect_retry when ECONNREFUSED.

--

Fixes-commit: bcdbf8b8ebe9d61160e0b007dabe1b6462ffbc93
GnuPG-bug-id: 4021
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2025-04-07 10:57:27 +09:00
Werner Koch
cfd597c603
gpg: New key generation parameter "User-Id".
* g10/keygen.c (read_parameter_file): Add keyword "User-Id".
2025-04-04 16:11:57 +02:00
NIIBE Yutaka
7fc5b0328f
keyboxd: Searching UpperCaseAddress.
* kbx/backend-sqlite.c (run_select_statement): Convert with
ascii_strlwr when the mode is KEYDB_SEARCH_MODE_MAIL.

--

GnuPG-bug-id: 7576
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
2025-03-26 14:26:54 +09:00
Werner Koch
a762f69648
doc: Update NEWS
--
2025-03-25 09:39:33 +01:00
Werner Koch
2869de63b5
gpgsm: Simplify the expiration check.
* sm/certlist.c (gpgsm_add_to_certlist): Remove the on-demand setting
of the current time.
2025-03-18 12:21:57 +01:00
Ramón García
ad8bce774d
gpgsm: Fix error message if all selected certificates are expired.
* sm/certlist.c (gpgsm_add_to_certlist): Track expired error.  Make
the expired check easier to read by using if and case.
--

Original ChangeLog:
  If all selected certificates are expired, don't mislead the user
  saying that no certificate was found. Instead, return the error
  of the first certificate selected.

  * sm/certlist.c: if one expired certificate was found, don't return
    no certificate found, return instead the expiration error

I heavily changed Ramon's original patch and hope that I don't
introduced a regression to his patch. - wk@gnupg.org
2025-03-18 12:14:50 +01:00
Ramón García
53f5aad905
gpgsm: Avoid increasing error count when enumerating an expired cert.
* sm/certchain.c (check_validity_period_cm): Add arg no_log_expired to
avoid bumping of the error counter due to the do_list function.
* sm/certlist.c (gpgsm_add_to_certlist): Set no_log_expired when
checking the expiration.
--

I modified the original patch to make the patch smaller and the code
easier to read.  - wk@gnupg.org
2025-03-18 10:04:37 +01:00
Ramón García
029ac17b40
gpgsm: When selecting certs also skip certificates too young.
* sm/certlist.c (gpgsm_add_to_certlist): Also check for not yet valid
certs.
2025-03-18 09:48:07 +01:00
Ramón García
4cf83273e8
gpgsm: select unexpired certificates skipping expired ones
* sm/certchain.c (check_validity_period_cm):  Make function global.
* sm/certlist.c (gpgsm_add_to_certlist): If an expired certificate is
found, continue looking for another one.

--

This enables the user to select a certificate by subject, and keep
old expired certificates in the store in case he wishes to decrypt
or verify an old file. This makes renewal of certificate smoother.

Due to a broken patch I had to massage the patch and while doing this
also fixed the indentation and moved a declaration to the begin of a
block.  - wk@gnupg.org
2025-03-18 09:43:26 +01:00
Werner Koch
4f4264c4e8
doc: Register DCO for Ramon García F.
--
2025-03-18 09:02:23 +01:00
Werner Koch
f463586a96
gpgsm: Extend --learn-card by an optional s/n argument.
* agent/command.c (cmd_learn): Allow for s/n argument.
* agent/learncard.c (agent_handle_learn): Ditto.
* agent/call-scd.c (agent_card_learn): Ditto.  Pass it on to scd.

* scd/command.c (cmd_switchcard): Factor most code out to ...
(switchcard_core): new.
(cmd_learn): Add option --demand to specify a s/n.

* sm/gpgsm.c (main): Allow a s/n argument for --learn-card.
--

This help Kleopatra to get a stable certificate listing.
GnuPG-bug-id: 7379
2025-03-17 17:37:08 +01:00
Werner Koch
5420c4ebde
gpgconf: Fix reload and kill of keyboxd.
* tools/gpgconf-comp.c (keyboxd_runtime_change): Fix order of args.
--

Fixes-commit: acaeba2dbdb9bbd68a823c671d5c3577fef5d26d
GnuPG-bug-id: 7569
2025-03-17 10:06:54 +01:00
Werner Koch
a7ec3792c5
scd,w32: Fix posssible lockup due to lost select results.
* scd/scdaemon.c (handle_connections) [W32]: Do not continue the loop
when an event was encountered.
--

Here the event handle is passed to npth_eselect so that this function
can detect the event and reset the event.  There is no need to consume
this information here.  However, npth_select might also got a ready
file descriptor along with the event and by doing a "continue" we
would miss the ready state of the file descriptor.  The fix is to do
nothing here, similar to what we do in gpg-agent.

Fixes-commit: f9acc7d18bb90f47dafe7e32ae92f567756d6b12
GnuPG-bug-id: 2982
2025-03-14 14:04:36 +01:00
Werner Koch
95a11baaa2
doc: Minor updates
--
2025-03-14 13:24:44 +01:00
Werner Koch
c1b965cd92
gpg: Fix double free of internal data.
* g10/sig-check.c (check_signature_over_key_or_uid): Do not free in
no-sig-cache mode if allocated by caller.
--

GnuPG-bug-id: 7547
Fixes-commit: 44cdb9d73f1a0b7d2c8483a119b9c4d6caabc1ec
2025-03-13 11:36:52 +01:00
Werner Koch
c12b7d047e
common: Add a flag for left anchored substring match to recsel.
* common/recsel.c (struct recsel_expr_s): Add field lefta.
(recsel_parse_expr): Parse it.
(recsel_select): Implement selection.
--

This flags makes it for example easy to select keys last updated from
an ldap server:

  gpg --list-filter 'select=origin=ks && -^ url =~ ldap' \
       -k --with-key-origin
2025-03-12 11:09:52 +01:00
Werner Koch
e5555a40e6
Update autogen.sh from upstream to version 2025-03-10
--
2025-03-10 15:03:05 +01:00
Werner Koch
d6ee7adebe
card: Add command "ll"
* tools/gpg-card.c (cmd_list): Add optional ar use_opt_cards.
(enum cmdids): Add cmdLISTCARDS.
(cmds): New command "ll".
(interactive_loop): Ditto.
--

Using "l --cards" is a command required very often thus it makes sense
to have an alias for it.  ll also allows to switch the card without
showing the long listing.
2025-03-10 13:57:50 +01:00
Werner Koch
865adcaa70
Post release updates
--
2025-03-07 15:02:06 +01:00
Werner Koch
5b8c5f7190
Release 2.5.5 gnupg-2.5.5 2025-03-07 13:52:38 +01:00
Werner Koch
abcefe3a8c
po: msgmerge
--
2025-03-07 13:52:20 +01:00
Werner Koch
8cfd261100
po: Update German translation
--
2025-03-07 13:51:41 +01:00
Werner Koch
f29c8dba74
Typo fix and add missing prototype.
--
2025-03-07 13:49:00 +01:00
Werner Koch
0f0e0a732c
build: Update Libassuan M4 macros
--
GnuPG-bug-id: 7541
2025-03-07 09:06:06 +01:00
Werner Koch
d3d7713c17
gpg: Fix regression for the recent malicious subkey DoS fix.
* g10/packet.h (PUBKEY_USAGE_VERIFY): New.
* g10/getkey.c (get_pubkey_for_sig): Pass new flag also to requested
usage.
(finish_lookup): Introduce a verify_mode.
--

Fixes-commit: 48978ccb4e20866472ef18436a32744350a65158
GnuPG-bug-id: 7547
2025-03-06 17:17:17 +01:00