aboutsummaryrefslogtreecommitdiffstats
path: root/tools (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-03-17gpgconf: Fix reload and kill of keyboxd.Werner Koch1-4/+4
* tools/gpgconf-comp.c (keyboxd_runtime_change): Fix order of args. -- Fixes-commit: acaeba2dbdb9bbd68a823c671d5c3577fef5d26d GnuPG-bug-id: 7569
2024-11-18gpgconf: Include a minimal secure version in the --query-swdb output.Werner Koch1-2/+7
* tools/gpgconf.c (query_swdb): Parse the new minver tag.
2024-11-12gpg-mail-tube: Fix content type for an attached non-plaintext.Werner Koch1-2/+3
* tools/gpg-mail-tube.c (mail_tube_encrypt): Fix content type for an attached message. -- We can't use message/rfc822 if we encrypt this message as a simple PGP file.
2024-11-08gpgconf: Add list flag to trusted-key et al.Werner Koch1-3/+3
* tools/gpgconf-comp.c (known_options_gpg): Add list flag to sume options. -- GnuPG-bug-id: 7313
2024-11-07gpg-mail-type: Assume text/plain for missing content-type.Werner Koch1-10/+14
* tools/gpg-mail-tube.c (mail_tube_encrypt): Rename var ct_text for clarity. Replace debug diagnostic by log_info. Assume text/plain for missing content-type. -- Without this fix we would create message/rfc822 attachment instead of a text/plain attachment with the encrypted body.
2024-11-07gpg-mail-tube: New feature --as-attach.Werner Koch1-16/+76
* tools/gpg-mail-tube.c (oAsAttach): NEw. (opts): Add --as-attach. (opt): Add .as_attach. (parse_arguments): Set it. (mail_tube_encrypt): Detect plain text and hhandle new option.
2024-11-07gpgtar: Make sure to create upper directories for regular files.Werner Koch1-29/+72
* tools/gpgtar-extract.c (extract_directory): Factor parent directory creation out to .. (try_mkdir_p): new. (extract_regular): Create directory on ENOENT. * g10/pubkey-enc.c (get_it): Use log_info instead of log_error if the public key was not found for preference checking. -- If tarball was created with tar cf tarball file1.txt foo/file2.txt the tarball has no entry for foo/ and thus the extraction fails. This patch fixes this. GnuPG-bug-id: 7380 The second patch avoid a wrong exist status status line due to the use of log_error. But the actual cause needs stuill needs tobe investigated.
2024-09-03gpgconf: Add missing linefeed to the -X output.Werner Koch1-1/+11
* tools/gpgconf.c (show_registry_entries_from_file): Add missing LF.
2024-07-01gpgconf: Allow listing of some new optionsWerner Koch1-0/+3
-- Also one old option. GnuPG-bug-id: 6882 (cherry picked from commit df977729ff3879fdeab7bce339b95ee3fd8ecc42)
2024-07-01gpg-mail-tube: New utility.Werner Koch2-1/+800
* tools/gpg-mail-tube.c: New. * tools/Makefile.am: Add it. -- Backported-from-master: 28a080bc9f9478f63a7edffa420512eaed3555ff We had to use the old spawn interface from gnupg-2.4 here.
2024-07-01tools: New support functions for the mail parser.Werner Koch6-6/+58
* tools/rfc822parse.h (RFC822PARSE_HEADER_SEEN): New. * tools/rfc822parse.c (rfc822_cmp_header_name): New. (insert_header): Run header seen callback. (rfc822parse_last_header_line): New. (rfc822_free): New. * tools/wks-receive.c (t2body): Use it here. * tools/mime-parser.c (parse_message_cb): and here. --- Backported-from-master: 675b12ddd8ca742314d96a02bc95b837841070fb
2024-05-29gpg-auth: Fix use after free.Jakub Jelen1-1/+1
* tools/gpg-auth.c (ssh_authorized_keys): Move free after printing error message. -- Signed-off-by: Jakub Jelen <[email protected]> This is part of GnuPG-bug-id: 7129 (cherry picked from commit 9adaa79ab43e2f87178b8ee5ab1a353cba384606)
2024-05-29wks: Make sure that ERR is always initialized.Werner Koch1-0/+1
* tools/wks-util.c (install_key_from_spec_file): Initialize ERR in case the loop is never run. -- This is part of GnuPG-bug-id: 7129 Co-authored-by: Jakub Jelen <[email protected]> (cherry picked from commit 021c27510b52f86a95ae70b5f4ed5d2c3886c3e8)
2024-05-16card: Fix compiler warning.Werner Koch1-3/+3
* tools/gpg-card.h (opt): Make gpg_program, gpgsm_program, and agent_program const.
2024-04-04gpgconf: Change layout of the gpgconf -X output.Werner Koch1-52/+71
* tools/gpgconf.c (list_dirs): Change the config mode output. (my_copy_file): Adjust output for org-mode style. (show_configs_one_file): Ditto. (show_other_registry_entries): Ditto. (show_registry_entries_from_file): Ditto. (show_configs): Ditto.
2024-03-18gpgconf: Check readability of some files with -XWerner Koch1-8/+29
* tools/gpgconf.c (list_dirs): Rename arg from special to show_config_mode. Add "S.Uiserver" test and test existsing files for readability.
2024-03-13gpg-check-pattern: Consider an empty pattern file as validWerner Koch1-1/+1
* tools/gpg-check-pattern.c (read_file): Check length before calling fread. -- The problem with an empty file is that es_fread is called to read one element of length zero which seems to be undefined behaviour and results in ENOENT on my test box.
2024-03-06doc: Typo fix in commentWerner Koch1-1/+1
--
2024-03-06wks: Make gpg-wks-client --mirror work w/o args.Werner Koch1-1/+1
* tools/gpg-wks-client.c (mirror_one_key): Test for no domain specified. -- The code did not really work if no domain was given. It worked but filtered out all keys so that no key was actually exported.
2024-03-04wks: Add option --realclean to gpg-wks-client.Werner Koch4-4/+12
* 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. -- The default for gpg-wks-client is to install keys with all valid key signatures. The new option will eventually allow to install the keys only with key signatures done by trusted-keys. Also the export-option is in gpg, it requires one more gpg patch to make it actually work.
2024-02-27Allow tilde expansion for the foo-program options.Werner Koch5-18/+32
* 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. -- GnuPG-bug-id: 7017
2024-02-21wks: Allow command style args for gpg-wks-client.Werner Koch1-11/+19
* tools/gpg-wks-client.c (wrong_args): Take two args. Change all callers. (main): Pass ARGPARSE_FLAG_COMMAND for recent gpgrt version. -- This requires gpgrt 1.48. Of course "gpg-wks-client --create ..." continues to work.
2024-01-29doc: Fix spelling errors found by lintian.Werner Koch2-2/+2
-- Reported-by: Andreas Metzler <[email protected]>
2024-01-25card: Tweak the checkcmds sub-command.Werner Koch1-5/+8
* tools/gpg-card.c (cmd_checkkeys): Skip not found keys.
2024-01-24card: flush stdout to get checkcmd's info messages in order.Werner Koch1-0/+1
* tools/gpg-card.c (cmd_checkkeys): Insert an fflush.
2024-01-22card: New subcommand "checkkeys".Werner Koch3-6/+226
* 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. -- GnuPG-bug-id: 6943
2024-01-11doc: Document the gpgconf --unlock command.Werner Koch1-4/+4
* tools/gpgconf.c (main): Fix usage message. -- GnuPG-bug-id: 6838
2024-01-09gpgconf: Adjust -X command for the new VERSION file formatWerner Koch1-10/+38
* tools/gpgconf.c (show_version_gnupg): Read and parse the entire VERSION file. -- GnuPG-bug-id: 6918
2023-12-25tools: Fix argparse table of gpgconf.NIIBE Yutaka1-35/+37
* tools/gpgconf.c (opts): Use ARGPARSE macros. -- GnuPG-bug-id: 6902 Signed-off-by: NIIBE Yutaka <[email protected]>
2023-12-21tools: Remove the dotlock tool.NIIBE Yutaka2-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 <[email protected]>
2023-12-20tools: Integrate the dotlock tool into gpgconf.NIIBE Yutaka1-1/+69
* tools/gpgconf.c (dotlock_tool): New. (main): Add --lock and --unlock commands. -- Signed-off-by: NIIBE Yutaka <[email protected]>
2023-12-20common: Add dotlock util under libexec.NIIBE Yutaka2-31/+65
* tools/Makefile.am (libexec_PROGRAMS): Add dotlock. * tools/dotlock.c: Finish the first implementation. -- Signed-off-by: NIIBE Yutaka <[email protected]>
2023-12-19kbx: Create public-keys.d, after creating the homedir.NIIBE Yutaka1-0/+87
* kbx/keyboxd.c (create_directories): Following the behavior of gpg-agent, call create_public_keys_directory after mkdir. -- Signed-off-by: NIIBE Yutaka <[email protected]>
2023-11-08gpg,tools: Handle GPG_ERR_PIN_BLOCKED and GPG_ERR_NO_RESET_CODE.NIIBE Yutaka1-0/+6
* 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. -- Cherry-pick from master commit of: 64f5f7b74e428b15205f6e8ae14dec84663c3076 GnuPG-bug-id: 6425 Signed-off-by: NIIBE Yutaka <[email protected]>
2023-11-08tools:gpg-card: Fix an error code for Reset Code.NIIBE Yutaka1-1/+1
* tools/gpg-card.c (cmd_unblock): Use GPG_ERR_NO_RESET_CODE. -- Cherry-pick from master commit of: 65607fb81def5fc55320a1abfbb8ebdad9512011 GnuPG-bug-id: 6425 Signed-off-by: NIIBE Yutaka <[email protected]>
2023-10-06scd:openpgp: Return better error codes for the Reset Code.Werner Koch1-0/+1
* 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.
2023-10-06tools: Add TPM2DAEMON_SOCK_NAME for --remove-socketdir.NIIBE Yutaka1-3/+7
* tools/gpgconf.c (main): Care about tpm2d. Emit correct ERR. -- Cherry-picked from master commit of: 25c84ffd1078e6619761aa731a82dbaf4175c02e Signed-off-by: NIIBE Yutaka <[email protected]>
2023-10-05gpg-card: Give a hint on how to get help for the "yubikey" command.Werner Koch1-0/+2
* tools/card-yubikey.c (yubikey_commands): Print a hint.
2023-06-21wks: Make --add-revocs the default.Werner Koch1-3/+10
* tools/gpg-wks-client.c (opt): New option --no-add-revocs. (main): Make --add-revocs the default. (command_send): Rename to ... (command_create): to match the command name.
2023-06-21wks: Use export-clean for --mirror and --create.Werner Koch1-1/+1
* tools/wks-util.c (wks_get_key): Change from export-minimal to export-clean -- To properly work with tusted introducers et al. it is important to also upload valid key signatures to the Web Key Directory.
2023-06-20delete redundant characterszhangguangzhi1-1/+1
-- GnuPG-bug-id: 6482 Signed-off-by: zhangguangzhi <[email protected]>
2023-06-15gpgtar: New option --no-compress.Werner Koch3-0/+6
* tools/gpgtar.c: Add option --no-compress. * tools/gpgtar.h (opt): Add field no_compress. * tools/gpgtar-create.c (gpgtar_create): Pass -z0 to gpg. -- This option is probably easier to remember than --gpg-args '-z0'.
2023-05-24w32: Add missing manifests and set a requestedExecutionLevel.Werner Koch7-6/+53
* agent/gpg-agent.w32-manifest.in: New. * dirmngr/dirmngr-client-w32info.rc: New. * dirmngr/dirmngr-client.w32-manifest.in: New. * dirmngr/dirmngr-w32info.rc: New. * dirmngr/dirmngr.w32-manifest.in: New. * dirmngr/dirmngr_ldap-w32info.rc: New. * dirmngr/dirmngr_ldap.w32-manifest.in: New. * g10/gpgv-w32info.rc: New. * g10/gpgv.w32-manifest.in: New. * kbx/keyboxd.w32-manifest.in: New. * scd/scdaemon.w32-manifest.in: New. * sm/gpgsm.w32-manifest.in: New. -- This avoids the use of the VirtualStore uner Windows. GnuPG-bug-id: 6503
2023-05-19gpgtar: Emit FAILURE status line.Werner Koch1-0/+10
* tools/gpgtar.c (main): Write status line before exit. -- Due to the new way we support gpgtar in GPGME we need status lines to detect a final error. GnuPG-bug-id: 6497
2023-04-18gpgtar: Read common.conf for the log-file option.Werner Koch1-1/+17
* common/util.h (GNUPG_MODULE_NAME_GPGTAR): New. * common/homedir.c (gnupg_module_name): Add it. * tools/gpgtar.c: Include comopt.h. (enum cmd_and_opt_values): Add oDebug. (opts): Add --debug. (any_debug): New. (main): Parse common.conf. -- Having a way to see the output of gpgtar is often useful for debugging. The only effect of the debug option is to show whether common.conf was read.
2023-03-15gpgtar: Do not allow the use of stdout for --status-fdWerner Koch1-2/+6
* tools/gpgtar.c (main): Don't allow logging via the Registry. Forbid using stdout for status-fd in crypt mode. -- Without that check a status output would be mixed up with the input to the internal call of gpg. Using the Registry key to enable logging is very annoying.
2023-03-15gpgtar: Print a result status with skiupped files.Werner Koch2-10/+58
* tools/gpgtar.h (struct tarinfo_s): Add new fields. * tools/gpgtar-extract.c (check_suspicious_name): Add arg info. (extract_regular): Count files. (gpgtar_extract): Print stats.
2023-02-28gpgconf: Print some standard envvars with -XWerner Koch1-0/+10
* tools/gpgconf.c (show_configs): Add a list of envvars and print them. -- Note that for simplicity we to not distinguish between Windows and Linux here.
2023-02-08tools: Return a better error message if sendmail is not usable.Werner Koch1-0/+7
* tools/send-mail.c: Include unistd.h (run_sendmail): Check for bad sendmail. -- GnuPG-bug-id: 6321
2023-01-30gpgtar: Fix new --status-fd handling.Werner Koch1-1/+1
-- Fixes-commit: f84264e8acf742793c73ce78491cab61fac37051