--
For whatever reason (maybe because it is shorter) we used the term
"PIN" instead of "Passphrase" or "Passwort". That is confusing
because there is no cache for smartcard PINs.
* agent/gpg-agent.c (main): Move detection up.
--
The problem is that PARGS is re-used and when detecting a possible
incorrect use, the flag that "--" has already been seen has gone.
--
The last key is new. As usual the key is on a dedicated card with the
Admin PIN accessible to a few core hackers.
# ------------------------ >8 ------------------------
pub rsa3072 2017-03-17 [SC] [expires: 2027-03-15]
5B80C5754298F0CB55D8ED6ABCEF7E294B092E28
sig R BCEF7E294B092E28 2017-03-17 Andre Heinecke (Release Signing Key)
uid Andre Heinecke (Release Signing Key)
sig 3 BCEF7E294B092E28 2017-03-17 Andre Heinecke (Release Signing Key)
sig 1FDF723CF462B6B1 2017-03-17 Andre Heinecke <aheinecke@intevation.de>
pub ed25519 2020-08-24 [SC] [expires: 2030-06-30]
6DAA6E64A76D2840571B4902528897B826403ADA
uid Werner Koch (dist signing 2020)
sig 3 528897B826403ADA 2020-08-24 Werner Koch (dist signing 2020)
sig 249B39D24F25E3B6 2020-08-24 Werner Koch (dist sig)
sig 63113AE866587D0A 2020-08-24 wk@gnupg.org
sig E3FDFF218E45B72B 2020-08-24 Werner Koch (wheatstone commit signing)
sig F2AD85AC1E42B367 2020-08-24 Werner Koch <wk@gnupg.org>
pub ed25519 2021-05-19 [SC] [expires: 2027-04-04]
AC8E115BF73E2D8D47FA9908E98E9B2D19C6C8BD
uid Niibe Yutaka (GnuPG Release Key)
sig 3 E98E9B2D19C6C8BD 2021-05-19 Niibe Yutaka (GnuPG Release Key)
sig 00B45EBD4CA7BABE 2021-09-14 NIIBE Yutaka <gniibe@fsij.org>
sig E267B052364F028D 2021-09-14 NIIBE Yutaka <gniibe@fsij.org>
pub brainpoolP256r1 2021-10-15 [SC] [expires: 2029-12-31]
02F38DFF731FF97CB039A1DA549E695E905BA208
uid GnuPG.com (Release Signing Key 2021)
sig 3 549E695E905BA208 2021-10-15 GnuPG.com (Release Signing Key 2021)
sig 528897B826403ADA 2021-10-15 Werner Koch (dist signing 2020)
sig E3FDFF218E45B72B 2021-10-15 Werner Koch (wheatstone commit signing)
* g10/tdbdump.c (export_ownertrust): Skip records marked with the
option --trusted-key.
(import_ownertrust): Clear the trusted-key flag.
* g10/tdbio.h (struct trust_record): Add field flags.
* g10/tdbio.c (tdbio_dump_record): Improve output.
(tdbio_read_record, tdbio_write_record): Handle flags.
* g10/trustdb.c (verify_own_keys): Clear stale trusted-keys and set
the flag for new --trusted-keys.
(tdb_update_ownertrust): Add arg as_trusted_key. Update callers.
--
GnuPG-bug-id: 5685
Signed-off-by: Werner Koch <wk@gnupg.org>
* tools/gpgconf.c (aShowConfigs): New.
(opts): Add --show-configs.
(CUTLINE_FMT): New.
(show_version_gnupg): Add arg "prefix" and adjust caller.
(my_copy_file): New.
(show_configs_one_file): New.New.
(show_configs): New.
(main): Call show_configs.
--
The ability to have a consolidated list of all config files is very
useful for support cases. This is in particular important due to the
global config files and their conditional constructs.
Signed-off-by: Werner Koch <wk@gnupg.org>
* agent/gpg-agent.c (oStealSocket): New.
(opts): Add option.
(steal_socket): New file global var.
(main): Set option.
(create_server_socket): Implement option.
* dirmngr/dirmngr.c (oStealSocket): New.
(opts): Add option.
(steal_socket): New file global var.
(main): Set option. Add comment to eventually implement it.
--
Note that --steal-socket has currently no effect on dirmngr because
dirmngr does this anway.
Signed-off-by: Werner Koch <wk@gnupg.org>
* scd/apdu.c (select_a_reader): Only SPRx32 is in the white list.
--
GnuPG-bug-id: 5644
Fixes-commit: 752422a792
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* common/i18n.c (i18n_init): Use gnupg_localedir() instead of LOCALEDIR.
(i18n_localegettext): Ditto.
* tools/gpgconf-comp.c (my_dgettext): Ditto.
--
On Unix, gnupg_localedir() returns the locale directory relative to
the root directory of the gnupg installation if specified in the
gpgconf.ctl. Otherwise, it returns the built-in LOCALEDIR.
GnuPG-bug-id: 5999
* common/homedir.c (MYPROC_SELF_EXE): New.
(unix_rootdir): Use it here. Also support GNUPG_BUILD_ROOT as
fallback.
--
In addition this adds a fallback method for AIX etc which do not have
an easy way to get the info.
* common/homedir.c (unix_rootdir): Add arg want_sysconfdir.
(gnupg_sysconfdir): Return it.
--
Our regression test suite has the problem that we can't disable the
use of the global config files or test them using the regualr
binaries. This new keyword will allow us to overcome the problem.
* common/homedir.c (unix_rootdir): New.
(gnupg_bindir): Use it.
(gnupg_libexecdir): Use it.
(gnupg_libdir): Use it.
(gnupg_datadir): Use it.
(gnupg_localedir): Use it.
--
This feature is useful for building and using an AppImage version of
gnupg and probably also for some other use cases.
GnuPG-bug-id: 5999
Here is a sample gpgconf.ctl file
--8<---------------cut here---------------start------------->8---
# gpgconf.ctl
#
# This file is used to change the directories where the gpg components
# are installed. It does not change the configuration directories.
# The file is expected in the same directory as gpgconf. The physical
# installation directories are evaluated and no symlinks. Blank lines
# and lines starting with pound signed are ignored. No errors are
# printed for unknown keywords or commands. The only defined key for
# now is "rootdir" which must be followed by one optional space, an
# equal sign, and the value for the root directory. Environment
# variables are substituted in standard shell manner, the final value
# must start with a slash, trailing slashed are stripped.
rootdir = $APPDIR/gnupg
--8<---------------cut here---------------end--------------->8---
* common/stringhelp.c (substitute_envvars): New. Based on code in
gpg-connect-agent.
* common/t-stringhelp.c: Include sysutils.h.
(test_substitute_envvars): New.
--
GnuPG-bug-id: 5599
* tools/gpgconf-comp.c (munge_config_filename): New.
(change_options_program): Call it.
--
In case a system-wide config exists but no local file, the component
returns the name of the system-wide config file and gpgconf tried to
update this file. This fixes this by detecting the presense of a
system-wide config file.
This applies only to 2.2; the configuration system in 2.3 has been
heavily changed to better handle system-wide configuration files.
GnuPG-bug-id: 5650
* g10/gpg.c (oOverrideComplianceCheck): New.
(opts): Add new option.
(main): Set option and add check for batch mode.
* g10/options.h (opt): Add flags.override_compliance_check.
* g10/sig-check.c (check_signature2): Factor complaince checking out
to ...
(check_key_verify_compliance): new. Turn error into a warning in
override mode.
--
There is one important use case for this: For systems configured
globally to use de-vs mode, Ed25519 and other key types are not
allowed because they are not listred in the BSI algorithm catalog.
Now, our release signing keys happen to be Ed25519 and thus we need to
offer a way for users to check new versions even if the system is in
de-vs mode. This does on purpose not work in --batch mode so that
scripted solutions won't accidently pass a signature check.
GnuPG-bug-id: 5655
Backported-from-master: fb26e144ad
* g10/free-packet.c (free_packet): Add the case for case
PKT_ENCRYPTED_AEAD.
--
GnuPG-bug-id: 5584
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
(bug id fixed in this backport)
* dirmngr/dirmngr.h (struct fingerprint_list_s): Add field binlen.
(opt): Add field ignored_certs.
* dirmngr/dirmngr.c: Add option --ignore-cert
(parse_rereadable_options): Handle that option.
(parse_ocsp_signer): Rename to ...
(parse_fingerprint_item): this and add two args.
* dirmngr/certcache.c (put_cert): Ignore all to be igored certs.
Change callers to handle the new error return.
--
This option is useful as a workaround in case we ill run into other
chain validation errors like what we fixed in
GnuPG-bug-id: 5639
Backported-from-master: 4b3e9a44b5
* scd/apdu.c (pcsc): Add flag context_valid, remove count.
(close_pcsc_reader): Use new flag instead of looking at magic context
value.
(pcsc_init): Set new flag.
(open_pcsc_reader): Use new flag.
(apdu_init): Clear new flag.
* scd/apdu.c: Remove assert.h. Replace all assert by log_assert.
--
The previous fix 192113552f did not
help, thus the new hypothesis is that PC/SC might return a valid
context with the value -1. We now use a dedicated flag to track the
validity of the context.
The reference counting seems to be superfluous and is a relict due to
backporting from 2.3. Removed.
* scd/apdu.c: Include membuf.h.
(pcsc): Add reader_list field.
(open_pcsc_reader): Fill that field.
(apdu_get_reader_list): New.
* scd/command.c: Remove header ccid-driver.h.
(pretty_assuan_send_data): New.
(cmd_getinfo): Print all reader names.
--
Note that depending on the card backend (ccid or PC/SC) it might be
necessary to first send a reset followed by SERIALNO to get an updated
list of reader. Or well send KILLSCD.
The pretty printing of Assuan data lines does only work if you connect
direct to scdaemon because the wrapper in gpg-agent does not know
about this and combines the Assuan lines again.
Signed-off-by: Werner Koch <wk@gnupg.org>
* scd/apdu.c (close_pcsc_reader): Don't ref-count if the context is
invalid.
(open_pcsc_reader): Compare the context against -1 which is our
indicator for an invalid context.
--
I got a crash report for Windows:
DBG: chan_0x000000a4 <- RESTART
DBG: chan_0x000000a4 -> OK
DBG: chan_0x000000a4 <- SERIALNO
DBG: open_pcsc_reader(portstr=(null))
reader slot 0: not connected
DBG: open_pcsc_reader => slot=0
DBG: enter: apdu_connect: slot=0
pcsc_connect failed: invalid PC/SC error code (0x6)
reader slot 0: not connected
DBG: leave: apdu_connect => sw=0x1000b
DBG: enter: apdu_close_reader: slot=0
DBG: enter: apdu_disconnect: slot=0
DBG: leave: apdu_disconnect => sw=0x0
Ohhhh jeeee: Assertion "pcsc.count > 0" in
close_pcsc_reader failed (...2.2.28/scd/apdu.c:817)
no smartcard reader was connected but the box might sport a virtual
reader. This patch should make it more robust.
Signed-off-by: Werner Koch <wk@gnupg.org>
* common/membuf.c (put_membuf): Allow NULL for the second arg.
--
Cherry-picked from master commit of:
f271c69164
There has been such a use case in keybox-blob.c.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>