aboutsummaryrefslogtreecommitdiffstats
path: root/tools (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpgtar: Fix releasing PROC correctly.NIIBE Yutaka5 days2-3/+3
| | | | | | | | | | | * tools/gpgtar-extract.c (gpgtar_extract): Initialize PROC as NULL, and release at the end for the case of jumping to "leave:" label. * tools/gpgtar-list.c (gpgtar_list): Release at the end. -- Fixes-commit: 29bc14f56f6430294f225b6744012ab1f5df62e6 Signed-off-by: NIIBE Yutaka <[email protected]>
* Release 2.5.7gnupg-2.5.7Werner Koch5 days1-1/+1
|
* wks: Use templates for the server responses.Werner Koch5 days5-65/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/helpfile.c (gnupg_get_template): Add arg locale_override and adjust all callers. * tools/wks-receive.c (struct receive_ctx_s): Add field ct_language. (get_language): New. (new_part): Call it. (wks_receive): Pass language to the result callback. * tools/gpg-wks-client.c (short_locale): New. (main): Get and store the current locale. (command_create): Fix a glitch for the Posteo hack. Insert the locale into the confirmation request. (send_confirmation_response): Ditto. * tools/gpg-wks-server.c (struct server_ctx_s): Add field language. (only_ascii): New. (struct my_subst_vars_s, my_subst_vars_cb, my_subst_vars): New. (send_confirmation_request): Use a template. (send_congratulation_message): Ditto. (check_and_publish): Pss ctx to send_congratulation_message. (command_receive_cb): Add arg language. * doc/wks-utils.txt, doc/wks-utils.de.txt: New. * doc/Makefile.am (helpfiles): Add them. -- GnuPG-bug-id: 7381 Note that the subject is not yet translated or templated due to a missing header encoding function.
* gpg-mail-tube: Support templates.Werner Koch8 days1-4/+44
| | | | | | | | | | | | | * tools/gpg-mail-tube.c: Include i18n.h. (main): Call i18n.h (only_ascii): New. (mail_tube_encrypt): Use a template or fallback to the old version. * doc/mail-tube.txt, doc/mail-tube.de.txt: Two standard templates. * doc/Makefile.am (helpfiles): Add them. -- GnuPG-bug-id: 7381
* tools: Add a quoted-printable encoding function.Werner Koch8 days4-2/+227
| | | | | | | * tools/mime-maker.c (mime_maker_qp_encode): New. * tools/t-mime-maker.c: New. * tools/Makefile.am (TESTS): New. (module_tests): Add the first test.
* gpgtar: Fix regression exhibited by make checkWerner Koch8 days2-2/+2
| | | | | | | | | | | | | | | | | | | * tools/gpgtar-extract.c (gpgtar_extract): Do final process_release. * tools/gpgtar-list.c (gpgtar_list): Ditto. -- Fixes-commit: 29bc14f56f6430294f225b6744012ab1f5df62e6 Running "make -C tests/openpgp check verbose=3" failed with Creating configuration files Executing: '/home/wk/b/gnupg/tools/gpgtar' '--extract' \ '--directory=.' \ '/tmp/gpgscm-20250530T121329-run-tests-vGAT4R/environment-cache' make: *** [Makefile:998: xcheck] Terminated for unknown reasons. Not calling the gpgrt_process_release fixes this regression. The real cause needs to be investigated.
* gpgsm,tests,tools: Fix memory leaks.NIIBE Yutaka11 days3-0/+3
| | | | | | | | | | | | | * sm/minip12.c (p12_parse): Fix creating new TLV with old TLV. * sm/t-minip12.c (one_file): Release RESULT. * tests/gpgscm/ffi.c (do_process_wait): Call gpgrt_process_release. * tools/gpgconf-comp.c (retrieve_options_from_program): Release PARGS. * tools/gpgtar-extract.c (gpgtar_extract): Release PROC on leave. * tools/gpgtar-list.c (gpgtar_list): Release PROC on leave. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* gpgconf: Show also stuff from the Registry emulation.Werner Koch2025-04-091-6/+84
| | | | | | * tools/gpgconf.c (my_read_reg_string): New. Use it for the registry listing stuff. (show_registry_entries_from_file): Use also on Unix.
* 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
* card: Add command "ll"Werner Koch2025-03-101-10/+20
| | | | | | | | | | | | * tools/gpg-card.c (cmd_list): Add optional ar use_opt_cards. (enum cmdids): Add cmdLISTCARDS. (cmds): New command "ll". (interactive_loop): Ditto. -- Using "l --cards" is a command required very often thus it makes sense to have an alias for it. ll also allows to switch the card without showing the long listing.
* tools: Add envvar GPG_AUTHCODE_SIGN_MODE to disable signing.Werner Koch2025-02-241-0/+4
| | | | * tools/gpg-authcode-sign.sh: Check envvar for value "disable".
* tools: Some tweaks to gpg-authcode-sign.shWerner Koch2025-01-091-0/+11
| | | | | | | | | | * tools/gpg-authcode-sign.sh: Skip too short files and rename certain files to ".dll". -- osslsigncode requires file suffixes of exe or dll but not dll-x or dll-ex which we use in our gpg4win build system. This adds workarounds for this and for short dummy files.
* gpgconf: Include a minimal secure version in the --query-swdb output.Werner Koch2024-11-151-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.
* 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.
* 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.
* gpgtar: Use log-file from common.conf only in --batch mode.Werner Koch2024-11-071-2/+5
| | | | | | | | * tools/gpgtar.c (main): Do it. -- This makes the interactive use of gpgtar more convenient and is more aligned to what gpg and gpgsm do.
* gpgconf: Add list flag to trusted-key et al.Werner Koch2024-10-011-3/+3
| | | | | | | | * tools/gpgconf-comp.c (known_options_gpg): Add list flag to sume options. -- GnuPG-bug-id: 7313
* tools: Fix recent regressions in gpg-authcode-sign.shWerner Koch2024-09-111-2/+2
| | | | | * tools/gpg-authcode-sign.sh (cleanup): Fix syntax error. (trap): Remove bashism.
* gpgsm: New option --assert-signerWerner Koch2024-09-111-1/+0
| | | | | | | | | | | | | | | * sm/gpgsm.c (oAssertSigner, oNoop): New. (opts): Add option --assert-signer. (assert_signer_true): New var. (main): Set new option. (gpgsm_exit): Handle assert_signer_true. * sm/gpgsm.h (opt): Add field assert_signer_list. * sm/verify.c (is_x509_fingerprint): New. (check_assert_signer_list): New. (gpgsm_verify): Handle option. -- GnuPG-bug-id: 7286
* 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.
* gpg-mail-tube: New feature --as-attach.Werner Koch2024-08-291-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.
* tools: Improve rfc822parse to allow access to headers for longer.Werner Koch2024-08-291-17/+25
| | | | | | | | | | | | | | | | | | | | | | | * tools/rfc822parse.c (struct rfc822parse_context): Add field this_part. (release_handle_data): Clear this_part. (rfc822parse_open): Set this_part. (set_current_part_to_parent): Ditto. (insert_header): Ditto. (rfc822parse_enum_header_lines): Replace current_part by this_part. (find_header): Ditto. * tools/rfc822parse.c (my_strcasecmp): Remove. (same_header_name): New. (rfc822_capitalize_header_name): Use new function instead. -- With this change the header function can now be sued after the transition to the body. Thus up until thenext MIME block is reached the headers of the former MIME block are returned. This also fixes a problem with the "MIME-Version" header name capitalization.
* tools: Fix bashishmWerner Koch2024-08-161-6/+7
| | | | | | -- Fixes-commit: 536fc8d33db571108459493d1881cdfc8371d3cc
* build-aux: Add PKCS#8 authenticode key supportAndre Heinecke2024-08-151-2/+13
| | | | | | | | | | * tools/gpg-authcode-sign.sh: Assume PKCS#8 if the key file does not end with .p12 or .pfx. -- Since using encrypted PKCS#12 containers with askpass is unpractical when signing many files. This adds support to use an PKCS#8 key for codesigning.
* build-aux: Add cleanup to gpg-authcode-sign.shAndre Heinecke2024-08-151-0/+10
| | | | | | | | | | | | | * tools/gpg-authcode-sign.sh (cleanup): New. -- When using osslsigncode it does not delete the output file on error. Errors or cancels there can happen easily with either timestamp problems or a wrong password. Additionally, if an output file exists, osslsigncode does not write a good error message but shows some exception.
* gpg-mail-tube: Make sure GNUPGHOME is set in vsd mode.Werner Koch2024-07-311-5/+46
| | | | | | * tools/gpg-mail-tube.c (main): Set GNUPGGHOME. (start_gpg_encrypt): Improve the "statrt gpg" diagnostic. (prepare_for_appimage): Start with cleared GNUPGHOME.
* tools: Avoid memory leaks.Jakub Jelen2024-07-222-1/+2
| | | | | | | | | | * tools/gpg-auth.c (ssh_authorized_keys): Free list on error. * tools/gpgtar-extract.c (gpgtar_extract): Free memory on error. -- GnuPG-bug-id: 7201 Signed-off-by: Jakub Jelen <[email protected]>
* Use gpgrt_process_spawn API from libgpg-error.NIIBE Yutaka2024-07-099-127/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/genkey.c (do_check_passphrase_pattern): Use the gpgrt API. * common/asshelp.c (start_new_service): Ditto. * common/exechelp.h: Remove gnupg_process_spawn API. * common/exechelp-posix.c: Remove gnupg_process_spawn implementation. * common/exechelp-w32.c: Likewise. * common/exectool.c (gnupg_exec_tool_stream): Use the gpgrt API. * common/t-exechelp.c (test_pipe_stream): Remove. * dirmngr/ldap-wrapper.c (destroy_wrapper, ldap_reaper_thread): Use the gpgrt API. (ldap_wrapper_connection_cleanup, ldap_wrapper): Ditto. * dirmngr/ldap.c, g10/call-keyboxd.c: No need to include exechelp.h. * g10/photoid.c (run_with_pipe, show_photo): Use the gpgrt API. * g13/be-encfs.c (run_umount_helper, run_encfs_tool): Ditto. * g13/g13.c, g13/mount.c, g13/runner.c: No need to include exechelp.h. * scd/apdu.c: No need to include exechelp.h. * scd/app.c (report_change): Use the gpgrt API. * sm/export.c, sm/import.c: No need to include exechelp.h. * tests/gpgscm/ffi.c (proc_object_finalize, proc_wrap) (do_process_spawn_io, do_process_spawn_fd, do_process_wait): Use the gpgrt API. * tools/gpg-auth.c: No need to include exechelp.h. * tools/gpg-card.c (cmd_gpg): Use the gpgrt API. * tools/gpg-connect-agent.c: No need to include exechelp.h. * tools/gpg-mail-tube.c (mail_tube_encrypt, prepare_for_appimage) (start_gpg_encrypt): Use the gpgrt API. * tools/gpgconf-comp.c (gpg_agent_runtime_change) (scdaemon_runtime_change, tpm2daemon_runtime_change) (dirmngr_runtime_change, keyboxd_runtime_change) (gc_component_launch, gc_component_check_options) (retrieve_options_from_program): Ditto. * tools/gpgconf.c (show_versions_via_dirmngr): Ditto. * tools/gpgtar-create.c (gpgtar_create): Ditto. * tools/gpgtar-extract.c (gpgtar_extract): Ditto. * tools/gpgtar-list.c (gpgtar_list): Ditto. -- GnuPG-bug-id: 7192 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpgconf: Fix error in --show-versions due to recent spawn changes.Werner Koch2024-07-051-3/+6
| | | | | * tools/gpgconf.c (show_versions_via_dirmngr): Fail only on exitcode!=0.
* gpgconf: Print the full commit id.Werner Koch2024-07-041-1/+1
| | | | | | | * autogen.sh: Update to version 2024-07-04 from libgpg-error. * configure.ac (BUILD_REVISION): Rename the ac_define by BUILD_COMMITID. * tools/gpgconf.c (show_version_gnupg): Use it here.
* gpgconf: Allow listing of some new optionsWerner Koch2024-07-011-0/+3
| | | | | | | | -- Also one old option. GnuPG-bug-id: 6882
* gpg-mail-tube: New utility.Werner Koch2024-06-282-1/+832
| | | | | * tools/gpg-mail-tube.c: new. * tools/Makefile.am: Add it.
* tools: New support functions for the mail parser.Werner Koch2024-06-286-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.
* tools: Make gpg-authcode-sign.sh more robust on network errors.Werner Koch2024-06-111-3/+18
| | | | | | | | * tools/gpg-authcode-sign.sh: Return on HTTP status 500 -- We have seen timestamping failures after signing some file using GlobalSign certs.
* indent: Fix spellingDaniel Kahn Gillmor2024-05-319-18/+18
| | | | | | | | | | | | | -- These are non-substantive corrections for minor spelling mistakes within the GnuPG codebase. With something like this applied to the codebase, and a judiciously tuned spellchecker integrated as part of a standard test suite, it should be possible to keep a uniform orthography within the project. GnuPG-bug-id: 7116
* spawn: Remove spawn callback, introduce gnupg_spawn_actions.NIIBE Yutaka2024-05-316-25/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/exechelp-posix.c (call_spawn_cb): Remove. (gnupg_spawn_actions_new, gnupg_spawn_actions_release) (gnupg_spawn_actions_set_environ, gnupg_spawn_actions_set_atfork) (gnupg_spawn_actions_set_redirect) (gnupg_spawn_actions_set_inherit_fds): New. (my_exec, spawn_detached): Use spawn actions. (gnupg_spawn_helper): Remove. (gnupg_process_spawn): Remove callback, introduce gnupg_spawn_actions. * common/exechelp-w32.c: Ditto. * common/exechelp.h: Ditto. * agent/genkey.c (do_check_passphrase_pattern): Follow the change of gnupg_process_spawn API. * common/asshelp.c (start_new_service): Likewise. * common/exectool.c (gnupg_exec_tool_stream): Likewise. * common/t-exechelp.c (test_pipe_stream): Likewise. * dirmngr/ldap-wrapper.c (ldap_wrapper): Likewise. * g10/photoid.c (run_with_pipe): Likewise. * scd/app.c (report_change): Likewise. * tests/gpgscm/ffi.c (do_process_spawn_io, do_process_spawn_fd): Likewise. * tools/gpg-card.c (cmd_gpg): Likewise. * tools/gpgconf-comp.c (gpg_agent_runtime_change): Likewise. (scdaemon_runtime_change, tpm2daemon_runtime_change) (dirmngr_runtime_change, keyboxd_runtime_change) (gc_component_launch, gc_component_check_options) (retrieve_options_from_program): Likewise. * tools/gpgconf.c (show_versions_via_dirmngr): Likewise. * tools/gpgtar-create.c (gpgtar_create): Likewise. * tools/gpgtar-extract.c (gpgtar_extract): Likewise. * tools/gpgtar-list.c (gpgtar_list): Likewise. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg-auth: Fix use after free.Jakub Jelen2024-05-281-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
* wks: Make sure that ERR is always initialized.Werner Koch2024-05-281-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]>
* tools: Fix help output for gpg-authcode-sign.shWerner Koch2024-05-221-2/+2
| | | | --
* Merge branch 'STABLE-BRANCH-2-4' into masterWerner Koch2024-05-163-64/+104
|\ | | | | | | | | | | | | | | | | | | -- Fixed conflicts in: NEWS g10/call-agent.c g10/options.h kbx/kbxutil.c tools/gpgconf.c
| * 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.
* | scd:piv: Support listing of retired keys with KEYINFO.Werner Koch2024-05-061-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | * scd/app-piv.c (data_objects): Mark returned key as having a keypair. (do_with_keygrip): Check against encrusage and not used one tag. * tools/gpg-card.c (piv_keyref_is_retired): New. (list_all_kinfo): Pretty print retired keys. -- This allows to list all existing retired keys without using separate readkey commands.
* | speedo: Use gpg-authcode-sign.sh and change archive label to v2.5.Werner Koch2024-04-251-1/+1
| | | | | | | | --
* | Install the new gpg-authcode-sign.sh script.Werner Koch2024-04-252-0/+258
| | | | | | | | | | | | | | | | | | | | * tools/gpg-authcode-sign.sh: New. * tools/Makefile.am (bin_SCRIPTS): Add that tool. -- This script makes use of gpg anyway and thus it is best to have it also installed with the gpg version used to cross-build our software. The script was orginally developed for gpg4win.
* | Remove the deprecated gcry_set_log_handler.Werner Koch2024-04-231-8/+0
| | | | | | | | | | | | | | | | * common/miscellaneous.c (my_gcry_logger): Remove. (setup_libgcrypt_logging): Do not call the deprecated gcry_set_log_handler. * kbx/kbxutil.c (my_gcry_logger): Remove. * tools/no-libgcrypt.c (gcry_set_log_handler): Remove stub.
* | Allow installation with a gpgconf.ctl changed homedir.Werner Koch2024-03-211-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/homedir.c (gpgconf_ctl): Add field "gnupg". (parse_gpgconf_ctl): Support keyword "gnupg". (my_gnupg_dirname): New. (my_fixed_default_homedir): New. (gnupg_registry_dir): New. (standard_homedir): Use my_gnupg_dirname and my_fixed_default_homedir. (default_homedir): Use gnupg_registry_dir and my_fixed_default_homedir. (_gnupg_socketdir_internal): Use my_gnupg_dirname. Increase size of prefixbuffer. (gnupg_sysconfdir): Use my_gnupg_dirname. * tools/gpgconf.c (list_dirs): Use gnupg_registry_dir. (show_other_registry_entries): Ditto. -- This will be useful to install versions of GnuPG VS-Desktop and GnuPG Desktop in addition to a standard GnuPG version. Only basic tests on Unix done; Windows testing is still outstanding. GnuPG-bug-id: 7040