aboutsummaryrefslogtreecommitdiffstats
path: root/agent/genkey.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2024-07-09 00:39:15 +0000
committerNIIBE Yutaka <[email protected]>2024-07-09 01:04:16 +0000
commit953dd67368ceaeb8b42cfb8f9b5f3c4de8afdbe0 (patch)
tree34861697c585e95c970fd6955ea749867efcb6ec /agent/genkey.c
parentspeedo: Set PREFIX for bzip2 build also for Unix. (diff)
downloadgnupg-953dd67368ceaeb8b42cfb8f9b5f3c4de8afdbe0.tar.gz
gnupg-953dd67368ceaeb8b42cfb8f9b5f3c4de8afdbe0.zip
Use gpgrt_process_spawn API from libgpg-error.
* 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]>
Diffstat (limited to 'agent/genkey.c')
-rw-r--r--agent/genkey.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/agent/genkey.c b/agent/genkey.c
index 9a8b3c2aa..0fb94350d 100644
--- a/agent/genkey.c
+++ b/agent/genkey.c
@@ -27,7 +27,6 @@
#include "agent.h"
#include "../common/i18n.h"
-#include "../common/exechelp.h"
#include "../common/sysutils.h"
@@ -162,7 +161,7 @@ do_check_passphrase_pattern (ctrl_t ctrl, const char *pw, unsigned int flags)
const char *pgmname = gnupg_module_name (GNUPG_MODULE_NAME_CHECK_PATTERN);
estream_t stream_to_check_pattern = NULL;
const char *argv[10];
- gnupg_process_t proc;
+ gpgrt_process_t proc;
int result, i;
const char *pattern;
char *patternfname;
@@ -205,15 +204,15 @@ do_check_passphrase_pattern (ctrl_t ctrl, const char *pw, unsigned int flags)
argv[i] = NULL;
log_assert (i < sizeof argv);
- if (gnupg_process_spawn (pgmname, argv,
- GNUPG_PROCESS_STDIN_PIPE,
+ if (gpgrt_process_spawn (pgmname, argv,
+ GPGRT_PROCESS_STDIN_PIPE,
NULL, &proc))
result = 1; /* Execute error - assume password should no be used. */
else
{
int status;
- gnupg_process_get_streams (proc, 0, &stream_to_check_pattern,
+ gpgrt_process_get_streams (proc, 0, &stream_to_check_pattern,
NULL, NULL);
es_set_binary (stream_to_check_pattern);
@@ -226,13 +225,13 @@ do_check_passphrase_pattern (ctrl_t ctrl, const char *pw, unsigned int flags)
else
es_fflush (stream_to_check_pattern);
es_fclose (stream_to_check_pattern);
- gnupg_process_wait (proc, 1);
- gnupg_process_ctl (proc, GNUPG_PROCESS_GET_EXIT_ID, &status);
+ gpgrt_process_wait (proc, 1);
+ gpgrt_process_ctl (proc, GPGRT_PROCESS_GET_EXIT_ID, &status);
if (status)
result = 1; /* Helper returned an error - probably a match. */
else
result = 0; /* Success; i.e. no match. */
- gnupg_process_release (proc);
+ gpgrt_process_release (proc);
}
xfree (patternfname);