mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Use Assuan socket wrapper calls.
Made socket servers secure under Windows.
This commit is contained in:
parent
a6b11ea482
commit
31c19d1d68
46 changed files with 464 additions and 260 deletions
|
@ -29,7 +29,7 @@
|
|||
#include "i18n.h"
|
||||
#include "../common/util.h"
|
||||
#include "../common/asshelp.h"
|
||||
|
||||
#include "../common/sysutils.h"
|
||||
|
||||
|
||||
/* Constants to identify the commands and options. */
|
||||
|
@ -244,7 +244,7 @@ do_sendfd (assuan_context_t ctx, char *line)
|
|||
log_error ("file `%s' opened in \"%s\" mode, fd=%d\n",
|
||||
name, mode, fd);
|
||||
|
||||
rc = assuan_sendfd (ctx, fd);
|
||||
rc = assuan_sendfd (ctx, INT2FD (fd) );
|
||||
if (rc)
|
||||
log_error ("sednig descriptor %d failed: %s\n", fd, gpg_strerror (rc));
|
||||
fclose (fp);
|
||||
|
@ -360,6 +360,16 @@ main (int argc, char **argv)
|
|||
}
|
||||
else
|
||||
ctx = start_agent ();
|
||||
|
||||
/* See whether there is a line pending from the server (in case
|
||||
assuan did not run the initial handshaking). */
|
||||
if (assuan_pending_line (ctx))
|
||||
{
|
||||
rc = read_and_print_response (ctx);
|
||||
if (rc)
|
||||
log_info (_("receiving line failed: %s\n"), gpg_strerror (rc) );
|
||||
}
|
||||
|
||||
line = NULL;
|
||||
linesize = 0;
|
||||
for (;;)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue