Agent implementation

Florian Weimer Weimer@CERT.Uni-Stuttgart.DE
Sun Sep 22 19:19:02 2002


--=-=-=

Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE> writes:

> newpg CVS HEAD needs the patch below.

The patch is incomplete, see below.

In addition, gpg-agent does not do what I want: I start gpg-agent on
one terminal, and invoke gpg on some other (or even in a pipe, without
a terminal).  gpg-agemt does not query for the passphrase on the first
terminal, but tries to use the terminal on which GnuPG is invoked,
which seems to fail badly.

Or is there something I do not understand?

-- 
Florian Weimer 	                  Weimer@CERT.Uni-Stuttgart.DE
University of Stuttgart           http://CERT.Uni-Stuttgart.DE/people/fw/
RUS-CERT                          fax +49-711-685-5898


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=diff

Index: Makefile.am
===================================================================
RCS file: /cvs/aegypten/newpg/Makefile.am,v
retrieving revision 1.12
diff -u -r1.12 Makefile.am
--- Makefile.am	21 Aug 2002 11:11:20 -0000	1.12
+++ Makefile.am	22 Sep 2002 16:59:18 -0000
@@ -23,8 +23,10 @@
 
 if BUILD_GPGSM
 sm = sm
+kbx = kbx
 else
 sm =
+kbx = 
 endif
 if BUILD_AGENT
 agent = agent
@@ -33,11 +35,13 @@
 endif
 if BUILD_SCDAEMON
 scd = scd
+kbx = kbx
 else
 scd =
+kbx = 
 endif
 
-SUBDIRS = intl jnlib assuan common kbx ${sm} ${agent} ${scd} po doc tests
+SUBDIRS = intl jnlib assuan common ${kbx} ${sm} ${agent} ${scd} po doc tests
 
 
 dist-hook:
Index: configure.ac
===================================================================
RCS file: /cvs/aegypten/newpg/configure.ac,v
retrieving revision 1.53
diff -u -r1.53 configure.ac
--- configure.ac	20 Sep 2002 14:13:27 -0000	1.53
+++ configure.ac	22 Sep 2002 16:59:19 -0000
@@ -203,13 +203,9 @@
 # libksba is our X.509 support library
 #
 AM_PATH_KSBA("$NEED_KSBA_VERSION",have_ksba=yes,have_ksba=no)
-if test "$have_ksba" = "no"; then
-    AC_MSG_ERROR([[
-***
-*** You need libksba to build this program..
-*** It should be available at the same place you 
-*** got this software.
-***]])
+AH_TEMPLATE([HAVE_KSBA], [Defined if we have got the KSBA library.])
+if test have_ksba = yes; then
+   AC_DEFINE(HAVE_KSBA)
 fi
 
 
Index: common/maperror.c
===================================================================
RCS file: /cvs/aegypten/newpg/common/maperror.c,v
retrieving revision 1.15
diff -u -r1.15 maperror.c
--- common/maperror.c	16 Aug 2002 14:24:12 -0000	1.15
+++ common/maperror.c	22 Sep 2002 16:59:20 -0000
@@ -26,12 +26,15 @@
 #include <ctype.h>
 #include <unistd.h>
 
+#ifdef HAVE_KSBA
 #include <ksba.h>
+#endif /* HAVE_KSBA */
 
 #include "util.h"
 #include "errors.h"
 #include "../assuan/assuan.h"
 
+#ifdef HAVE_KSBA
 /* Note: we might want to wrap this in a macro to get our hands on
    the line and file where the error occured */
 int
@@ -62,7 +65,7 @@
     }
   return err;
 }
-
+#endif /* HAVE_KSBA */
 
 int 
 map_gcry_err (int err)

--=-=-=--