2024-03-07  Werner Koch  <wk@gnupg.org>

	Release 2.4.5.
	+ commit cbff323b3b24c50f2bdef9b209c94516571c4df0


	scd: Improve code reability of ccid-driver.c.
	+ commit 09431d1762bd04b14b28906028e9963b1b386fed
	* scd/ccid-driver.c (my_npth_unprotect, my_npth_protect): New.
	Replace all direct uses by these wrappers.

2024-03-07  Werner Koch  <wk@gnupg.org>
	    markus.montkowski@gnupg.com

	scd: Add support for ACR-122U.
	+ commit 1682ca9f012a72e97ed20b9b33e100501b9b94cf
	* scd/ccid-driver.h (VENDOR_ACR, ACR_122U): New.
	* scd/ccid-driver.c (ccid_open_usb_reader): Do not call
	libsub_set_interface_alt_setting for this reader.

2024-03-07  Werner Koch  <wk@gnupg.org>

	scd: Let the CCID module auto detach the kernel driver.
	+ commit a1ea3b13e0c79cb301216727b17631fbf1b23e06
	* scd/ccid-driver.c (ccid_open_usb_reader): Call
	libusb_set_auto_detach_kernel_driver.

	* scd/scdaemon.c (oCompatibilityFlags): New.
	(opts): Add option "compatibility-flags".
	(compatibility_flags): New.
	(main): Parse flags.
	* scd/scdaemon.h (opt): Add field compat_flags.
	(COMPAT_CCID_NO_AUTO_DETACH): New.

2024-03-06  Werner Koch  <wk@gnupg.org>

	wks: Make gpg-wks-client --mirror work w/o args.
	+ commit 37cc255e49427dfaaa9907fe789dc6e84484d532
	* tools/gpg-wks-client.c (mirror_one_key): Test for no domain
	specified.

2024-03-04  Werner Koch  <wk@gnupg.org>

	gpg: Fix mixed invocation with --trusted-keys and --no-options.
	+ commit 345794cfe671c66f32fb63bb37bd41b19517359f
	* g10/trustdb.c: Move a function and some definitions around.
	(user_utk_list): Rename to trusted_key_list.  Change all users.
	(any_trusted_key_seen): New.
	(tdb_register_trusted_key): Set it here.  Handle the new value "none".
	(verify_own_keys): Do not delete a trusted key from the trustdb if a
	trusted-key option was not used.

	wks: Add option --realclean to gpg-wks-client.
	+ commit 36a3550bffd233b1cf7b94ecd15c986ec18e1494
	* tools/gpg-wks-client.c (oRealClean): New.
	(opts): Add "realclean".
	(parse_arguments): Implement.
	(main): Take a copy of the module name to fix bad assignment from a
	former patch.
	* tools/gpg-wks-server.c (main): Ditto.
	* tools/gpg-wks.h (opt): Add field realclean.
	* tools/wks-util.c (wks_get_key): Call gpg with export-realclean
	depending on the new option.

	gpg: Prepare for a new export option export-realclean.
	+ commit 74e4dd3668b3a737eb7929da5f5de2f12f6ca9b8
	* g10/options.h (EXPORT_REALCLEAN): New.  Also re-assign other values
	to keep them more in sync with the corresponding import values.
	* g10/export.c (parse_export_options): Add "export-realclean".
	(do_export_stream): Call clean_all_uids directly with the options
	arg.
	* g10/import.c (import_one_real): Change for direct use of options in
	clean_all_uids.
	* g10/key-clean.c (is_trusted_key_sig): New.  Stub for now.
	(clean_sigs_from_uid): Re-purpose self_only to a general options arg.
	Implement EXPORT_REALCLEAN code path.
	(clean_one_uid): Re-purpose self_only to a general options arg.
	(clean_all_uids): Ditto.
	* g10/keyedit.c (keyedit_menu): Use EXPORT_MINIMAL instead of a simple
	flag.
	(menu_clean): Re-purpose self_only to a general options arg.

	* g10/keyid.c (fpr20_from_pk): Factor code out to ....
	(fpr20_from_fpr): new.  Remove useless case for ARRAY being NULL.
	* g10/tdbio.c (tdbio_search_trust_byfpr): Add arg fprlen and use
	fpr20_from_fpr if needed.
	(tdbio_search_trust_bypk): Pass 20 for the fingerprint length.

2024-02-27  Werner Koch  <wk@gnupg.org>

	gpg: Emit status lines for errors in the compression layer.
	+ commit dcab895e4cdc829f97276d2a2647594fb86cdba2
	* g10/compress-bz2.c: Replace all log_fatal by log_error,
	write_status_error, and g10_exit.
	(do_uncompress): Ditto.

	Allow tilde expansion for the foo-program options.
	+ commit 962058f704867082d6d00f6467a79c78e41169ca
	* agent/gpg-agent.c (parse_rereadable_options): Use make_filename_try
	for opt.pinentry_program.  Change definition accordingly.
	* g10/gpg.c (main): Use make_filename for agent_program,
	dirmngr_program, and keyboxd_program. Change definition accordingly.
	* sm/gpgsm.c (main): Ditto.
	* tools/gpg-card.c (parse_arguments): Ditto.
	* tools/gpg-connect-agent.c (main): Ditto.
	* tools/gpg-wks-client.c (parse_arguments): Likewise.  Do it also for
	option --output.
	(process_confirmation_request): Print a note for a successful sent.

2024-02-25  Werner Koch  <wk@gnupg.org>

	agent: Allow GET_PASSPHRASE in restricted mode.
	+ commit adf4db6e20931ed70ea9f8541f522192d6fd2014
	* agent/command.c (cmd_get_passphrase): Allow use in restricted mode
	but ignore the cacheid.

2024-02-21  Werner Koch  <wk@gnupg.org>

	gpg: Fix gpg_mpi_write for the unused opaque case.
	+ commit 2372f6a4035cefd5ac1852e95dc50de89cc73af6
	* g10/build-packet.c (gpg_mpi_write): Take care of the fact that
	get_opaque already returns a bit-exact value.

	wks: Allow command style args for gpg-wks-client.
	+ commit a09157ccb2bdd9b9197e64eb9d60953c1d5c46ae
	* tools/gpg-wks-client.c (wrong_args): Take two args.  Change all
	callers.
	(main): Pass ARGPARSE_FLAG_COMMAND for recent gpgrt version.

2024-02-20  Werner Koch  <wk@gnupg.org>

	g13: Allow command line style "g13 mount foo".
	+ commit 95bc592ab547cd88f912d15973fa854b46f2f4d1
	* g13/g13.c (main): Set flag ARGPARSE_FLAG_COMMAND.

2024-02-20  Mario Haustein  <mario.haustein@hrz.tu-chemnitz.de>

	scd:p15: Fix typo in a comment.
	+ commit 3aa02027cdc3ce07f9884cd9c755cdc87133fad6


	scd:p15: Add ECC support for D-Trust Card 4.1/4.4.
	+ commit 557f29d2c16e8d31729a20f56e2c18b0b0726414
	* scd/app-p15.c (do_sign): Add MSE RESTORE parameters for D-Trust ECC
	cards.
	(do_decipher): Ditto.

2024-02-20  Werner Koch  <wk@gnupg.org>
	    Mario Haustein  <mario.haustein@hrz.tu-chemnitz.de>

	scd:p15: Take derive usage into account for decryption (2).
	+ commit 1e496cf2e5271b1bf07a6252d0fbc6ac8c947a0a
	* scd/app-p15.c (do_getattr): Yet another palce to fix.

2024-02-20  Werner Koch  <wk@gnupg.org>

	scd:p15: Handle duplicate certificate ids.
	+ commit 3341017ff12599ff627b37fbe3c516df937c7989
	* scd/app-p15.c (struct app_local_s): Add field cdf_dup_counter.
	(objid_in_cdflist_p): New.
	(read_p15_info): Clear the counter.
	(read_ef_cdf): Detect and fix duplicate IDs.

	scd:p15: Take derive usage into account for decryption.
	+ commit ad4bc3e04d0b4225d69595efebebebdf24e03fa9
	* scd/app-p15.c (set_usage_string): Map usageflags.derive also to 'e'.
	(do_auth): Allow usageflags.sign_recover.
	(do_decipher): Allow usageflags.derive.
	(do_with_keygrip): Take usageflags.derive into account.
	(do_gettatr): Ditto.
	(do_decipher): Take a missing AODF for authentication not needed.

2024-02-16  NIIBE Yutaka  <gniibe@fsij.org>

	dirmngr: Fix keep-alive flag handling.
	+ commit 2810b934647edd483996bee1f5f9256a162b2705
	* dirmngr/http.c (run_proxy_connect): Set KEEP_ALIVE if not Basic
	Authentication.  Fix resource leak of FP_WRITE.

	dirmngr: Fix the regression of use of proxy for TLS connection.
	+ commit 848546b05ab0ff6abd47724ecfab73bf32dd4c01
	* dirmngr/http.c (run_proxy_connect): Don't set keep_alive, since it
	causes resource leak of FP_WRITE.
	Don't try to read response body to fix the hang.

2024-02-15  NIIBE Yutaka  <gniibe@fsij.org>

	dirmngr: Fix proxy with TLS.
	+ commit 04cbc3074aa98660b513a80f623a7e9f0702c7c9
	* dirmngr/http.c (proxy_get_token, run_proxy_connect): Always
	available regardless of USE_TLS.
	(run_proxy_connect): Use log_debug_string.
	(send_request): Remove USE_TLS.

2024-02-10  Werner Koch  <wk@gnupg.org>

	gpg: Add option --assert-pubkey_algo.
	+ commit 302afcb6f6af1dc88357acacfaa6829f0717b1c6
	* g10/keyid.c (parse_one_algo_string): New.
	(compare_pubkey_string_part): New.
	(compare_pubkey_string): New.
	* g10/verify.c (check_assert_signer_list): New.
	* g10/mainproc.c (check_sig_and_print): Call check_assert_pubkey_algo.
	* g10/options.h (opt): Add field assert_pubkey_algos.
	* g10/gpg.c (oAssertPubkeyAlgo): New.
	(opts): Add "--assert-pubkey_algo".
	(assert_pubkey_algo_false): New.
	(main): Parse option.
	(g10_exit): Reorder RC modifications.  Check assert_pubkey_algo_false.
	* common/status.h (ASSERT_PUBKEY_ALGOS): new.
	* common/t-support.h (LEAN_T_SUPPORT): Use a simplified version if
	this macro is set.

	* g10/gpgv.c (oAssertPubkeyAlgo): New.
	(opts): Add "--assert-pubkey_algo".
	(assert_pubkey_algo_false): New.
	(main): Parse option.
	(g10_exit): Check assert_pubkey_algo_false.

	* g10/t-keyid.c: New.
	* g10/Makefile.am: Add t-keyid.
	* g10/test-stubs.c: Add assert_pubkey_algos and assert_signer_list and
	remove from other tests.
	(check_assert_signer_list): Ditto.
	(check_assert_pubkey_algo): Ditto.

2024-02-05  Werner Koch  <wk@gnupg.org>

	gpgsm: Increase salt size in pkcs#12 parser.
	+ commit 214d3ffe0f91b1a4ce11a278289fedef18323bb1
	* sm/minip12.c (parse_bag_encrypted_data): Need 32 bytes.

2024-02-05  Ángel González  <angel@pgp.16bits.net>

	gpgsm: cleanup on error paths.
	+ commit 375c3a238ab67be9d52d1c4436f9855324c3f5dd
	* sm/minip12.c (p12_parse): set err on the different error paths

2024-01-30  Werner Koch  <wk@gnupg.org>

	scd:openpgp: Allow PIN length of 6 also with a reset code.
	+ commit 40b85d8e8cecadf35e51e84b30de4fac820d714b
	* scd/app-openpgp.c (do_change_pin): Fix PIN length check.  Add "R"
	flag to the reset code prompt.

2024-01-30  Andre Heinecke  <aheinecke@gnupg.org>

	w32, msi: Fix directory of gpg-card, add keyboxd.
	+ commit d6dedda3f2a2ed7dd1f422856e9cc05f8f01d8cd
	* build-aux/speedo/w32/wixlib.wxs: Fix gpg-card directory id.
	Add keyboxd.

2024-01-29  Jakub Bogusz  <qboosh@pld-linux.org>

	po: update Polish translation.
	+ commit 300c9eeace35b04f0f108e93ce17fd37a779de58


2024-01-29  Werner Koch  <wk@gnupg.org>

	gpg: Minor code cleanup for fingerprint computation.
	+ commit 03207f62e80ac03826f7dbe04a59f15df0f57530
	* g10/keyid.c (do_hash_public_key): Simplify code for clarity.

2024-01-26  Werner Koch  <wk@gnupg.org>

	dirmngr: For CRL issuer verification trust the system's root CA.
	+ commit 4dc09bc5e7f349948a0bb68bdacfdbbc221a2b45
	* dirmngr/crlcache.c (crl_parse_insert): Add
	VALIDATE_FLAG_TRUST_SYSTEM.

	common,w32: Fix use of GNUPG_SPAWN_KEEP_STDERR.
	+ commit eaf6a7ab8796a7128fc64516eac4351717a5b2f7
	* common/exechelp-w32.c (gnupg_spawn_process): Fix macro.

2024-01-25  Werner Koch  <wk@gnupg.org>

	Release 2.4.4.
	+ commit a43271cc08e2068acc75a1742f90740afe0479e0


	card: Tweak the checkcmds sub-command.
	+ commit 2a4180812ac21257a82c091df1bec1b6e087a0bd
	* tools/gpg-card.c (cmd_checkkeys): Skip not found keys.

2024-01-24  Werner Koch  <wk@gnupg.org>

	gpg: Add sub-option ignore-attributes to --import-options.
	+ commit d4976e35d2ca431b2a651aa11be8a4589c8dd39a
	* g10/options.h (IMPORT_IGNORE_ATTRIBUTES): New.
	* g10/import.c (parse_import_options): Add new sub-option.
	(read_block): Implement sub-option.

	card: flush stdout to get checkcmd's info messages in order.
	+ commit bea31c845aad89142ac43e67b188591cf9b73c50
	* tools/gpg-card.c (cmd_checkkeys): Insert an fflush.

2024-01-23  NIIBE Yutaka  <gniibe@fsij.org>

	sm: Fix ECDH encryption with dhSinglePass-stdDH-sha384kdf-scheme.
	+ commit 9408c6bf51722a4b268f8fa9152998fd73695bcc
	* sm/encrypt.c (ecdh_encrypt): Cipher is AES192 for id-aes192-wrap.

2024-01-22  Werner Koch  <wk@gnupg.org>

	gpg: Use ephemeral mode for generating card keys.
	+ commit ead2982286f8ae94e96c0da09c6ed8c294711a47
	* g10/call-agent.c (agent_set_ephemeral_mode): New.
	* g10/keyedit.c (keyedit_menu) <bkuptocard>: Switch to ephemeral mode.
	* g10/keygen.c (do_generate_keypair): Switch to ephemeral mode for
	card keys with backup.

	agent: Add "ephemeral" Assuan option.
	+ commit 434a641d40cbff82beb9f485e0adca72419bfdf2
	* agent/agent.h (struct ephemeral_private_key_s): New.
	(struct server_control_s): Add ephemeral_mode and ephemeral_keys.
	(GENKEY_FLAG_NO_PROTECTION, GENKEY_FLAG_PRESET): New.
	* agent/genkey.c (clear_ephemeral_keys): New.
	(store_key): Add arg ctrl and implement ephemeral_mode.  Change all
	callers.
	(agent_genkey): Replace args no_protection and preset by a generic new
	flags arg.
	* agent/findkey.c (wipe_and_fclose): New.
	(agent_write_private_key): Add arg ctrl and implement ephemeral_mode.
	Change all callers.
	(agent_update_private_key): Ditto
	(read_key_file): Ditto.
	(agent_key_available): Ditto.
	* agent/command-ssh.c (card_key_available): Do not update display s/n
	in ephemeral mode.  This is however enver triggred.
	* agent/gpg-agent.c (agent_deinit_default_ctrl): Cleanup ephemeral
	keys.
	* agent/command.c (cmd_genkey): Use the new flags instead of separate
	vars.
	(cmd_readkey): Create a shadow key only in non-ephemeral_mode.
	(cmd_getinfo): Add sub-command "ephemeral".
	(option_handler): Add option "ephemeral".

	gpg: Add a communication object to the key generation code.
	+ commit ee56f71c8a68d909d99062e96c23ffe9f8533b2b
	* g10/keygen.c (struct common_gen_cb_parm_s): New.
	(common_gen): Add args common_gen_cb and common_gen_cb_parm.  Adjust
	all callers.
	(do_generate_keypair): Clarify the code by using a better var name.

	card: New subcommand "checkkeys".
	+ commit adeb17e37588cf88300a2df91a4ec2ec34fccec7
	* agent/command.c (cmd_havekey): Add new option --info.
	* tools/card-call-scd.c (scd_readkey): Allow using without result arg.
	(struct havekey_status_parm_s): New.
	(havekey_status_cb): New.
	(scd_havekey_info): New.
	(scd_delete_key): New.
	* tools/gpg-card.c (print_keygrip): Add arg with_lf.
	(cmd_checkkeys): New.
	(cmdCHECKKEYS): New.
	(cmds): Add command "checkkeys".
	(dispatch_command, interactive_loop): Call cmd_checkkeys.

2024-01-22  Tobias Fella  <tobias.fella@gnupg.com>

	Pass PINENTRY_GEOM_HINT environment variable to pinentry.
	+ commit cb8eb366cb009b66af95c7b5a147db4c6a651e40
	* common/session-env.c: Add PINENTRY_GEOM_HINT to variables.

2024-01-16  Werner Koch  <wk@gnupg.org>

	gpg: For v5 key generation for X448 also in parm file mode.
	+ commit 5402e6fb936d25243bf546a560b20b9e5f7b2b24
	* g10/keygen.c (curve_is_448): New.
	(do_create_from_keygrip): Pass arg keygen_flags byref so that it can
	be updated.  Set v5 flag for X448.
	(gen_ecc): Ditto.
	(do_create): Change keygen_flags as above.  For robustness change
	checking for Ed448.
	(do_generate_keypair): Change keygen_flags as above
	(generate_subkeypair): Ditto.
	(gen_card_key): Ditto. Support v5 keys.

	gpg: When using a parm file w/o usage don't set the RENC usage.
	+ commit 1a2c8267f54ba0a55fa2f87fdc19068b0088510f
	* g10/keygen.c (proc_parameter_file): Don't include RENC in the
	default usage.

2024-01-15  Werner Koch  <wk@gnupg.org>

	gpgsm: Allow parsing of PKCS#12 files with two private keys.
	+ commit 0cb622d632f732c24a5d312baf2c6e453775eb10
	* sm/minip12.c (struct p12_parse_ctx_s): Add privatekey2.
	(parse_shrouded_key_bag): Handle a second private key.
	(p12_parse_free_kparms): New.

	* sm/import.c (parse_p12): Factor some code out to ...
	(p12_to_skey): this.
	(parse_p12): Use p12_parse_free_kparms.

	gpgsm: Improve the status line for --verify errors.
	+ commit 092154e17e885616340d7b1f7ecaf5cab4b2baa8
	* sm/verify.c (gpgsm_verify): Improve verify.leave status line.

2024-01-12  Werner Koch  <wk@gnupg.org>

	speedo: Add install target for Unix.
	+ commit 3f12e3dacbe65b4847eb2ba3b19ae6ee82c6217d
	* build-aux/speedo.mk: Default to SELFCHECK=0.
	(install, install-speedo): New targets.

	speedo: Patch ELF binaries to use built libraries.
	+ commit 5a6df94a9a4b2a2c16c5184c37e215302574b90b
	* build-aux/speedo.mk: Remove GUI stuff.  Add patchelf feature.
	* Makefile.am (speedo): New target.

2024-01-11  Werner Koch  <wk@gnupg.org>

	gpg: Improve error message for expired default keys.
	+ commit bbad0a2644d18c2d7867c7862006c0d011fbdea7
	* g10/getkey.c (parse_def_secret_key): Track reason for skipping keys.

	doc: Document the gpgconf --unlock command.
	+ commit e65720f286cc65b32eb559db2c1ce32ad0829155
	* tools/gpgconf.c (main): Fix usage message.

	gpg: Fix regression in the Revoker keyword of the parmeter file.
	+ commit 8dfbad0c416ebeaf838d06d50708b8b21f7a8e4a
	* g10/keygen.c (parse_revocation_key): Actually allow for v4
	fingerprints.

2024-01-10  Werner Koch  <wk@gnupg.org>

	gpg: Allow to create revocations even with non-compliant algos.
	+ commit b7f45ee6adbc1a2d22b596aada2e8ca8b1e1c82b
	* g10/sign.c (do_sign): Skip compliance check for revocation certs.

	scd:p15: Allow signing for CVISION cards.
	+ commit 275ced5067dabba3028192e50896f2a0e4a4d13c
	* scd/app-p15.c (do_sign): Add code for Starcos 3.2 and the CVISION
	product.

2024-01-09  Werner Koch  <wk@gnupg.org>

	g13: New option --no-mount.
	+ commit 6233a17ac99deb8d246458380813b621df2609bf
	* g13/g13.c (oNoMount): New.
	(opts): Add --no-mount.
	(main): Implement this.
	* g13/g13-common.h (opt): Add field no_mount.
	* common/status.h (STATUS_PLAINDEV): New.
	* g13/sh-cmd.c (has_option): Uncomment.
	(cmd_mount): Add option --no-mount and pass down.
	* g13/sh-dmcrypt.c (sh_dmcrypt_mount_container): Add arg nomount and
	emit PLAINDEV status line.
	(sh_dmcrypt_umount_container): Rund findmnt before umount.

	gpg: Print a useful error id SKI algo 253 is found.
	+ commit 4ca017e43bb296b937c792c28cd500baa1f8dc14
	* g10/parse-packet.c (parse_key): Detect the SKI algo 253.

	scd:p15: Allow PIN verification and decryption for CVISION cards.
	+ commit 880dde8e5bafb1efc6b3b1b64ccc8fd43a46f775
	* scd/app-p15.c (CARD_PRODUCT_CVISION): New.
	(IS_STARCOS_3): New.
	(read_p15_info): Detect this product.
	(prepare_verify_pin): Add special handling for this product.
	(do_decipher): Use dedicated MSE for Starcos 3 cards.

	gpgconf: Adjust -X command for the new VERSION file format.
	+ commit 35fd89b168b622966019c07aa619b99c2912534c
	* tools/gpgconf.c (show_version_gnupg): Read and parse the entire
	VERSION file.

	common,w32: Remove duplicated backslashes when setting the homedir.
	+ commit 45f6357881459dcb6b2b78e475d1c136bcb6f606
	* common/homedir.c (copy_dir_with_fixup) [W32]: Fold double
	backslashes.

2024-01-05  Werner Koch  <wk@gnupg.org>

	gpg: Improve error return for --quick-add-subkey and -add-adsk.
	+ commit 2cb97713e9b6590db05894e8015c6cb3d04f4a6f
	* g10/keyedit.c (keyedit_quick_addkey): Emit a ERROR status line.
	(keyedit_quick_addadsk): Ditto.

2024-01-04  Werner Koch  <wk@gnupg.org>

	scd: Add support for SCE 7.0.
	+ commit 3f8cb9b33949494202fefaa8901ab252467cc1f1
	* scd/app-common.h (CARDTYPE_SCE7): New.
	* scd/app.c (strcardtype): Support it.
	(atr_to_cardtype): New.
	(app_new_register): Try to get the cardtype from atr_to_cardtype.
	* scd/app-piv.c (app_select_piv): Tweak for SCE7.  Add general method
	to construct a S/N from the Card UUID.

2024-01-02  Werner Koch  <wk@gnupg.org>

	gpg: Choose key from inserted card over a non-inserted card.
	+ commit 4c04143d81370d1a1e6006fada1057461b3d3184
	* g10/call-agent.c (agent_probe_secret_key): Do not return an error
	but 0.
	* g10/getkey.c (finish_lookup): Improve the selection of secret keys.

2023-12-29  NIIBE Yutaka  <gniibe@fsij.org>

	gpg: Don't call keybox_compress when KEYDB_RESOURCE_FLAG_READONLY.
	+ commit 591a53d716aab90e0b9573ce4a993e4577486e3f
	* g10/keydb.c (keydb_add_resource): Check the FLAGS to call
	keybox_compress.

2023-12-25  NIIBE Yutaka  <gniibe@fsij.org>

	tools: Fix argparse table of gpgconf.
	+ commit 2be53b214d1c9205f5326ca663115200609d8df4
	* tools/gpgconf.c (opts): Use ARGPARSE macros.

2023-12-22  Werner Koch  <wk@gnupg.org>

	common: Add keyword socketdir to gpgconf.ctl.
	+ commit 239c1fdc28dcd0dc7aa5341be7c966da2231642a
	* common/homedir.c (enum wantdir_values): New enums.
	(unix_rootdir): Change arg to use the enums.  Adjust all callers.  Add
	support for the socketdir keyword.
	(_gnupg_socketdir_internal): Take care of the socketdir keyword in
	gpgconf.ctl.

	* doc/tools.texi (Files used by gpgconf): Briefly explain the
	gpgconf.ctl syntax.

2023-12-22  NIIBE Yutaka  <gniibe@fsij.org>

	scd:openpgp: Add the length check for new PIN.
	+ commit 2376cdff1318688d94c95fd01adc4b2139c4a8c7
	* scd/app-openpgp.c (do_change_pin): Make sure new PIN length
	is longer than MINLEN.

2023-12-21  NIIBE Yutaka  <gniibe@fsij.org>

	tools: Remove the dotlock tool.
	+ commit 91255c3afd3365a092963044881b30e8e6cc7f33
	* tools/Makefile.am (libexec_PROGRAMS): Remove dotlock.
	* tools/dotlock.c: Remove.

2023-12-20  Werner Koch  <wk@gnupg.org>

	scd:p15: Add a diagnostic for unsupported DTRUST4 features.
	+ commit f2904737e5594676fdc5f1cadf3cc52621bc901a
	* scd/app-p15.c (do_sign): Add a diagnostic.

2023-12-20  Mario Haustein via Gnupg-devel  <gnupg-devel@gnupg.org>

	scd:p15: Add support for D-Trust Card 4.1/4.4.
	+ commit 0b85a9ac09d1593d472ac6f2f51af7608b0dd617
	* scd/app-p15.c (CARD_PRODUCT_DTRUST4) New.
	(app_select_p15): This cards uses a different AID for PKCS#15
	application
	(do_sign): The card doesn't support MSE SET, but requires MSE RESTORE to
	a predefined template.
	(do_decipher): Ditto.

	scd:p15: Add support for CardOS 5.4.
	+ commit 812f9880591e54601d0fb32f5832e6c5029358be
	* scd/app-p15.c (CARD_TYPE_CARDOS_54): New.

2023-12-20  NIIBE Yutaka  <gniibe@fsij.org>

	tools: Integrate the dotlock tool into gpgconf.
	+ commit 93b5ba38dc3acc78fd93af7dcad22332af32f724
	* tools/gpgconf.c (dotlock_tool): New.
	(main): Add --lock and --unlock commands.

	common: Add dotlock util under libexec.
	+ commit 1f04993cd0acaf6fb4982e822f8d8b5722197e03
	* tools/Makefile.am (libexec_PROGRAMS): Add dotlock.
	* tools/dotlock.c: Finish the first implementation.

	common: Clean up the temporary file at dotlock_destroy.
	+ commit b298322d36d4fc9a8d86515410e1d3f2cddea19f
	* common/dotlock.c (dotlock_destroy): Clean up the temporary file
	created when it fails.

	common: Support not-removing the lockfile by dotlock_destroy.
	+ commit 2f6fec3f482d3a6660ce9bf299c0ff7fae21b80b
	* common/dotlock.c (dotlock_destroy): Keep the lock
	when DOTLOCK_LOCK_BY_PARENT.

	common: Fix a possible resource leak for dotlock.
	+ commit 5488ad0517422b31a7be46a7575f5f5492e9fee1
	* common/dotlock.c (dotlock_destroy_unix): Don't release ->TNAME here.
	(dotlock_destroy): Release the memory unconditionally.

2023-12-19  Werner Koch  <wk@gnupg.org>

	common: Improve the parsing of gpgconf.ctl variables.
	+ commit 8eff1d4c511088ff40d5fac13c00cdd07467eebb
	* common/homedir.c (unix_rootdir): Simplify.

2023-12-19  NIIBE Yutaka  <gniibe@fsij.org>

	common: Enhance dotlock, so that we can have a CLI util.
	+ commit 6b4fd3a5da7e018166d154d6514161d939f5c4f1
	* common/dotlock.h (DOTLOCK_LOCK_BY_PARENT, DOTLOCK_LOCKED): New.
	* common/dotlock.c [HAVE_POSIX_SYSTEM]: Include <dirent.h>.
	(dotlock_get_process_id, dotlock_detect_tname): New.
	(dotlock_create_unix): Handle the case when no_write option is
	specified.  Not creating the lock file, but detect the the file of
	tname.
	(dotlock_create) [HAVE_POSIX_SYSTEM]: Add support of
	DOTLOCK_LOCK_BY_PARENT and DOTLOCK_LOCKED for dotlock CLI util.
	(dotlock_take_unix): Support the case of DOTLOCK_LOCK_BY_PARENT.

	kbx: Create public-keys.d, after creating the homedir.
	+ commit 1c5584c395d75121046e42a27d60df7b6c6e660e
	* kbx/keyboxd.c (create_directories): Following the behavior of
	gpg-agent, call create_public_keys_directory after mkdir.

2023-12-18  Werner Koch  <wk@gnupg.org>

	keyboxd: Pass lock info back to gpg and gpgsm.
	+ commit bd8346f7abdd6c163d563a2ed5059b514beb7c01
	* g10/call-keyboxd.c (keydb_default_status_cb): New.
	(keydb_update_keyblock): Add new status callback.
	(keydb_insert_keyblock): Ditto.
	(keydb_delete_keyblock): Ditto.
	(search_status_cb): Also try the new status callback.
	* sm/keydb.c (keydb_default_status_cb): New.
	(keydb_insert_cert): Add new status callback.
	(keydb_delete): Ditto
	(search_status_cb): Also try the new status callback.

	keyboxd: Timeout on failure to get the database lock.
	+ commit c99282fc7838870b70a831924778e50cac34b3e1
	* kbx/backend-sqlite.c (dblock_info_cb): New.
	(create_or_open_database): Add arg ctrl.  Add a 10 second timeout.
	Avoid warning on error if not locked.
	(be_sqlite_add_resource): Do not open the database here.
	(be_sqlite_search): ... but do it here.

	common: Add an info callback to dotlock.
	+ commit 937aeb1904eb5cbe7a8c1c686877c7a9e1196ca6
	* common/dotlock.h (enum dotlock_reasons): New.
	(DOTLOCK_PREPARE_CREATE): New flag.
	* common/dotlock.c (struct dotlock_handle): Add info_cb and
	info_cb_value.
	(dotlock_create): Support the new flag.
	(dotlock_finish_create): New.
	(read_lockfile): Silence in case of ENOENT.
	(dotlock_set_info_cb): New.  Use callback after all error and info
	messages.
	(dotlock_take_unix, dotlock_take_w32): Allow termination by callback.

2023-12-12  Werner Koch  <wk@gnupg.org>

	common: Improve error return for dotlock.
	+ commit f57717bf2314578385e184de5e417b08e22c4c87
	* common/dotlock.c (dotlock_take_unix): Return a ETIMEDOUT insteaad of
	EACCESS on timeout.
	(dotlock_take_w32): Ditto.

2023-11-27  Werner Koch  <wk@gnupg.org>

	gpgsm: Set validity flag in keylisting to n for untrusted root cert.
	+ commit 73aa6dc6e41f16fd0b4fdd52c4a01a9f29ab9fea
	* sm/keylist.c (list_cert_colon): Map not_trusted to 'n' for non-root
	certs like we do for root certs.

2023-11-23  Werner Koch  <wk@gnupg.org>

	scd:openpgp: Fallback to default ECDH params in writekey.
	+ commit 4c456bf07508cb65f4937394afc1ee18f1fd2655
	* scd/app-openpgp.c (ecc_writekey): Use default ECDH parameters and
	remove the now useless check.

2023-11-21  Werner Koch  <wk@gnupg.org>

	agent: Update the key file only if changed (slight return).
	+ commit 09329d52b5f0e1dba32d44cecc8c50ab57cb31bd
	* agent/findkey.c (read_key_file): Add optional arg r_orig_key_value
	to return the old Key value.  Change all callers.
	(agent_write_private_key): Detect whether the Key entry was really
	changed.

	common: Check wether to set the modified flag in nve_set.
	+ commit 813bb65d952d7d02039f8c04c18cc74a512eacf7
	* common/name-value.c (nvc_set): Factor code out to ...
	(nve_set): here.

	agent: Update the key file only if not changed.
	+ commit cf2d3f7ba0b7ffd0f1c014186fb60630c132dba1
	* common/name-value.c (struct name_value_container): Add flag
	"modified".
	(nvc_modified): New.
	(nvc_new): Set flag.
	(_nvc_add): Set flag.
	(nvc_delete): Set flag.
	(nvc_set): Set flag unless value did not change.
	(nve_set): Add arg PK.  Change the caller.
	* agent/findkey.c (agent_write_private_key): Update only if modified.

	scd: New option --debug-allow-pin-logging.
	+ commit e43bd2a7a7831a2d23fb9aa06b913f17dad89478
	* scd/scdaemon.c (oDebugAllowPINLogging): New.
	(opts): Add option.
	(main): Set option.
	* scd/scdaemon.h (opt): Add debug_allow_pin_logging.
	* scd/apdu.c (pcsc_send_apdu): Do not hide the PIN dat in the debug
	output if the option is set.
	(send_apdu_ccid): Ditto.

2023-11-17  NIIBE Yutaka  <gniibe@fsij.org>

	gpg: Report BEGIN_* status before examining the input.
	+ commit 960877b10f42ba664af4fb29130a3ba48141e64a
	* common/miscellaneous.c (is_openpgp_compressed_packet)
	(is_file_compressed): Moved to ...
	* common/iobuf.c: ... in this file.
	(is_file_compressed): Change the argument to INP, the iobuf.
	* common/util.h (is_file_compressed): Remove.
	* common/iobuf.h (is_file_compressed): Add.
	* g10/cipher-aead.c (write_header): Don't call write_status_printf
	here.
	(cipher_filter_aead): Call write_status_printf when called with
	IOBUFCTRL_INIT.
	* g10/cipher-cfb.c (write_header): Don't call write_status_printf
	here.
	(cipher_filter_cfb): Call write_status_printf when called with
	IOBUFCTRL_INIT.
	* g10/encrypt.c (encrypt_simple): Use new is_file_compressed function,
	after call of iobuf_push_filter.
	(encrypt_crypt): Likewise.
	* g10/sign.c (sign_file): Likewise.

2023-11-16  Werner Koch  <wk@gnupg.org>

	scd:p15: Basic support for Starcos 3.2.
	+ commit 5304c9b080b407bcbf8944ccd3ed669a6ab02616
	* scd/app-p15.c (CARD_TYPE_STARCOS_32): New.
	(card_atr_list): Add ATR for my sample card.
	(cardtype2str): Add starcos string.
	(select_ef_by_path): Factor all code out to ...
	(select_by_path): this.  Add arg to request a directory.  Simplify the
	case pathlen>1 case.  Fix error printing.
	(select_df_by_path): New.
	(prepare_verify_pin): For starcos select a DF.
	(app_select_p15): Don't use extended mode for starcos.

	scd: Minor debug output tweak.
	+ commit a33ad8f9bf92d144285769a7d17891c595365fa2
	* scd/apdu.c (send_le): Do not dump "[all zero]" if tehre is no data.
	* scd/iso7816.c (iso7816_select_mf): Cosmetic fix.

2023-11-14  Werner Koch  <wk@gnupg.org>

	gpg,gpgsm: Hide password in debug output also for asked passwords.
	+ commit def8f5f3d28bd5b19fd68e9fbd2eeb1d04c08db1
	* g10/call-agent.c (agent_get_passphrase): Call
	assuan_begin_confidential and assuan_end_confidential.
	* sm/call-agent.c (gpgsm_agent_ask_passphrase): Ditto.

	gpgsm: Re-introduce the bad passphrase hint for pkcs#12.
	+ commit e6cedba11900226caf781d39ab4193d98e2cc0d7
	* sm/minip12.c (parse_bag_encrypted_data): Set the badpass flag.
	(parse_shrouded_key_bag): Ditto.

2023-11-09  NIIBE Yutaka  <gniibe@fsij.org>

	gpg,sm: Set confidential in assuan communication for password.
	+ commit bafa7bf27f7d059708d73abc739dbd4e5f5c5682
	* g10/call-agent.c (default_inq_cb): Call assuan_begin_confidential
	and assuan_end_confidential.
	* sm/call-agent.c (default_inq_cb): Likewise.

2023-11-08  Werner Koch  <wk@gnupg.org>

	gpgsm: Support ECDSA in de-vs mode.
	+ commit 3572b19fbd8f6eea1edcaa8f753a7c9654702bed
	* common/compliance.h (PK_ALGO_FLAG_ECC18): New.
	* common/compliance.c (gnupg_pk_is_allowed): Implement.
	* sm/decrypt.c (gpgsm_decrypt): Pass new flag.
	* sm/sign.c (gpgsm_sign): Ditto.
	* sm/verify.c (gpgsm_verify): Ditto.

	common: Declare two LibrePGP constants for future use.
	+ commit bf7b785b0e471533e5bb2db0e6a2b05b8e17d59d
	* common/openpgpdefs.h (SIGSUBPKT_META_HASH): New.
	(SIGSUBPKT_TRUST_ALIAS): New.

	gpgsm: Cleanup of legacy variable name use.
	+ commit 3a669f175f0d23a845088902e1bca884a525cedb
	* sm/encrypt.c (gpgsm_encrypt): Unify use of RC and ERR.
	* sm/sign.c (gpgsm_sign): ditto.

2023-11-08  NIIBE Yutaka  <gniibe@fsij.org>

	gpg,tools: Handle GPG_ERR_PIN_BLOCKED and GPG_ERR_NO_RESET_CODE.
	+ commit d6f738729f0f4bf83c3a44fc4bba33ea6aaba622
	* g10/card-util.c (write_sc_op_status): Emit 3 and 4 in status line.
	* tools/card-call-scd.c (status_sc_op_failure): Likewise.

	tools:gpg-card: Fix an error code for Reset Code.
	+ commit 4db2e13e2c8c9dd711500c772eedd9a5f7ca6300
	* tools/gpg-card.c (cmd_unblock): Use GPG_ERR_NO_RESET_CODE.

	scd: Return GPG_ERR_PIN_BLOCKED when it's blocked.
	+ commit 4257cbb06c8e091e834e989064612f94aa879239
	* scd/app-openpgp.c (build_enter_admin_pin_prompt): Fix to use
	GPG_ERR_PIN_BLOCKED.
	(check_pin): Likewise.

2023-10-27  Werner Koch  <wk@gnupg.org>

	w32: Use utf8 for the asctimestamp function.
	+ commit 678c81902750a5a40573d708c5e14dad5225121e
	* common/gettime.c (asctimestamp) [W32]: Use ".UTF8" for the locale.

	gpg: Fix minor memory leak during certain smartcard operations.
	+ commit 95b9a31f81e4a56518269d2476b54a1f10fe8b3e
	* g10/keygen.c (card_store_key_with_backup): Fix memory leak on error.

2023-10-26  Werner Koch  <wk@gnupg.org>

	gpg: Allow expiration time after 2038-01-19 on 32 bit Windows.
	+ commit a4fe307b5535ed350fff63941aaa0b19ee2e683a
	* g10/keygen.c (parse_expire_string_with_ct): Use isotime2epoch_u64.
	(parse_creation_string): Ditto.

	common: New functions timegm_u64, isotime2epoch_u64.
	+ commit 164c687cb6a1cafe6c1c47456a1837046a3f00f1
	* common/mischelp.c (timegm): Move to ...
	* common/gettime.c (timegm): here.  On Windows use timegm_u32.
	(timegm_u32): New.
	(isotime2epoch): Factor code out to ...
	(isotime_make_tm): new helper.
	(isotime2epoch_u64): New.
	(_win32_timegm): Remove duplicated code.
	(parse_timestamp): Use of timegm.
	(scan_isodatestr): Fallback to isotime2epoch_u64.

2023-10-24  Werner Koch  <wk@gnupg.org>

	sm: Flag Brainpool curves as compliant for all other operations.
	+ commit 2c3c049fd8a001dc9937e5ac3884831b6e25d2da
	* sm/fingerprint.c (gpgsm_get_key_algo_info2): Rename to
	(gpgsm_get_key_algo_info): this.  Remove the old wrapper.  Adjust all
	callers.
	* sm/decrypt.c (gpgsm_decrypt): Pass the curve to the compliance
	checker.
	* sm/encrypt.c (gpgsm_encrypt): Ditto.
	* sm/sign.c (gpgsm_sign): Ditto.
	* sm/verify.c (gpgsm_verify): Ditto.

	sm: Flag Brainpool curves as compliant.
	+ commit 97708e2ac72253fa1ddbcde63b23095ac2d1604f
	* sm/keylist.c (print_compliance_flags): Add arg curve.
	(list_cert_colon): Pass curve to the compliance check.

	common: Provide API to parse BER/TLV encodings.
	+ commit 4448bc44f0baf913efdc23ac527f5b0fb4a93351
	* sm/minip12.c: Factor parsing code out to ...
	* common/tlv-parser.c: new.  Extend function names and provide a few
	extra functions.
	* common/Makefile.am (common_sources): Add new file.

	* sm/minip12.c: Adjust to use the new parser API.

	sm: Another partly rewrite of minip12.c.
	+ commit 7661d2fbc6eb533016df63a86ec3e35bf00cfb1f
	* sm/minip12.c (struct tlv_ctx_s): Add origbuffer and origbufsize.
	Remove pop_count.  Rename offset to length.
	(dump_tag_info, _dump_tag_info): Rewrite.
	(dump_tlv_ctx, _dump_tlv_ctx): Rewrite.
	(tlv_new): Init origbuffer.
	(_tlv_peek): Add arg ti.
	(tlv_peek): New.
	(tlv_peek_null): New.
	(_tlv_push): Rewrite.
	(_tlv_pop): Rewrite.
	(tlv_next): New macro.  Move old code to ...
	(_tlv_next): this.  Add arg lno.  Pop remaining end tags.
	(tlv_popped): Remove.
	(tlv_expect_object): Handle ndef.
	(tlv_expect_octet_string): Ditto.
	(parse_bag_encrypted_data): Use nesting level to control the inner
	loop.
	(parse_shrouded_key_bag): Likewise.
	(parse_bag_data): Handle surplus octet strings.
	(p12_parse): Ditto.

	* sm/minip12.c (decrypt_block): Strip the padding.
	(tlv_expect_top_sequence): Remove.  Replace callers by
	tlv_expect_sequence.

	* tests/cms/samplekeys/t6752-ov-user-ff.p12: New sample key.
	* tests/cms/samplekeys/Description-p12: Add its description

2023-10-16  Werner Koch  <wk@gnupg.org>

	build: Extend autobuild diagnostics by the username.
	+ commit 956b1e1c26aa1c7b253096af50be3400ace43e4c
	* m4/autobuild.m4 (AB_INIT): Add username.

2023-10-14  Werner Koch  <wk@gnupg.org>

	gpg: Allow to specify seconds since Epoch beyond 2038.
	+ commit 606933dfb48ddd3113bc60eb8b18126112b3b8a4
	* g10/keygen.c (parse_expire_string_with_ct): Use new function
	scan_secondsstr.
	(parse_creation_string): Ditto.

	common: New function scan_secondsstr.
	+ commit a17363e992943244987dbab754b112c77d938b5d
	* common/gettime.c (scan_secondsstr): New.

	* common/t-gettime.c (test_scan_secondsstr):
	(main): Call it.

2023-10-10  Werner Koch  <wk@gnupg.org>

	gpgsm: Improvements for NDEF in the pkcs#12 parser.
	+ commit 5601f5db9862e23140bccc0e603e42164fe02296
	* sm/minip12.c (_tlv_push): Handle NDEF more correctly.
	(tlv_expect_octet_string): Do not bail out on NDEF.
	(dump_tag_info): Print some more infos.

2023-10-06  Werner Koch  <wk@gnupg.org>

	scd:openpgp: Return better error codes for the Reset Code.
	+ commit 4963f13f8fa914acfc9addd5f4f19ff75d983ef5
	* scd/app-openpgp.c (do_change_pin): Use GPG_ERR_BAD_RESET_CODE where
	appropriate.
	* common/util.h: Add error codes missing in gpgrt 1.46.

	* agent/call-pinentry.c (unlock_pinentry): Handle
	GPG_ERR_BAD_RESET_CODE.
	(agent_askpin): Ditlo.  Also simply condition.
	(agent_get_passphrase):  Ditto.
	* g10/call-agent.c (status_sc_op_failure): Handle
	GPG_ERR_BAD_RESET_CODE.
	* g10/card-util.c (write_sc_op_status): Ditto.
	* tools/card-call-scd.c (status_sc_op_failure): Ditto.

	sm: Support more HMAC algos in the pkcs#12 parser.
	+ commit 24b3a5a5794db4bb69b38a1df099d5e59cccf2b3
	* sm/minip12.c (oid_hmacWithSHA1): New.  Also for the SHA-2 algos.
	(digest_algo_from_oid): New.
	(set_key_iv_pbes2): Add arg digest_algo.
	(crypt_block): Ditto.
	(decrypt_block): Ditto.
	(parse_bag_encrypted_data): Parse the optional prf part and get the
	hmac algorithm.
	(parse_shrouded_key_bag): Ditto.
	(p12_build): Pass SHA1 for digest_algo.

	* sm/t-minip12.c (run_one_test): Print failed values in verbose mode.

	* tests/cms/samplekeys/nistp256-openssl-self-signed.p12: New.
	* tests/cms/samplekeys/Description-p12: Add this one.
	* tests/cms/Makefile.am (EXTRA_DIST): Ditto.

2023-10-06  NIIBE Yutaka  <gniibe@fsij.org>

	tests:tpm2dtests: Modify tests with SWTPM and relax the condition.
	+ commit 9353dc811a04cf47f2445bb1e1f0401ea5f3d044
	* configure.ac (SWTPM_IOCTL): Remove.
	(TEST_LIBTSS): Fix the condition.
	* tests/tpm2dtests/Makefile.am (TESTS_ENVIRONMENT): Remove
	SWTPM_IOCTL.
	* tests/tpm2dtests/start_sw_tpm.sh: Add --flags to invoke SWTPM,
	not requiring SWTPM_IOCTL and TSSSTARTUP any more.

	tests:tpm2dtests: Fix tests with SWTPM.
	+ commit 0e200f2187e005d8c52d8efb5ef89e4709eabcc1
	* configure.ac (TEST_LIBTSS): Fix the condition with SWTPM.
	* tests/tpm2dtests/start_sw_tpm.sh: Use --daemon and --pid
	to run SWTPM.

	build: Simplify detecting a TPM emulator.
	+ commit 0494ec8f4d6399336f3202a23144f4afe734aede
	* configure.ac (TPMSERVER): Don't supply hard-coded path.
	(SWTPM, SWTPM_IOCTL, TSSSTARTUP): Likewise.

	tools: Add TPM2DAEMON_SOCK_NAME for --remove-socketdir.
	+ commit e783866f414097e38fb1cf0061005989d11c468b
	* tools/gpgconf.c (main): Care about tpm2d.  Emit correct ERR.

	tests:tpm2dtests: Fix tests with TPM2D.
	+ commit d17efdcd6f755f13c9ff9b7a3127c13496ab7055
	* tests/tpm2dtests/Makefile.am (TESTS_ENVIRONMENT): Fix.
	* tests/tpm2dtests/all-tests.scm: Follow the change of gpgscm.
	* tests/tpm2dtests/run-tests.scm: Likewise.

	tpm2d: Check SWTPM environment variable for swtpm support.
	+ commit 8d0819346db8943b519ea7685569382c56776d15
	* tpm2d/intel-tss.h (TSS_Create): Check SWTPM.

	agent: fix tpm2d keytotpm handling.
	+ commit 9909f622f69e2b5775099931406dce2d35011281
	* agent/divert-tpm2.c (agent_write_tpm2_shadow_key): Call
	agent_delete_key before agent_write_private_key.  Recover
	from an error.

	agent: Initialize FP for the case of error return.
