1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* verify.c (gpgsm_verify): Implemented non-detached signature

verification.  Add OUT_FP arg, initialize a writer and changed all
callers.
* server.c (cmd_verify): Pass an out_fp if one has been set.
This commit is contained in:
Werner Koch 2001-12-20 16:51:06 +00:00
parent b65e1cf90a
commit 3b8cf6e497
5 changed files with 59 additions and 17 deletions

View file

@ -262,12 +262,24 @@ cmd_verify (ASSUAN_CONTEXT ctx, char *line)
int rc;
CTRL ctrl = assuan_get_pointer (ctx);
int fd = assuan_get_input_fd (ctx);
int out_fd = assuan_get_output_fd (ctx);
FILE *out_fp = NULL;
if (fd == -1)
return set_error (No_Input, NULL);
if (out_fd != -1)
{
out_fp = fdopen ( dup(out_fd), "w");
if (!out_fp)
return set_error (General_Error, "fdopen() failed");
}
rc = gpgsm_verify (assuan_get_pointer (ctx), fd,
ctrl->server_local->message_fd);
ctrl->server_local->message_fd, out_fp);
if (out_fp)
fclose (out_fp);
if (!rc)
{
/* close and reset the fd */