aboutsummaryrefslogtreecommitdiffstats
path: root/tools (unfollow)
Commit message (Collapse)AuthorFilesLines
8 daysgpgtar: Fix releasing PROC correctly.NIIBE Yutaka2-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]>
8 daysRelease 2.5.7gnupg-2.5.7Werner Koch1-1/+1
8 dayswks: Use templates for the server responses.Werner Koch5-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.
11 daysgpg-mail-tube: Support templates.Werner Koch1-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
11 daystools: Add a quoted-printable encoding function.Werner Koch4-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.
11 daysgpgtar: Fix regression exhibited by make checkWerner Koch2-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.
14 daysgpgsm,tests,tools: Fix memory leaks.NIIBE Yutaka3-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]>
2025-04-09gpgconf: Show also stuff from the Registry emulation.Werner Koch1-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.
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
2025-03-10card: Add command "ll"Werner Koch1-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.
2025-02-24tools: Add envvar GPG_AUTHCODE_SIGN_MODE to disable signing.Werner Koch1-0/+4
* tools/gpg-authcode-sign.sh: Check envvar for value "disable".
2025-01-09tools: Some tweaks to gpg-authcode-sign.shWerner Koch1-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.
2024-11-15gpgconf: 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-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-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-07gpgtar: Use log-file from common.conf only in --batch mode.Werner Koch1-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.
2024-10-01gpgconf: 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-09-11tools: Fix recent regressions in gpg-authcode-sign.shWerner Koch1-2/+2
* tools/gpg-authcode-sign.sh (cleanup): Fix syntax error. (trap): Remove bashism.
2024-09-11gpgsm: New option --assert-signerWerner Koch1-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
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-08-29gpg-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-08-29tools: Improve rfc822parse to allow access to headers for longer.Werner Koch1-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.
2024-08-16tools: Fix bashishmWerner Koch1-6/+7
-- Fixes-commit: 536fc8d33db571108459493d1881cdfc8371d3cc
2024-08-15build-aux: Add PKCS#8 authenticode key supportAndre Heinecke1-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.
2024-08-15build-aux: Add cleanup to gpg-authcode-sign.shAndre Heinecke1-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.
2024-07-31gpg-mail-tube: Make sure GNUPGHOME is set in vsd mode.Werner Koch1-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.
2024-07-22tools: Avoid memory leaks.Jakub Jelen2-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]>
2024-07-09Use gpgrt_process_spawn API from libgpg-error.NIIBE Yutaka9-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]>
2024-07-05gpgconf: Fix error in --show-versions due to recent spawn changes.Werner Koch1-3/+6
* tools/gpgconf.c (show_versions_via_dirmngr): Fail only on exitcode!=0.
2024-07-04gpgconf: Print the full commit id.Werner Koch1-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.
2024-07-01gpgconf: Allow listing of some new optionsWerner Koch1-0/+3
-- Also one old option. GnuPG-bug-id: 6882
2024-06-28gpg-mail-tube: New utility.Werner Koch2-1/+832
* tools/gpg-mail-tube.c: new. * tools/Makefile.am: Add it.
2024-06-28tools: 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.
2024-06-11tools: Make gpg-authcode-sign.sh more robust on network errors.Werner Koch1-3/+18
* tools/gpg-authcode-sign.sh: Return on HTTP status 500 -- We have seen timestamping failures after signing some file using GlobalSign certs.
2024-05-31indent: Fix spellingDaniel Kahn Gillmor9-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
2024-05-31spawn: Remove spawn callback, introduce gnupg_spawn_actions.NIIBE Yutaka6-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]>
2024-05-28gpg-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
2024-05-28wks: 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]>
2024-05-22tools: Fix help output for gpg-authcode-sign.shWerner Koch1-2/+2
--
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-05-06scd:piv: Support listing of retired keys with KEYINFO.Werner Koch1-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.
2024-04-25speedo: Use gpg-authcode-sign.sh and change archive label to v2.5.Werner Koch1-1/+1
--
2024-04-25Install the new gpg-authcode-sign.sh script.Werner Koch2-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.
2024-04-23Remove the deprecated gcry_set_log_handler.Werner Koch1-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.
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-21Allow installation with a gpgconf.ctl changed homedir.Werner Koch1-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
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-12card: Use xstrdup for module names.Werner Koch1-2/+2
--