summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* po: Update parts of the Polish translationJakub Bogusz2024-01-151-256/+139
| | | | | | | | -- Jakub provided the translation in October but at this time it did cleanly apply anymore due to string changes. Thus only parts of his changes are here. -wk
* gpgsm: Allow parsing of PKCS#12 files with two private keys.Werner Koch2024-01-154-91/+133
| | | | | | | | | | | | | | | | | | * 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. -- Take care: We allow parsing of a second private key but we are not yet able to import the second private key. The whole things is required to at least import the certificates of current pkcs#12 files as created by the German Elster tax system. No test data, sorry.
* gpgsm: Improve the status line for --verify errors.Werner Koch2024-01-151-1/+6
| | | | | | | * sm/verify.c (gpgsm_verify): Improve verify.leave status line. -- Suggested-by: Jakob Bohm
* po: Fix indentation for key generation optionsMario Haustein2024-01-1520-101/+101
| | | | --
* Prepare the NEWSWerner Koch2024-01-121-2/+93
| | | | --
* speedo: Add install target for Unix.Werner Koch2024-01-122-13/+65
| | | | | | | | * build-aux/speedo.mk: Default to SELFCHECK=0. (install, install-speedo): New targets. -- GnuPG-bug-id: 6710
* speedo: Patch ELF binaries to use built librariesWerner Koch2024-01-127-216/+66
| | | | | | | | * build-aux/speedo.mk: Remove GUI stuff. Add patchelf feature. * Makefile.am (speedo): New target. -- GnuPG-bug-id: 6710
* gpg: Improve error message for expired default keys.Werner Koch2024-01-111-4/+22
| | | | | | | * g10/getkey.c (parse_def_secret_key): Track reason for skipping keys. -- GnuPG-bug-id: 4704
* doc: Document the gpgconf --unlock command.Werner Koch2024-01-112-5/+16
| | | | | | | * tools/gpgconf.c (main): Fix usage message. -- GnuPG-bug-id: 6838
* gpg: Fix regression in the Revoker keyword of the parmeter file.Werner Koch2024-01-112-4/+5
| | | | | | | | | | * g10/keygen.c (parse_revocation_key): Actually allow for v4 fingerprints. -- Note that the use of the parameter file is deprecated. GnuPG-bug-id: 6923
* gpg: Allow to create revocations even with non-compliant algos.Werner Koch2024-01-101-5/+7
| | | | | | | | | | * g10/sign.c (do_sign): Skip compliance check for revocation certs. -- It just does not make sense to inhibit the creation of revocations depending on the compliance mode. We do this only for key revocation but not for another kind of revocation because the rationale for uid or subkey revocation is more complicated to explain.
* scd:p15: Allow signing for CVISION cardsWerner Koch2024-01-101-4/+81
| | | | | | | | | | | * scd/app-p15.c (do_sign): Add code for Starcos 3.2 and the CVISION product. -- The code for the Starcos cards has been implemented according to the 3.52 manual However, this does not work with my test cards. Protocol analysis shows that decryption can be used for the cryptovision product. Thus we do it the same for now.
* g13: New option --no-mount.Werner Koch2024-01-098-43/+76
| | | | | | | | | | | | | | | | | | | | | * 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. -- This option can be used to decrypt a device but not to mount it. For example to run fsck first. A command or option to run fsck before a mount will eventually be added. The use of findmnt is needed so that we can easily remove a device which has not been mounted.
* gpg: Print a useful error id SKI algo 253 is found.Werner Koch2024-01-091-1/+10
| | | | | | | | * g10/parse-packet.c (parse_key): Detect the SKI algo 253. -- As long as we have not yet implemented this we should at least be able to detect this case.
* scd:p15: Allow PIN verification and decryption for CVISION cards.Werner Koch2024-01-091-15/+55
| | | | | | | | | | | | | | | | * 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. -- To check the verification run gpg-card verify User_PIN For our test cards the "Benutzer-PIN" must be given. For decryption tests gpgsm can be used; --always-trust helps to avoid chain issues.
* gpgconf: Adjust -X command for the new VERSION file formatWerner Koch2024-01-091-10/+38
| | | | | | | | * tools/gpgconf.c (show_version_gnupg): Read and parse the entire VERSION file. -- GnuPG-bug-id: 6918
* common,w32: Remove duplicated backslashes when setting the homedir.Werner Koch2024-01-092-0/+30
| | | | | | | | | | | | * common/homedir.c (copy_dir_with_fixup) [W32]: Fold double backslashes. -- This is in general no problem but when we hash or compare the directory to test whether tit is the standard home directory, we may use a different socket file and thus a second instance of a daemon. GnuPG-bug-id: 6833
* gpg: Improve error return for --quick-add-subkey and -add-adsk.Werner Koch2024-01-051-2/+8
| | | | | | | | * g10/keyedit.c (keyedit_quick_addkey): Emit a ERROR status line. (keyedit_quick_addadsk): Ditto. -- GnuPG-bug-id: 6880
* scd: Add support for SCE 7.0Werner Koch2024-01-044-6/+109
| | | | | | | | | | | | | | | | | * 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. -- The test cards I have are rsa2048 with X.509 certificates. I don't have the entire chain but loading the certificates work. For testing I created an OpenPGP key from the keys and tested signing and decryption. GnuPG-bug-id: 6919
* gpg: Choose key from inserted card over a non-inserted cardWerner Koch2024-01-022-3/+17
| | | | | | | | | * 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. -- GnuPG-bug-id: 6831
* gpg: Don't call keybox_compress when KEYDB_RESOURCE_FLAG_READONLY.NIIBE Yutaka2023-12-291-12/+14
| | | | | | | | | | * g10/keydb.c (keydb_add_resource): Check the FLAGS to call keybox_compress. -- GnuPG-bug-id: 6811 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* tools: Fix argparse table of gpgconf.NIIBE Yutaka2023-12-251-35/+37
| | | | | | | | | * tools/gpgconf.c (opts): Use ARGPARSE macros. -- GnuPG-bug-id: 6902 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* doc: Explain why socket activation is a problemWerner Koch2023-12-221-0/+30
| | | | --
* common: Add keyword socketdir to gpgconf.ctlWerner Koch2023-12-223-55/+118
| | | | | | | | | | | * 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.
* scd:openpgp: Add the length check for new PIN.NIIBE Yutaka2023-12-221-16/+32
| | | | | | | | | | * scd/app-openpgp.c (do_change_pin): Make sure new PIN length is longer than MINLEN. -- GnuPG-bug-id: 6843 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* tools: Remove the dotlock tool.NIIBE Yutaka2023-12-212-122/+1
| | | | | | | | | | | * tools/Makefile.am (libexec_PROGRAMS): Remove dotlock. * tools/dotlock.c: Remove. -- It's integrated into gpgconf (--lock/--unlock). Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* scd:p15: Add a diagnostic for unsupported DTRUST4 features.Werner Koch2023-12-201-1/+4
| | | | * scd/app-p15.c (do_sign): Add a diagnostic.
* scd:p15: Add support for D-Trust Card 4.1/4.4Mario Haustein via Gnupg-devel2023-12-201-9/+71
| | | | | | | | | * 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.4Mario Haustein via Gnupg-devel2023-12-201-2/+8
| | | | * scd/app-p15.c (CARD_TYPE_CARDOS_54): New.
* doc: Explain what to put into mailcap for gpg-wks-client.Werner Koch2023-12-201-0/+15
| | | | --
* tools: Integrate the dotlock tool into gpgconf.NIIBE Yutaka2023-12-201-1/+69
| | | | | | | | | * tools/gpgconf.c (dotlock_tool): New. (main): Add --lock and --unlock commands. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* common: Add dotlock util under libexec.NIIBE Yutaka2023-12-202-31/+65
| | | | | | | | | * tools/Makefile.am (libexec_PROGRAMS): Add dotlock. * tools/dotlock.c: Finish the first implementation. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* common: Clean up the temporary file at dotlock_destroy.NIIBE Yutaka2023-12-201-0/+6
| | | | | | | | | * common/dotlock.c (dotlock_destroy): Clean up the temporary file created when it fails. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* common: Support not-removing the lockfile by dotlock_destroy.NIIBE Yutaka2023-12-201-1/+4
| | | | | | | | | * common/dotlock.c (dotlock_destroy): Keep the lock when DOTLOCK_LOCK_BY_PARENT. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* common: Fix a possible resource leak for dotlock.NIIBE Yutaka2023-12-201-2/+5
| | | | | | | | | * common/dotlock.c (dotlock_destroy_unix): Don't release ->TNAME here. (dotlock_destroy): Release the memory unconditionally. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* common: Improve the parsing of gpgconf.ctl variables.Werner Koch2023-12-191-30/+27
| | | | | | | | * common/homedir.c (unix_rootdir): Simplify. -- This also relaxes the syntax in that the equal sign may now be surrounded by any number of spaces.
* common: Enhance dotlock, so that we can have a CLI util.NIIBE Yutaka2023-12-192-11/+138
| | | | | | | | | | | | | | | | * 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. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* kbx: Create public-keys.d, after creating the homedir.NIIBE Yutaka2023-12-192-0/+88
| | | | | | | | | * kbx/keyboxd.c (create_directories): Following the behavior of gpg-agent, call create_public_keys_directory after mkdir. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* keyboxd: Pass lock info back to gpg and gpgsm.Werner Koch2023-12-183-9/+48
| | | | | | | | | | | | | | | * 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. -- GnuPG-bug-id: 6838
* keyboxd: Timeout on failure to get the database lock.Werner Koch2023-12-181-15/+53
| | | | | | | | | | | | | | * 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. -- Note that we need to delay the initalization to the first use of the database so that we actually have a recipient for the status messages. GnuPG-bug-id: 6838
* common: Add an info callback to dotlock.Werner Koch2023-12-183-11/+203
| | | | | | | | | | | | | * 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.
* common: Improve error return for dotlock.Werner Koch2023-12-121-2/+8
| | | | | | * common/dotlock.c (dotlock_take_unix): Return a ETIMEDOUT insteaad of EACCESS on timeout. (dotlock_take_w32): Ditto.
* doc: Fix description of scdaemon for --disable-ccid.NIIBE Yutaka2023-12-121-10/+8
| | | | | | | -- GnuPG-bug-id: 6871 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* po: Fix quotes in Polish Translation.Ahelenia Ziemiańska2023-12-071-395/+395
| | | | | | -- Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
* po: Update Portuguese Translation.Daniel Cerqueira2023-11-302-5767/+3530
| | | | | | | | | | -- This commit log (with no ChangeLog entry) is written by gniibe, following the practice; Translation update don't need a ChangeLog entry in a commit log. Signed-off-by: Daniel Cerqueira <dan.git@brilhante.top>
* gpgsm: Set validity flag in keylisting to n for untrusted root cert.Werner Koch2023-11-271-0/+2
| | | | | | | | * sm/keylist.c (list_cert_colon): Map not_trusted to 'n' for non-root certs like we do for root certs. -- GnuPG-bug-id: 6841
* scd:openpgp: Fallback to default ECDH params in writekey.Werner Koch2023-11-231-3/+5
| | | | | | | | | | | | * scd/app-openpgp.c (ecc_writekey): Use default ECDH parameters and remove the now useless check. -- This seems to be better than bailing out. In almost all cases our standard parameters are used and if not, well, the fingerprint will be wrong. GnuPG-bug-id: 6378
* agent: Update the key file only if changed (slight return).Werner Koch2023-11-211-12/+52
| | | | | | | | | | * 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. -- GnuPG-bug-id: 6829
* common: Check wether to set the modified flag in nve_set.Werner Koch2023-11-211-22/+8
| | | | | * common/name-value.c (nvc_set): Factor code out to ... (nve_set): here.
* agent: Update the key file only if not changed.Werner Koch2023-11-213-9/+56
| | | | | | | | | | | | | | | | | | | | * 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. -- This helps software which uses a file system watcher to track changes to private keys. In particular smartcard triggered changes are a problem for such software because this may at worst trigger another smartcard read. GnuPG-bug-id: 6829