Agent implementation

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


--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Werner Koch <wk@gnupg.org> writes:

> On Sun, 22 Sep 2002 13:45:46 +0200, Florian Weimer said:
>
>> Are there any sample implementations (for text console and X11) that
>> can be used with "gpg --use-agent"?  I need something which can
>> actually be built without too much trouble, so something buried
>> somewhere in the =C4gypten project is probably out of question.
>
> It is not that hard:
>
> Get the latest libgcrypt *new*pg and build them.  You probably don't
> have libksba installed, so the configure script of newpg should figure
> this out and only build the gpg-agent.  If you have problems, please
> complain.

newpg CVS HEAD needs the patch below.

However, it still doesn't work correctly, at least not out of the box.
./configure does not honor --prefix, and I think I know why:

# I know that it is in general not a good idea to evaluate bindir in
# the configuration but we want to hard code the defaults into some of
# the programs and doing this during a make install is not a good
# idea.  We also have the problem that 2 of the programs are included
# in the package but the others are distributed in other packages.

*sigh*

But made it work nevertheless.

What about merging gpg-agent (and perhaps pinentry) into GnuPG *now*?
These packages are *so* useful.

--=20
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 15:41:58 -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 15:41:58 -0000
@@ -203,13 +203,8 @@
 # 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.
-***]])
+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 15:41:59 -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)

--=-=-=--