2008-01-10 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Thu, 10 Jan 2008 04:33:34 +0000 (04:33 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Thu, 10 Jan 2008 04:33:34 +0000 (04:33 +0000)
* gpg/pinentry: New file.
* gpg/Makefile.am (DISTCLEANFILES, all-local): Add gpg-agent.conf
(./gpg-agent.conf): New target.
(EXTRA_DIST): Add pinentry.

tests/ChangeLog
tests/gpg/Makefile.am
tests/gpg/pinentry [new file with mode: 0755]

index add52e71ad5f7795eba68b3f178e22be88d7d389..3219aa787bf69b156d68634e5252b6d54a4cebc7 100644 (file)
@@ -1,5 +1,10 @@
 2008-01-10  Marcus Brinkmann  <marcus@g10code.de>
 
+       * gpg/pinentry: New file.
+       * gpg/Makefile.am (DISTCLEANFILES, all-local): Add gpg-agent.conf
+       (./gpg-agent.conf): New target.
+       (EXTRA_DIST): Add pinentry.
+
        * gpg/t-gpgconf.c (main): Exit early if compiled without gpgconf.
 
 2008-01-04  Marcus Brinkmann  <marcus@g10code.de>
index 3ce6592db4cc4c045b4e87407614ab55132961b6..af0fa5f1d98078f1ee5688c5fad864cee0b914bc 100644 (file)
@@ -38,10 +38,10 @@ TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers             \
        t-encrypt-large t-file-name t-gpgconf $(tests_unix)
 
 CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf
-DISTCLEANFILES = pubring.gpg~ random_seed gpg.conf
+DISTCLEANFILES = pubring.gpg~ random_seed gpg.conf gpg-agent.conf
 
 EXTRA_DIST = mkdemodirs pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \
-       geheim.txt pubkey-1.asc seckey-1.asc
+       geheim.txt pubkey-1.asc seckey-1.asc pinentry
 
 INCLUDES = -I$(top_srcdir)/gpgme
 
@@ -55,7 +55,7 @@ noinst_PROGRAMS = $(TESTS) t-genkey
 clean-local:
        $(srcdir)/mkdemodirs --clean
 
-all-local: ./pubring.gpg ./gpg.conf
+all-local: ./pubring.gpg ./gpg.conf ./gpg-agent.conf
 
 ./pubring.gpg: $(srcdir)/pubdemo.asc ./Alpha/Secret.gpg 
        $(GPG) --homedir . --import $(srcdir)/pubdemo.asc
@@ -68,3 +68,7 @@ all-local: ./pubring.gpg ./gpg.conf
 ./gpg.conf:
 # This is required for t-sig-notations.
        echo no-force-v3-sigs > ./gpg.conf
+
+./gpg-agent.conf:
+# This is required for gpg2, which does not support command fd.
+       echo pinentry-program $(abs_builddir)/pinentry > ./gpg-agent.conf
diff --git a/tests/gpg/pinentry b/tests/gpg/pinentry
new file mode 100755 (executable)
index 0000000..3b99726
--- /dev/null
@@ -0,0 +1,22 @@
+#! /bin/bash
+# Dummy pinentry
+# 
+# Copyright 2008 g10 Code GmbH
+# 
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+# 
+# This file is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE.
+
+echo OK Your orders please
+
+while read cmd; do
+  case $cmd in
+    GETPIN) echo D abc; echo OK;;
+    *) echo OK;;
+  esac
+done