aboutsummaryrefslogtreecommitdiffstats
path: root/g10/photoid.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpg: Minor fix when building with --disable-execWerner Koch2024-08-191-1/+0
| | | | | | | * g10/photoid.c (show_photo): No return for a void function. -- GnuPG-bug-id: 7256
* Use gpgrt_process_spawn API from libgpg-error.NIIBE Yutaka2024-07-091-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]>
* spawn: Remove spawn callback, introduce gnupg_spawn_actions.NIIBE Yutaka2024-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]>
* Merge branch 'STABLE-BRANCH-2-4' into masterWerner Koch2023-07-041-6/+12
|\
| * gpg: Make progress work for large files on Windows.Werner Koch2023-06-131-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/iobuf.c (iobuf_get_filelength): Change return type to uint64_t and remove the overflow args. For Windows always use GetFileSizeEx which is available since the long EOL-ed Windows XP. * g10/sign.c (write_plaintext_packet): Adjust for changed iobuf_get_filelength. * g10/encrypt.c (encrypt_simple, encrypt_crypt): Ditto. * g10/photoid.c (generate_photo_id): Ditto. Also add an upper limit. * g10/filter.h (progress_filter_context_t): Change amount values to use uint64_t. * g10/progress.c (write_status_progress): Change accordingly. -- GnuPG-bug-id: 6534
* | gpg,w32: Add comment about debug output of ShellExecuteEx.NIIBE Yutaka2023-06-261-2/+9
| | | | | | | | | | | | | | | | | | | | * g10/photoid.c (w32_system): Add comment about hInstApp, why we use the integer value of possibly smaller size for the debug output. -- GnuPG-bug-id: 6508 Signed-off-by: NIIBE Yutaka <[email protected]>
* | w32: Remove support of Windows 95/98/Me.NIIBE Yutaka2023-05-161-13/+1
| | | | | | | | | | | | | | | | * g10/photoid.c (VER_PLATFORM_WIN32_WINDOWS): Remove fallback definition. (get_default_photo_command): Remove use of "start /w" for Windows 95. Signed-off-by: NIIBE Yutaka <[email protected]>
* | common,agent,gpg,dirmngr,g13,scd,tests,tools: New spawn function.NIIBE Yutaka2023-05-111-22/+20
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/exechelp-posix.c (do_exec, gnupg_spawn_process): Remove. (check_syscall_func, pre_syscall, post_syscall) : New. (do_create_socketpair, posix_open_null, call_spawn_cb): New. (my_exec, spawn_detached, gnupg_spawn_helper): New. (gnupg_process_spawn, process_kill, gnupg_process_terminate): New. (gnupg_process_get_fds, gnupg_process_get_streams): New. (process_vctl, gnupg_process_ctl): New. (gnupg_process_wait, gnupg_process_release): New. (gnupg_process_wait_list): New. * common/exechelp-w32.c: Add definition of _WIN32_WINNT as 0x600. (check_syscall_func, pre_syscall, post_syscall): New. (gnupg_spawn_process): Remove. (check_windows_version): New. (spawn_detached, gnupg_spawn_helper, gnupg_process_spawn): New. (gnupg_process_get_fds, gnupg_process_get_streams): New. (process_kill, process_vctl, gnupg_process_ctl): New. (gnupg_process_wait, gnupg_process_terminate): New. (gnupg_process_release, gnupg_process_wait_list): New. * common/exechelp.h: Re-write for new API. * common/exectool.c (gnupg_exec_tool_stream): Follow the change. * common/asshelp.c (start_new_service): Likewise. * agent/genkey.c (do_check_passphrase_pattern): Likewise. * dirmngr/ldap-wrapper.c (struct wrapper_context_s): Use PROC. (destroy_wrapper): Follow the change of API. (read_log_data): Follow the change of API, use printable_pid. (ldap_reaper_thread, ldap_wrapper_release_context): Likewise. (ldap_wrapper_connection_cleanup, ldap_wrapper): Likewise. * g10/photoid.c (run_with_pipe): Follow the change of API. (show_photo): Likewise. * g13/be-encfs.c (run_umount_helper): Likewise. (run_encfs_tool): Likewise. * g13/g13.c: Add including ./common/exechelp.h. * g13/mount.c: Likewise. * g13/runner.c: Follow the change of API. * g13/runner.h: Follow the change of API. * scd/app.c (setup_env): New. (report_change): Follow the change of API. * tests/gpgscm/ffi.c (proc_object_finalize): New. (proc_object_to_string): New. (proc_wrap, proc_unwrap): New. (do_spawn_process): Remove. (do_process_spawn): New. (setup_std_fds): New. (do_spawn_process_fd): Remove. (do_process_spawn_fd): New. (do_wait_process): Remove. (do_process_wait): New. (do_wait_processes): Remove. * tests/gpgscm/t-child.scm: Follow the change of API. * tests/gpgscm/tests.scm: Likewise. * tests/openpgp/defs.scm: Likewise. * tests/tpm2dtests/defs.scm: Likewise. * tools/gpg-card.c: Likewise. * tools/gpgconf-comp.c: Likewise. * tools/gpgconf.c: Likewise. * tools/gpgtar-create.c: Likewise. * tools/gpgtar-extract.c: Likewise. * tools/gpgtar-list.c: Likewise. -- GnuPG-bug-id: 6275 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Move w32_system function.NIIBE Yutaka2022-11-091-1/+108
| | | | | | | | | | * g10/exec.h (w32_system): Not exposed. * g10/exec.c (w32_system): Move to ... * g10/photoid.c: here. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Keep temp files when opening images via xdg-openNicolas Fella via Gnupg-devel2021-03-011-1/+5
| | | | | | | | | | | | | * g10/photoid.c (get_default_photo_command): Change parameter for xdg-open. -- xdg-open spawns the user's preferred image viewer and then exits. Therefore we must not remove the temp file when it exits, otherwise by the time the actual image viewer is started the file doesn't exist any more. Signed-off-by: Nicolas Fella <[email protected]>
* gpg: Allow setting notations with the empty string as value.Werner Koch2020-11-021-0/+5
| | | | | | | | | | | | | | | * g10/misc.c (pct_expando): Catch special case of the empty string. Also map a NULL to the empty string. * g10/photoid.c (show_photos): Make an empty string used as command fail. -- This patch also fixes a segv when calling gpg wrongly like gpg -N \[email protected] GnuPG-bug-id: 5117 Signed-off-by: Werner Koch <[email protected]>
* Replace most of the remaining stdio calls by estream calls.Werner Koch2020-10-201-3/+3
| | | | | | | | | | | | -- We need to use es_fopen on Windows to cope with non-ascii file names. This is quite a large but fortunately straightforward change. At a very few places we keep using stdio (for example due to the use of popen). GnuPG-bug-id: 5098 Signed-off-by: Werner Koch <[email protected]>
* Merge branch 'switch-to-gpgk' into masterWerner Koch2019-09-271-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | -- Resolved Conflicts: * common/asshelp.c: Keep the new code in master for spawing under Windows. * g10/Makefile.am: Keep all new file. * g10/photoid.c: Pass CTRL to pct_expando. Signed-off-by: Werner Koch <[email protected]>
| * gpg: New option --use-keyboxd.Werner Koch2019-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/gpg.c (oUseKeyboxd,oKeyboxdProgram): New consts. (opts): New options --use-keyboxd and --keyboxd-program. (main): Implement them. * g10/keydb.c: Move some defs out to ... * g10/keydb-private.h: new file. * g10/keydb.c: prefix function names with "internal" and move original functions to ... * g10/call-keyboxd.c: new file. Divert to the internal fucntion if --use-keyboxd is used. Add a CTRL arg to most fucntions and change all callers. * g10/Makefile.am (common_source): Add new files. (noinst_PROGRAMS): Do bot build gpgcompose. -- Note that this is just the framework with only a basic implementation of searching via keyboxd. Signed-off-by: Werner Koch <[email protected]>
* | gpg: photoid: Use standard spawn API.NIIBE Yutaka2019-07-251-460/+229
| | | | | | | | | | | | | | | | | | | | | | | | * g10/photoid.c (exec_write, exec_read, exec_finish): Remove. (setup_input_file): Rename from make_tempdir. (expand_args): Drop support of 'o' and 'O'. (fill_command_argv, run_with_pipe, create_temp_file) New. (show_photo): New with gnupg_spawn_process_fd and gnupg_wait_process. (show_photos): Call show_photo. GnuPG-bug-id: 4362 Signed-off-by: NIIBE Yutaka <[email protected]>
* | gpg: photoid: Move functions from exec.c.NIIBE Yutaka2019-07-251-0/+546
| | | | | | | | | | | | | | | | | | | | | | * g10/exec.c (w32_system): Expose to public. (exec_write, exec_read, exec_finish, make_tempdir, expand_args): Move to photoid.c. * g10/exec.h: Likewise. * g10/photoid.c (exec_write, exec_read, exec_finish, make_tempdir) (expand_args): Move here. Signed-off-by: NIIBE Yutaka <[email protected]>
* | gpg: A little clean up.NIIBE Yutaka2019-07-231-2/+3
|/ | | | | | | | * g10/keyserver.c: Don't include exec.h. * g10/photoid.c (image_type_to_string): It's constant. * g10/photoid.h (image_type_to_string): Likewise. Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Improve the photo image viewer selection.Werner Koch2019-05-171-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | * g10/exec.c (w32_system): Add "!ShellExecute" special. * g10/photoid.c (get_default_photo_command): Use the new ShellExecute under Windows and fallbac to 'display' and 'xdg-open' in the Unix case. (show_photos): Flush stdout so that the output is shown before the image pops up. -- For Unix this basically syncs the code with what we have in gpg 1.4. Note that xdg-open may not be used when running as root which we support here. For Windows we now use ShellExecute as this seems to be preferred over "cmd /c start"; however this does not solve the actual problem we had in the bug report. To solve that problem we resort to a wait parameter which defaults to 400ms. This works on my Windows-10 virtualized test box. If we can figure out which simple viewers are commonly installed on Windows we should enhance this patch to test for them. GnuPG-bug-id: 4334 Signed-off-by: Werner Koch <[email protected]>
* Remove -I option to common.NIIBE Yutaka2017-03-071-5/+5
| | | | | | | | | | | | | * dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Avoid gratuitously loading a keyblock when it is already availableNeal H. Walfield2016-11-231-1/+1
| | | | | | | | | | | * g10/trust.c (get_validity): Add new, optional parameter KB. Only load the keyblock if KB is NULL. Update callers. (get_validity): Likewise. * g10/trustdb.c (tdb_get_validity_core): Likewise. -- Signed-off-by: Neal H. Walfield <[email protected]> GnuPG-bug-id: 2812
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-051-1/+1
| | | | --
* gpg: Pass CTRL object down to the trust functionsWerner Koch2016-05-211-6/+7
| | | | Signed-off-by: Werner Koch <[email protected]>
* gpg: New %U expando for the photo viewer.Werner Koch2014-04-171-0/+2
| | | | | | | | | * g10/photoid.c (show_photos): Set namehash. * g10/misc.c (pct_expando): Add "%U" expando. -- This makes is possible to extract all photos ids from a key to different files.
* w32: Include winsock2.h to silence warnings.Werner Koch2014-03-071-0/+3
|
* gpg: Cleanup compiler warnings due to some configure options.Werner Koch2014-02-101-2/+7
| | | | | | | * g10/photoid.c (show_photos) [DISABLE_PHOTO_VIEWER]: Mark args as unused. * tools/gpgconf-comp.c (my_dgettext): Mark DOMAIN as unused if NLS is not configured.
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-2/+2
| | | | | | | | | | | | | | | | | | | The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
* Merge fix for issue 1331 from 1.4.David Shaw2011-12-151-3/+2
| | | | | * photoid.c (generate_photo_id): Check for the JPEG magic numbers instead of JFIF since some programs generate an EXIF header first.
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-2/+2
| | | | | | | | We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
* Exporting secret keys via gpg-agent is now basically supported.Werner Koch2010-10-011-1/+1
| | | | | | A couple of forward ported changes. Doc updates.
* Decryption and signi via agent is now implemented.Werner Koch2010-04-231-13/+9
|
* Use gpg_err_set_errno to assign values to ERRNO.Werner Koch2010-04-011-1/+1
|
* Various changes to eventually support openpgp keys in pgp-agent.Werner Koch2010-02-021-1/+1
| | | | | | Comment fixes. Minor chnages in preparation of a W32CE port.
* Fix bug#1122.Werner Koch2009-09-031-1/+2
| | | | | | Note that msgmerge 0.17 is completely broken as it always prepends a fuzzy null entry to all po files.
* * main.h, mainproc.c (check_sig_and_print), keylist.cDavid Shaw2008-10-031-4/+9
| | | | | | | | | (list_keyblock_print), pkclist.c (do_edit_ownertrust), keyedit.c (menu_showphoto), photoid.c (generate_photo_id, show_photos), misc.c (pct_expando): Add %v and %V expandos so that displaying photo IDs can show the attribute validity tag (%v) and string (%V). Originally by Daniel Gillmor.
* Changed to GPLv3.Werner Koch2007-07-041-4/+2
| | | | | Removed intl/.
* Merged with gpg 1.4.3 code. Werner Koch2006-04-191-34/+73
| | | | | The gpg part does not yet build.
* Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch2003-09-231-2/+2
|
* Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch2003-06-181-12/+12
| | | | | | | | | | | to libgcrypt functions, using shared error codes from libgpg-error, replacing the old functions we used to have in ../util by those in ../jnlib and ../common, renaming the malloc functions and a couple of types. Note, that not all changes are listed below becuause they are too similar and done at far too many places. As of today the code builds using the current libgcrypt from CVS but it is very unlikely that it actually works.
* This commit was manufactured by cvs2svn to create branchRepo Admin2003-06-051-0/+333
| | | | 'GNUPG-1-9-BRANCH'.
* This commit was manufactured by cvs2svn to create branchRepo Admin2002-10-191-332/+0
| | | | 'GNUPG-1-9-BRANCH'.
* Cleanups and minor fixes.Werner Koch2002-09-101-2/+3
|
* Forgot to commit this:Werner Koch2002-07-241-1/+1
| | | | | | * photoid.c (get_default_photo_command): Also use __MINGW32__ instead of HAVE_DOSISH_SYSTEM.
* * photoid.c (get_default_photo_command, show_photos): HonorDavid Shaw2002-07-041-0/+8
| | | | | | | | | | | | | | | | | FIXED_PHOTO_VIEWER and DISABLE_PHOTO_VIEWER. * mainproc.c (check_sig_and_print): Use --show-photos to show photos when verifying a sig made by a key with a photo. * keyserver.c (parse_keyserver_uri): Properly parse a URI with no :port section and an empty file path, but with a terminating '/'. (keyserver_work): Honor DISABLE_KEYSERVER_HELPERS. * hkp.c (hkp_ask_import): Display keyserver URI as a URI, but only if verbose. * exec.c, g10.c: USE_EXEC_PATH -> FIXED_EXEC_PATH
* * packet.h, build-packet.c (build_attribute_subpkt), exec.c (expand_args),David Shaw2002-07-011-1/+1
| | | | | | mkdtemp.c (mkdtemp), photoid.c (parse_image_header): Fix some signedness compiler warnings.
* * photoid.c: Use __MINGW32__ to include windows becauseWerner Koch2002-06-301-2/+5
| | | | | | HAVE_DOSISH_SYSTEM is also set for OS/2 and plain DOS. Provide constant missing in older mingw installations.
* Update head to match stable 1.0David Shaw2002-06-291-0/+320