aboutsummaryrefslogtreecommitdiffstats
path: root/tools (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpgconf: Fix reload and kill of keyboxd.Werner Koch2025-03-171-4/+4
| | | | | | | | * tools/gpgconf-comp.c (keyboxd_runtime_change): Fix order of args. -- Fixes-commit: acaeba2dbdb9bbd68a823c671d5c3577fef5d26d GnuPG-bug-id: 7569
* gpgconf: Include a minimal secure version in the --query-swdb output.Werner Koch2024-11-181-2/+7
| | | | * tools/gpgconf.c (query_swdb): Parse the new minver tag.
* gpg-mail-tube: Fix content type for an attached non-plaintext.Werner Koch2024-11-121-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.
* gpgconf: Add list flag to trusted-key et al.Werner Koch2024-11-081-3/+3
| | | | | | | | * tools/gpgconf-comp.c (known_options_gpg): Add list flag to sume options. -- GnuPG-bug-id: 7313
* gpg-mail-type: Assume text/plain for missing content-type.Werner Koch2024-11-071-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.
* gpg-mail-tube: New feature --as-attach.Werner Koch2024-11-071-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.
* gpgtar: Make sure to create upper directories for regular files.Werner Koch2024-11-071-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.
* gpgconf: Add missing linefeed to the -X output.Werner Koch2024-09-031-1/+11
| | | | * tools/gpgconf.c (show_registry_entries_from_file): Add missing LF.
* gpgconf: Allow listing of some new optionsWerner Koch2024-07-011-0/+3
| | | | | | | | | -- Also one old option. GnuPG-bug-id: 6882 (cherry picked from commit df977729ff3879fdeab7bce339b95ee3fd8ecc42)
* gpg-mail-tube: New utility.Werner Koch2024-07-012-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.
* tools: New support functions for the mail parser.Werner Koch2024-07-016-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
* gpg-auth: Fix use after free.Jakub Jelen2024-05-291-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)
* wks: Make sure that ERR is always initialized.Werner Koch2024-05-291-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)
* card: Fix compiler warning.Werner Koch2024-05-161-3/+3
| | | | | * tools/gpg-card.h (opt): Make gpg_program, gpgsm_program, and agent_program const.
* gpgconf: Change layout of the gpgconf -X output.Werner Koch2024-04-041-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.
* gpgconf: Check readability of some files with -XWerner Koch2024-03-181-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.
* gpg-check-pattern: Consider an empty pattern file as validWerner Koch2024-03-131-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.
* doc: Typo fix in commentWerner Koch2024-03-061-1/+1
| | | | --
* wks: Make gpg-wks-client --mirror work w/o args.Werner Koch2024-03-061-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.
* wks: Add option --realclean to gpg-wks-client.Werner Koch2024-03-044-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.
* Allow tilde expansion for the foo-program options.Werner Koch2024-02-275-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
* wks: Allow command style args for gpg-wks-client.Werner Koch2024-02-211-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.
* doc: Fix spelling errors found by lintian.Werner Koch2024-01-292-2/+2
| | | | | | -- Reported-by: Andreas Metzler <[email protected]>
* card: Tweak the checkcmds sub-command.Werner Koch2024-01-251-5/+8
| | | | * tools/gpg-card.c (cmd_checkkeys): Skip not found keys.
* card: flush stdout to get checkcmd's info messages in order.Werner Koch2024-01-241-0/+1
| | | | * tools/gpg-card.c (cmd_checkkeys): Insert an fflush.
* card: New subcommand "checkkeys".Werner Koch2024-01-223-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
* doc: Document the gpgconf --unlock command.Werner Koch2024-01-111-4/+4
| | | | | | | * tools/gpgconf.c (main): Fix usage message. -- GnuPG-bug-id: 6838
* 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
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* kbx: Create public-keys.d, after creating the homedir.NIIBE Yutaka2023-12-191-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]>
* gpg,tools: Handle GPG_ERR_PIN_BLOCKED and GPG_ERR_NO_RESET_CODE.NIIBE Yutaka2023-11-081-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]>
* tools:gpg-card: Fix an error code for Reset Code.NIIBE Yutaka2023-11-081-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]>
* scd:openpgp: Return better error codes for the Reset Code.Werner Koch2023-10-061-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.
* tools: Add TPM2DAEMON_SOCK_NAME for --remove-socketdir.NIIBE Yutaka2023-10-061-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]>
* gpg-card: Give a hint on how to get help for the "yubikey" command.Werner Koch2023-10-051-0/+2
| | | | * tools/card-yubikey.c (yubikey_commands): Print a hint.
* wks: Make --add-revocs the default.Werner Koch2023-06-211-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.
* wks: Use export-clean for --mirror and --create.Werner Koch2023-06-211-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.
* delete redundant characterszhangguangzhi2023-06-201-1/+1
| | | | | | | -- GnuPG-bug-id: 6482 Signed-off-by: zhangguangzhi <[email protected]>
* gpgtar: New option --no-compress.Werner Koch2023-06-153-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'.
* w32: Add missing manifests and set a requestedExecutionLevel.Werner Koch2023-05-247-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
* gpgtar: Emit FAILURE status line.Werner Koch2023-05-191-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
* gpgtar: Read common.conf for the log-file option.Werner Koch2023-04-181-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.
* gpgtar: Do not allow the use of stdout for --status-fdWerner Koch2023-03-151-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.
* gpgtar: Print a result status with skiupped files.Werner Koch2023-03-152-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.
* gpgconf: Print some standard envvars with -XWerner Koch2023-02-281-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.
* tools: Return a better error message if sendmail is not usable.Werner Koch2023-02-081-0/+7
| | | | | | | | * tools/send-mail.c: Include unistd.h (run_sendmail): Check for bad sendmail. -- GnuPG-bug-id: 6321
* gpgtar: Fix new --status-fd handling.Werner Koch2023-01-301-1/+1
| | | | | | -- Fixes-commit: f84264e8acf742793c73ce78491cab61fac37051