summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKibum Kim <kb0929.kim@samsung.com>2012-01-07 00:46:38 +0900
committerKibum Kim <kb0929.kim@samsung.com>2012-01-07 00:46:38 +0900
commitf5660c6460a863b19f9ef745575780e37cc192a9 (patch)
tree0b478679da32d706de7b0de546d2e4daf03b160c /tools
parent06b9124a4f9d38acc78e6af686bc49a06f6354f8 (diff)
downloadgnupg-master.tar.gz
gnupg-master.tar.bz2
gnupg-master.zip
Diffstat (limited to 'tools')
-rw-r--r--tools/ChangeLog226
-rw-r--r--tools/Makefile.am39
-rw-r--r--tools/Makefile.in675
-rw-r--r--tools/bftest.c108
-rw-r--r--tools/clean-sat.c34
-rwxr-xr-xtools/convert-from-10657
-rw-r--r--tools/gpg-zip.in142
-rw-r--r--tools/gpgsplit.c879
-rwxr-xr-xtools/lspgpot27
-rwxr-xr-xtools/mail-signed-keys114
-rw-r--r--tools/make-dns-cert.c239
-rw-r--r--tools/mk-tdata.c67
-rw-r--r--tools/mpicalc.c385
-rwxr-xr-xtools/ring-a-party114
-rw-r--r--tools/shmtest.c201
15 files changed, 3307 insertions, 0 deletions
diff --git a/tools/ChangeLog b/tools/ChangeLog
new file mode 100644
index 0000000..00455c6
--- /dev/null
+++ b/tools/ChangeLog
@@ -0,0 +1,226 @@
+2006-04-20 David Shaw <dshaw@jabberwocky.com>
+
+ * make-dns-cert.c (main): Small exit code tweak from Peter
+ Palfrader.
+
+2006-04-05 David Shaw <dshaw@jabberwocky.com>
+
+ * make-dns-cert.c: Some changes from Peter Palfrader to send
+ errors to stderr and allow spaces in a fingerprint. Also warn
+ when a key is over 16k (as that is the default max-cert-size) and
+ fail when a key is over 64k as that is the DNS limit in many
+ places.
+
+2006-04-04 David Shaw <dshaw@jabberwocky.com>
+
+ * make-dns-cert.c: New program to generate properly formatted CERT
+ records so people don't have to do it manually.
+
+2006-02-14 Werner Koch <wk@gnupg.org>
+
+ * mk-tdata.c (main): Implement option --char.
+
+2005-08-05 David Shaw <dshaw@jabberwocky.com>
+
+ * gpg-zip.in: Add --decrypt functionality. Fix quoting so
+ filenames with spaces work properly.
+
+2005-08-04 David Shaw <dshaw@jabberwocky.com>
+
+ * gpg-zip.in: New. Script wrapper to work with encrypted tar
+ files, a la PGP Zip.
+
+ * Makefile.am: Use it if we have a USTAR compatible tar.
+
+2004-12-18 David Shaw <dshaw@jabberwocky.com>
+
+ * Makefile.am: Link with readline where needed.
+
+2004-10-28 Werner Koch <wk@g10code.com>
+
+ * Makefile.am (other_libs): New. Also include LIBICONV. Noted by
+ Tim Mooney.
+
+2004-10-01 Werner Koch <wk@g10code.com>
+
+ * bftest.c (i18n_init): Always use LC_ALL.
+ * shmtest.c (i18n_init): Ditto.
+ * mpicalc.c (i18n_init): Ditto.
+
+2004-09-13 David Shaw <dshaw@jabberwocky.com>
+
+ * pgpgroup-to-gpggroup: New perl script to take groups from PGP
+ command line and write out GnuPG 'group' config lines.
+
+2004-07-04 David Shaw <dshaw@jabberwocky.com>
+
+ * ring-a-party: ElGamal -> Elgamal
+
+2004-01-11 David Shaw <dshaw@jabberwocky.com>
+
+ * convert-from-106, lspgpot: Check for gpg binary before
+ proceeding. Don't hardcode the path to gpg.
+
+ * gpgsplit.c (handle_bzip2): Remove two cut and paste typecast
+ errors. Noted by Stefan Bellon.
+
+2003-12-28 Stefan Bellon <sbellon@sbellon.de>
+
+ * gpgsplit.c [__riscos__]: Removal of unnecessary #ifdef
+ __riscos__ sections.
+
+2003-12-06 David Shaw <dshaw@jabberwocky.com>
+
+ * gpgsplit.c (write_part): Split off decompression code.
+ (handle_zlib): Move it here.
+ (handle_bzip2): Add this to handle BZIP2 compressed messages.
+
+2003-10-25 Werner Koch <wk@gnupg.org>
+
+ * Makefile.am: Replaced INTLLIBS by LIBINTL.
+
+2003-08-24 David Shaw <dshaw@jabberwocky.com>
+
+ * Makefile.am: Use NETLIBS instead of EGDLIBS.
+
+2003-07-10 David Shaw <dshaw@jabberwocky.com>
+
+ * Makefile.am: Use W32LIBS where appropriate.
+
+2003-05-30 David Shaw <dshaw@jabberwocky.com>
+
+ * Makefile.am: Some cleanup, and use DLLIBS for -ldl.
+
+2003-05-24 David Shaw <dshaw@jabberwocky.com>
+
+ * bftest.c, crlf.c, mk-tdata.c, mpicalc.c, shmtest.c: Edit all
+ preprocessor instructions to remove whitespace before the
+ '#'. This is not required by C89, but there are some compilers out
+ there that don't like it.
+
+2003-03-11 David Shaw <dshaw@jabberwocky.com>
+
+ * Makefile.am: Use @CAPLIBS@ to link in -lcap if we are using
+ capabilities.
+
+2003-02-22 David Shaw <dshaw@jabberwocky.com>
+
+ * Makefile.am: Distribute convert-from-106.
+
+ * convert-from-106: Script to automate the 1.0.6->later
+ conversion. It marks all secret keys as ultimately trusted, adds
+ the signature caches, and checks the trustdb. Moved from the
+ scripts directory.
+
+2002-10-31 Stefan Bellon <sbellon@sbellon.de>
+
+ * gpgsplit.c (write_part) [__riscos__]: Use riscos_load_module()
+ to load ZLib module.
+
+2002-10-23 Werner Koch <wk@gnupg.org>
+
+ * gpgsplit.c: New options --secret-to-public and --no-split.
+ GNUified the indentation style.
+
+2002-09-25 David Shaw <dshaw@jabberwocky.com>
+
+ * Makefile.am: Link bftest with EGDLIBS (i.e. NETLIBS) as EGD uses
+ sockets.
+
+2002-05-07 Stefan Bellon <sbellon@sbellon.de>
+
+ * gpgsplit.c (create_filename): Use EXTSEP_S instead of ".".
+
+2002-04-23 David Shaw <dshaw@jabberwocky.com>
+
+ * Makefile.am: Do not list libraries in -lxxx format in a
+ dependency line.
+
+2002-01-02 Stefan Bellon <sbellon@sbellon.de>
+
+ * gpgsplit.c [__riscos__]: Added RISC OS specific file name
+ code.
+
+ * gpgsplit.c (write_part): Introduced two explicit casts.
+
+2001-12-21 David Shaw <dshaw@jabberwocky.com>
+
+ * gpgsplit.c (pkttype_to_string): PKT_PHOTO_ID -> PKT_ATTRIBUTE
+
+2001-10-23 Werner Koch <wk@gnupg.org>
+
+ * Makefile.am (gpgsplit_LDADD): Add ZLIBS.
+
+2001-09-18 Werner Koch <wk@gnupg.org>
+
+ * gpgsplit.c: New option --uncompress.
+ (write_part): Handle old style uncompressing.
+
+2001-06-20 Werner Koch <wk@gnupg.org>
+
+ * gpgsplit.c: New.
+ * Makefile.am (bin_PROGRAMS): Install gpgsplit.
+
+2001-03-27 Werner Koch <wk@gnupg.org>
+
+ * mail-signed-keys: Add option --dry-run.
+
+2001-03-21 Werner Koch <wk@gnupg.org>
+
+ * shmtest.c: Add sys/types.h
+
+Fri Sep 15 18:40:36 CEST 2000 Werner Koch <wk@openit.de>
+
+ * ring-a-party: An array start at offset 1 no 0. Many thanks to Mike
+ for finding this bug.
+
+Thu Sep 14 14:20:38 CEST 2000 Werner Koch <wk@openit.de>
+
+ * ring-a-party: Flush the last key.
+
+Wed Jul 5 13:28:45 CEST 2000 Werner Koch <wk@>
+
+ * mail-signed-keys: New.
+
+Tue May 23 09:19:00 CEST 2000 Werner Koch <wk@openit.de>
+
+ * ring-a-party: New.
+
+Thu Jul 8 16:21:27 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * lspgpot: New
+
+Wed Jul 7 13:08:40 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * Makefile.am: Support for libtool.
+
+Tue Jun 8 13:36:25 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
+
+ * mpicalc.c (main): hex digits may now be lowercase
+ (do_mulm): new.
+
+Thu Dec 10 20:15:36 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
+
+ * mpicalc.c (main): Moved initialization out of definition.
+
+Mon May 18 15:39:22 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * mk-tdata.c: New.
+
+Tue Apr 7 19:50:41 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * bftest.c: Now supports all availabe ciphers.
+
+
+
+ Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+ 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.
+
+
diff --git a/tools/Makefile.am b/tools/Makefile.am
new file mode 100644
index 0000000..5efe2c1
--- /dev/null
+++ b/tools/Makefile.am
@@ -0,0 +1,39 @@
+# Copyright (C) 1998, 1999, 2000, 2001, 2003,
+# 2004 Free Software Foundation, Inc.
+#
+# This file is part of GnuPG.
+#
+# GnuPG is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# GnuPG is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+## Process this file with automake to produce Makefile.in
+
+EXTRA_DIST = lspgpot ring-a-party mail-signed-keys convert-from-106
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl
+needed_libs = ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a
+other_libs = $(LIBICONV) $(LIBINTL) $(CAPLIBS)
+
+bin_PROGRAMS = gpgsplit
+noinst_PROGRAMS = mpicalc bftest clean-sat mk-tdata shmtest make-dns-cert
+
+if HAVE_USTAR
+bin_SCRIPTS = gpg-zip
+endif
+
+gpgsplit_LDADD = $(needed_libs) $(other_libs) @ZLIBS@
+mpicalc_LDADD = $(needed_libs) $(other_libs) @W32LIBS@
+bftest_LDADD = $(needed_libs) $(other_libs) @W32LIBS@ @DLLIBS@ @NETLIBS@ @LIBREADLINE@
+shmtest_LDADD = $(needed_libs) $(other_libs) @LIBREADLINE@
+
+gpgsplit mpicalc bftest shmtest: $(needed_libs)
diff --git a/tools/Makefile.in b/tools/Makefile.in
new file mode 100644
index 0000000..a5a20c0
--- /dev/null
+++ b/tools/Makefile.in
@@ -0,0 +1,675 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program 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.
+
+@SET_MAKE@
+
+# Copyright (C) 1998, 1999, 2000, 2001, 2003,
+# 2004 Free Software Foundation, Inc.
+#
+# This file is part of GnuPG.
+#
+# GnuPG is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# GnuPG is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = gpgsplit$(EXEEXT)
+noinst_PROGRAMS = mpicalc$(EXEEXT) bftest$(EXEEXT) clean-sat$(EXEEXT) \
+ mk-tdata$(EXEEXT) shmtest$(EXEEXT) make-dns-cert$(EXEEXT)
+subdir = tools
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/gpg-zip.in ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/autobuild.m4 \
+ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intmax.m4 \
+ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \
+ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \
+ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/ldap.m4 \
+ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
+ $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libcurl.m4 \
+ $(top_srcdir)/m4/libusb.m4 $(top_srcdir)/m4/longdouble.m4 \
+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/noexecstack.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/signed.m4 \
+ $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
+ $(top_srcdir)/m4/tar-ustar.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
+ $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = gpg-zip
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+bftest_SOURCES = bftest.c
+bftest_OBJECTS = bftest.$(OBJEXT)
+am__DEPENDENCIES_1 = ../cipher/libcipher.a ../mpi/libmpi.a \
+ ../util/libutil.a
+am__DEPENDENCIES_2 =
+am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_2) \
+ $(am__DEPENDENCIES_2)
+bftest_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3)
+clean_sat_SOURCES = clean-sat.c
+clean_sat_OBJECTS = clean-sat.$(OBJEXT)
+clean_sat_LDADD = $(LDADD)
+gpgsplit_SOURCES = gpgsplit.c
+gpgsplit_OBJECTS = gpgsplit.$(OBJEXT)
+gpgsplit_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3)
+make_dns_cert_SOURCES = make-dns-cert.c
+make_dns_cert_OBJECTS = make-dns-cert.$(OBJEXT)
+make_dns_cert_LDADD = $(LDADD)
+mk_tdata_SOURCES = mk-tdata.c
+mk_tdata_OBJECTS = mk-tdata.$(OBJEXT)
+mk_tdata_LDADD = $(LDADD)
+mpicalc_SOURCES = mpicalc.c
+mpicalc_OBJECTS = mpicalc.$(OBJEXT)
+mpicalc_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3)
+shmtest_SOURCES = shmtest.c
+shmtest_OBJECTS = shmtest.$(OBJEXT)
+shmtest_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3)
+binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(bin_SCRIPTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/scripts/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = bftest.c clean-sat.c gpgsplit.c make-dns-cert.c mk-tdata.c \
+ mpicalc.c shmtest.c
+DIST_SOURCES = bftest.c clean-sat.c gpgsplit.c make-dns-cert.c \
+ mk-tdata.c mpicalc.c shmtest.c
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CAPLIBS = @CAPLIBS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCAS = @CCAS@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CROSS_COMPILING_FALSE = @CROSS_COMPILING_FALSE@
+CROSS_COMPILING_TRUE = @CROSS_COMPILING_TRUE@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLIBS = @DLLIBS@
+DNSLIBS = @DNSLIBS@
+DOCBOOK_TO_MAN = @DOCBOOK_TO_MAN@
+DOCBOOK_TO_TEXI = @DOCBOOK_TO_TEXI@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_AGENT_SUPPORT_FALSE = @ENABLE_AGENT_SUPPORT_FALSE@
+ENABLE_AGENT_SUPPORT_TRUE = @ENABLE_AGENT_SUPPORT_TRUE@
+ENABLE_BZIP2_SUPPORT_FALSE = @ENABLE_BZIP2_SUPPORT_FALSE@
+ENABLE_BZIP2_SUPPORT_TRUE = @ENABLE_BZIP2_SUPPORT_TRUE@
+ENABLE_CARD_SUPPORT_FALSE = @ENABLE_CARD_SUPPORT_FALSE@
+ENABLE_CARD_SUPPORT_TRUE = @ENABLE_CARD_SUPPORT_TRUE@
+ENABLE_LOCAL_ZLIB_FALSE = @ENABLE_LOCAL_ZLIB_FALSE@
+ENABLE_LOCAL_ZLIB_TRUE = @ENABLE_LOCAL_ZLIB_TRUE@
+EXEEXT = @EXEEXT@
+FAKE_CURL_FALSE = @FAKE_CURL_FALSE@
+FAKE_CURL_TRUE = @FAKE_CURL_TRUE@
+FAQPROG = @FAQPROG@
+GENCAT = @GENCAT@
+GETOPT = @GETOPT@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GPGKEYS_CURL = @GPGKEYS_CURL@
+GPGKEYS_FINGER = @GPGKEYS_FINGER@
+GPGKEYS_HKP = @GPGKEYS_HKP@
+GPGKEYS_LDAP = @GPGKEYS_LDAP@
+GPGKEYS_MAILTO = @GPGKEYS_MAILTO@
+GREP = @GREP@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_DOCBOOK_TO_MAN_FALSE = @HAVE_DOCBOOK_TO_MAN_FALSE@
+HAVE_DOCBOOK_TO_MAN_TRUE = @HAVE_DOCBOOK_TO_MAN_TRUE@
+HAVE_DOCBOOK_TO_TEXI_FALSE = @HAVE_DOCBOOK_TO_TEXI_FALSE@
+HAVE_DOCBOOK_TO_TEXI_TRUE = @HAVE_DOCBOOK_TO_TEXI_TRUE@
+HAVE_DOSISH_SYSTEM_FALSE = @HAVE_DOSISH_SYSTEM_FALSE@
+HAVE_DOSISH_SYSTEM_TRUE = @HAVE_DOSISH_SYSTEM_TRUE@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_USTAR_FALSE = @HAVE_USTAR_FALSE@
+HAVE_USTAR_TRUE = @HAVE_USTAR_TRUE@
+HAVE_W32_SYSTEM_FALSE = @HAVE_W32_SYSTEM_FALSE@
+HAVE_W32_SYSTEM_TRUE = @HAVE_W32_SYSTEM_TRUE@
+HAVE_WPRINTF = @HAVE_WPRINTF@
+IDEA_O = @IDEA_O@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LDAPLIBS = @LDAPLIBS@
+LDAP_CPPFLAGS = @LDAP_CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBCURL = @LIBCURL@
+LIBCURL_CPPFLAGS = @LIBCURL_CPPFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBREADLINE = @LIBREADLINE@
+LIBS = @LIBS@
+LIBUSB = @LIBUSB@
+LIBUSB_CPPFLAGS = @LIBUSB_CPPFLAGS@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MPI_EXTRA_ASM_OBJS = @MPI_EXTRA_ASM_OBJS@
+MPI_OPT_FLAGS = @MPI_OPT_FLAGS@
+MPI_SFLAGS = @MPI_SFLAGS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NETLIBS = @NETLIBS@
+NM = @NM@
+NOEXECSTACK_FLAGS = @NOEXECSTACK_FLAGS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TAR = @TAR@
+USE_DNS_SRV_FALSE = @USE_DNS_SRV_FALSE@
+USE_DNS_SRV_TRUE = @USE_DNS_SRV_TRUE@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_INTERNAL_REGEX_FALSE = @USE_INTERNAL_REGEX_FALSE@
+USE_INTERNAL_REGEX_TRUE = @USE_INTERNAL_REGEX_TRUE@
+USE_NLS = @USE_NLS@
+USE_RNDEGD_FALSE = @USE_RNDEGD_FALSE@
+USE_RNDEGD_TRUE = @USE_RNDEGD_TRUE@
+USE_RNDLINUX_FALSE = @USE_RNDLINUX_FALSE@
+USE_RNDLINUX_TRUE = @USE_RNDLINUX_TRUE@
+USE_RNDUNIX_FALSE = @USE_RNDUNIX_FALSE@
+USE_RNDUNIX_TRUE = @USE_RNDUNIX_TRUE@
+USE_RNDW32_FALSE = @USE_RNDW32_FALSE@
+USE_RNDW32_TRUE = @USE_RNDW32_TRUE@
+USE_SHA512_FALSE = @USE_SHA512_FALSE@
+USE_SHA512_TRUE = @USE_SHA512_TRUE@
+USE_SIMPLE_GETTEXT_FALSE = @USE_SIMPLE_GETTEXT_FALSE@
+USE_SIMPLE_GETTEXT_TRUE = @USE_SIMPLE_GETTEXT_TRUE@
+VERSION = @VERSION@
+W32LIBS = @W32LIBS@
+WORKING_FAQPROG_FALSE = @WORKING_FAQPROG_FALSE@
+WORKING_FAQPROG_TRUE = @WORKING_FAQPROG_TRUE@
+XGETTEXT = @XGETTEXT@
+ZLIBS = @ZLIBS@
+_libcurl_config = @_libcurl_config@
+_usb_config = @_usb_config@
+ac_ct_CC = @ac_ct_CC@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+EXTRA_DIST = lspgpot ring-a-party mail-signed-keys convert-from-106
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl
+needed_libs = ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a
+other_libs = $(LIBICONV) $(LIBINTL) $(CAPLIBS)
+@HAVE_USTAR_TRUE@bin_SCRIPTS = gpg-zip
+gpgsplit_LDADD = $(needed_libs) $(other_libs) @ZLIBS@
+mpicalc_LDADD = $(needed_libs) $(other_libs) @W32LIBS@
+bftest_LDADD = $(needed_libs) $(other_libs) @W32LIBS@ @DLLIBS@ @NETLIBS@ @LIBREADLINE@
+shmtest_LDADD = $(needed_libs) $(other_libs) @LIBREADLINE@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tools/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+gpg-zip: $(top_builddir)/config.status $(srcdir)/gpg-zip.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+installcheck-binPROGRAMS: $(bin_PROGRAMS)
+ bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
+ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+ esac; \
+ f=`echo "$$p" | \
+ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ for opt in --help --version; do \
+ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
+ 2>c$${pid}_.err </dev/null \
+ && test -n "`cat c$${pid}_.out`" \
+ && test -z "`cat c$${pid}_.err`"; then :; \
+ else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+ done; \
+ done; rm -f c$${pid}_.???; exit $$bad
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+bftest$(EXEEXT): $(bftest_OBJECTS) $(bftest_DEPENDENCIES)
+ @rm -f bftest$(EXEEXT)
+ $(LINK) $(bftest_LDFLAGS) $(bftest_OBJECTS) $(bftest_LDADD) $(LIBS)
+clean-sat$(EXEEXT): $(clean_sat_OBJECTS) $(clean_sat_DEPENDENCIES)
+ @rm -f clean-sat$(EXEEXT)
+ $(LINK) $(clean_sat_LDFLAGS) $(clean_sat_OBJECTS) $(clean_sat_LDADD) $(LIBS)
+gpgsplit$(EXEEXT): $(gpgsplit_OBJECTS) $(gpgsplit_DEPENDENCIES)
+ @rm -f gpgsplit$(EXEEXT)
+ $(LINK) $(gpgsplit_LDFLAGS) $(gpgsplit_OBJECTS) $(gpgsplit_LDADD) $(LIBS)
+make-dns-cert$(EXEEXT): $(make_dns_cert_OBJECTS) $(make_dns_cert_DEPENDENCIES)
+ @rm -f make-dns-cert$(EXEEXT)
+ $(LINK) $(make_dns_cert_LDFLAGS) $(make_dns_cert_OBJECTS) $(make_dns_cert_LDADD) $(LIBS)
+mk-tdata$(EXEEXT): $(mk_tdata_OBJECTS) $(mk_tdata_DEPENDENCIES)
+ @rm -f mk-tdata$(EXEEXT)
+ $(LINK) $(mk_tdata_LDFLAGS) $(mk_tdata_OBJECTS) $(mk_tdata_LDADD) $(LIBS)
+mpicalc$(EXEEXT): $(mpicalc_OBJECTS) $(mpicalc_DEPENDENCIES)
+ @rm -f mpicalc$(EXEEXT)
+ $(LINK) $(mpicalc_LDFLAGS) $(mpicalc_OBJECTS) $(mpicalc_LDADD) $(LIBS)
+shmtest$(EXEEXT): $(shmtest_OBJECTS) $(shmtest_DEPENDENCIES)
+ @rm -f shmtest$(EXEEXT)
+ $(LINK) $(shmtest_LDFLAGS) $(shmtest_OBJECTS) $(shmtest_LDADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f $$d$$p; then \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
+installcheck-binSCRIPTS: $(bin_SCRIPTS)
+ bad=0; pid=$$$$; list="$(bin_SCRIPTS)"; for p in $$list; do \
+ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+ esac; \
+ f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
+ for opt in --help --version; do \
+ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
+ 2>c$${pid}_.err </dev/null \
+ && test -n "`cat c$${pid}_.out`" \
+ && test -z "`cat c$${pid}_.err`"; then :; \
+ else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+ done; \
+ done; rm -f c$${pid}_.???; exit $$bad
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bftest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clean-sat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gpgsplit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make-dns-cert.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mk-tdata.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpicalc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shmtest.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS install-binSCRIPTS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am: installcheck-binPROGRAMS installcheck-binSCRIPTS
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-binSCRIPTS install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-info-am install-man install-strip installcheck \
+ installcheck-am installcheck-binPROGRAMS \
+ installcheck-binSCRIPTS installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-info-am
+
+
+gpgsplit mpicalc bftest shmtest: $(needed_libs)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tools/bftest.c b/tools/bftest.c
new file mode 100644
index 0000000..829c429
--- /dev/null
+++ b/tools/bftest.c
@@ -0,0 +1,108 @@
+/* bftest.c - Blowfish test program
+ * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ *
+ * This file is part of GnuPG.
+ *
+ * GnuPG is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GnuPG is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_DOSISH_SYSTEM
+#include <io.h>
+#include <fcntl.h>
+#endif
+
+#include "util.h"
+#include "cipher.h"
+#include "i18n.h"
+
+static void
+my_usage(void)
+{
+ fprintf(stderr, "usage: bftest [-e][-d] algo key\n");
+ exit(1);
+}
+
+const char *
+strusage( int level )
+{
+ return default_strusage(level);
+}
+
+static void
+i18n_init(void)
+{
+#ifdef ENABLE_NLS
+ setlocale( LC_ALL, "" );
+ bindtextdomain( PACKAGE, G10_LOCALEDIR );
+ textdomain( PACKAGE );
+#endif
+}
+
+int
+main(int argc, char **argv)
+{
+ int encode=0;
+ CIPHER_HANDLE hd;
+ char buf[4096];
+ int n, size=4096;
+ int algo;
+
+#ifdef HAVE_DOSISH_SYSTEM
+ setmode( fileno(stdin), O_BINARY );
+ setmode( fileno(stdout), O_BINARY );
+#endif
+
+ i18n_init();
+ if( argc > 1 && !strcmp(argv[1], "-e") ) {
+ encode++;
+ argc--; argv++;
+ }
+ else if( argc > 1 && !strcmp(argv[1], "-E") ) {
+ encode++;
+ argc--; argv++;
+ size = 10;
+ }
+ else if( argc > 1 && !strcmp(argv[1], "-d") ) {
+ argc--; argv++;
+ }
+ else if( argc > 1 && !strcmp(argv[1], "-D") ) {
+ argc--; argv++;
+ size = 10;
+ }
+ if( argc != 3 )
+ my_usage();
+ argc--; argv++;
+ algo = string_to_cipher_algo( *argv );
+ argc--; argv++;
+
+ hd = cipher_open( algo, CIPHER_MODE_CFB, 0 );
+ cipher_setkey( hd, *argv, strlen(*argv) );
+ cipher_setiv( hd, NULL, 0 );
+ while( (n = fread( buf, 1, size, stdin )) > 0 ) {
+ if( encode )
+ cipher_encrypt( hd, buf, buf, n );
+ else
+ cipher_decrypt( hd, buf, buf, n );
+ if( fwrite( buf, 1, n, stdout) != n )
+ log_fatal("write error\n");
+ }
+ cipher_close(hd);
+ return 0;
+}
diff --git a/tools/clean-sat.c b/tools/clean-sat.c
new file mode 100644
index 0000000..8b6bfd7
--- /dev/null
+++ b/tools/clean-sat.c
@@ -0,0 +1,34 @@
+/* clean-sat.c
+ * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ *
+ * 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 program 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.
+ */
+
+#include <stdio.h>
+
+int
+main(int argc, char **argv)
+{
+ int c;
+
+ if( argc > 1 ) {
+ fprintf(stderr, "no arguments, please\n");
+ return 1;
+ }
+
+ while( (c=getchar()) == '\n' )
+ ;
+ while( c != EOF ) {
+ putchar(c);
+ c = getchar();
+ }
+
+ return 0;
+}
+
diff --git a/tools/convert-from-106 b/tools/convert-from-106
new file mode 100755
index 0000000..634152b
--- /dev/null
+++ b/tools/convert-from-106
@@ -0,0 +1,57 @@
+#!/bin/sh
+# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+if ! gpg --version > /dev/null 2>&1 ; then
+ echo "GnuPG not available!"
+ exit 1
+fi
+
+gpg="gpg --no-greeting --no-secmem-warning"
+
+echo "This script converts your public keyring and trustdb from GnuPG"
+echo "1.0.6 or earlier to the 1.0.7 and later format."
+
+echo "If you have already done this, there is no harm (but no point)"
+echo "in doing it again."
+
+echo -n "Continue? (y/N)"
+
+read answer
+
+if test "x$answer" != "xy" ; then
+ exit 0
+fi
+
+echo
+echo "Marking your keys as ultimately trusted"
+for key in `$gpg --with-colons --list-secret-keys | grep sec: | cut -d: -f5`
+do
+ $gpg --trusted-key $key --with-colons --list-keys $key > /dev/null 2>&1
+ echo -n "."
+done
+echo
+
+echo
+echo "Adding signature caches"
+$gpg --rebuild-keydb-caches
+
+echo
+echo "Checking trustdb"
+$gpg --check-trustdb
+
+echo
+echo "Done!"
diff --git a/tools/gpg-zip.in b/tools/gpg-zip.in
new file mode 100644
index 0000000..8b4ccfb
--- /dev/null
+++ b/tools/gpg-zip.in
@@ -0,0 +1,142 @@
+#!/bin/sh
+
+# gpg-archive - gpg-ized tar using the same format as PGP's PGP Zip.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+#
+# This file is part of GnuPG.
+#
+# GnuPG is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# GnuPG is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+# Despite the name, PGP Zip format is actually an OpenPGP-wrapped tar
+# file. To be compatible with PGP itself, this must be a USTAR format
+# tar file. Unclear on whether there is a distinction here between
+# the GNU or POSIX variant of USTAR.
+
+VERSION=@VERSION@
+TAR=@TAR@
+GPG=gpg
+
+usage="\
+Usage: gpg-zip [--help] [--version] [--encrypt] [--decrypt] [--symmetric]
+ [--list-archive] [--output FILE] [--gpg GPG] [--gpg-args ARGS]
+ [--tar TAR] [--tar-args ARGS] filename1 [filename2, ...]
+ directory1 [directory2, ...]
+
+Encrypt or sign files into an archive."
+
+while test $# -gt 0 ; do
+ case $1 in
+ -h | --help | --h*)
+ echo "$usage"
+ exit 0
+ ;;
+ --list-archive)
+ list=yes
+ create=no
+ unpack=no
+ shift
+ ;;
+ --encrypt | -e)
+ gpg_args="$gpg_args --encrypt"
+ list=no
+ create=yes
+ unpack=no
+ shift
+ ;;
+ --decrypt | -d)
+ gpg_args="$gpg_args --decrypt"
+ list=no
+ create=no
+ unpack=yes
+ shift
+ ;;
+ --symmetric | -c)
+ gpg_args="$gpg_args --symmetric"
+ list=no
+ create=yes
+ unpack=no
+ shift
+ ;;
+ --sign | -s)
+ gpg_args="$gpg_args --sign"
+ list=no
+ create=yes
+ unpack=no
+ shift
+ ;;
+ --recipient | -r)
+ gpg_args="$gpg_args --recipient $2"
+ shift
+ shift
+ ;;
+ --local-user | -u)
+ gpg_args="$gpg_args --local-user $2"
+ shift
+ shift
+ ;;
+ --output | -o)
+ gpg_args="$gpg_args --output $2"
+ shift
+ shift
+ ;;
+ --version)
+ echo "gpg-zip (GnuPG) $VERSION"
+ exit 0
+ ;;
+ --gpg)
+ GPG=$1
+ shift
+ ;;
+ --gpg-args)
+ gpg_args="$gpg_args $2"
+ shift
+ shift
+ ;;
+ --tar)
+ TAR=$1
+ shift
+ ;;
+ --tar-args)
+ tar_args="$tar_args $2"
+ shift
+ shift
+ ;;
+ --)
+ shift
+ break
+ ;;
+ -*)
+ echo "$usage" 1>&2
+ exit 1
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
+if test x$create = xyes ; then
+# echo "$TAR -cf - "$@" | $GPG --set-filename x.tar $gpg_args" 1>&2
+ $TAR -cf - "$@" | $GPG --set-filename x.tar $gpg_args
+elif test x$list = xyes ; then
+# echo "cat \"$1\" | $GPG $gpg_args | $TAR $tar_args -tf -" 1>&2
+ cat "$1" | $GPG $gpg_args | $TAR $tar_args -tf -
+elif test x$unpack = xyes ; then
+# echo "cat \"$1\" | $GPG $gpg_args | $TAR $tar_args -xvf -" 1>&2
+ cat "$1" | $GPG $gpg_args | $TAR $tar_args -xvf -
+else
+ echo "$usage" 1>&2
+ exit 1
+fi
diff --git a/tools/gpgsplit.c b/tools/gpgsplit.c
new file mode 100644
index 0000000..3cdae05
--- /dev/null
+++ b/tools/gpgsplit.c
@@ -0,0 +1,879 @@
+/* gpgsplit.c - An OpenPGP packet splitting tool
+ * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of GnuPG.
+ *
+ * GnuPG is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GnuPG is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ */
+
+/*
+ * TODO: Add an option to uncompress packets. This should come quite handy.
+ */
+
+#include <config.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <assert.h>
+#ifdef HAVE_DOSISH_SYSTEM
+# include <fcntl.h> /* for setmode() */
+#endif
+#include <zlib.h>
+#ifdef HAVE_BZIP2
+#include <bzlib.h>
+#endif /* HAVE_BZIP2 */
+#if defined(__riscos__) && defined(USE_ZLIBRISCOS)
+# include "zlib-riscos.h"
+#endif
+
+#define INCLUDED_BY_MAIN_MODULE 1
+#include "../g10/packet.h"
+#include "util.h"
+
+static int opt_verbose;
+static const char *opt_prefix = "";
+static int opt_uncompress;
+static int opt_secret_to_public;
+static int opt_no_split;
+
+static void g10_exit( int rc );
+static void split_packets (const char *fname);
+
+
+enum cmd_and_opt_values {
+ aNull = 0,
+ oVerbose = 'v',
+ oPrefix = 'p',
+ oUncompress = 500,
+ oSecretToPublic,
+ oNoSplit,
+
+ aTest
+};
+
+
+static ARGPARSE_OPTS opts[] = {
+
+ { 301, NULL, 0, "@Options:\n " },
+
+ { oVerbose, "verbose", 0, "verbose" },
+ { oPrefix, "prefix", 2, "|STRING|Prepend filenames with STRING" },
+ { oUncompress, "uncompress", 0, "uncompress a packet"},
+ { oSecretToPublic, "secret-to-public", 0, "convert secret keys to public keys"},
+ { oNoSplit, "no-split", 0, "write to stdout and don't actually split"},
+{0} };
+
+
+const char *
+strusage( int level )
+{
+ const char *p;
+ switch (level)
+ {
+ case 11: p = "gpgsplit (GnuPG)";
+ break;
+ case 13: p = VERSION; break;
+ case 17: p = PRINTABLE_OS_NAME; break;
+ case 19: p =
+ "Please report bugs to <bug-gnupg@gnu.org>.\n";
+ break;
+ case 1:
+ case 40: p =
+ "Usage: gpgsplit [options] [files] (-h for help)";
+ break;
+ case 41: p =
+ "Syntax: gpgsplit [options] [files]\n"
+ "Split an OpenPGP message into packets\n";
+ break;
+
+ default: p = default_strusage(level);
+ }
+ return p;
+}
+
+
+
+int
+main( int argc, char **argv )
+{
+ ARGPARSE_ARGS pargs;
+
+#ifdef HAVE_DOSISH_SYSTEM
+ setmode( fileno(stdin), O_BINARY );
+ setmode( fileno(stdout), O_BINARY );
+#endif
+ log_set_name("gpgsplit");
+
+ pargs.argc = &argc;
+ pargs.argv = &argv;
+ pargs.flags= 1; /* do not remove the args */
+ while (optfile_parse( NULL, NULL, NULL, &pargs, opts))
+ {
+ switch (pargs.r_opt)
+ {
+ case oVerbose: opt_verbose = 1; break;
+ case oPrefix: opt_prefix = pargs.r.ret_str; break;
+ case oUncompress: opt_uncompress = 1; break;
+ case oSecretToPublic: opt_secret_to_public = 1; break;
+ case oNoSplit: opt_no_split = 1; break;
+ default : pargs.err = 2; break;
+ }
+ }
+
+ if (log_get_errorcount(0))
+ g10_exit (2);
+
+ if (!argc)
+ split_packets (NULL);
+ else
+ {
+ for ( ;argc; argc--, argv++)
+ split_packets (*argv);
+ }
+
+ g10_exit (0);
+ return 0;
+}
+
+
+static void
+g10_exit (int rc)
+{
+ rc = rc? rc : log_get_errorcount(0)? 2 : 0;
+ exit(rc );
+}
+
+static const char *
+pkttype_to_string (int pkttype)
+{
+ const char *s;
+
+ switch (pkttype)
+ {
+ case PKT_PUBKEY_ENC : s = "pk_enc"; break;
+ case PKT_SIGNATURE : s = "sig"; break;
+ case PKT_SYMKEY_ENC : s = "sym_enc"; break;
+ case PKT_ONEPASS_SIG : s = "onepass_sig"; break;
+ case PKT_SECRET_KEY : s = "secret_key"; break;
+ case PKT_PUBLIC_KEY : s = "public_key"; break;
+ case PKT_SECRET_SUBKEY : s = "secret_subkey"; break;
+ case PKT_COMPRESSED :
+ s = opt_uncompress? "uncompressed":"compressed";
+ break;
+ case PKT_ENCRYPTED : s = "encrypted"; break;
+ case PKT_MARKER : s = "marker"; break;
+ case PKT_PLAINTEXT : s = "plaintext"; break;
+ case PKT_RING_TRUST : s = "ring_trust"; break;
+ case PKT_USER_ID : s = "user_id"; break;
+ case PKT_PUBLIC_SUBKEY : s = "public_subkey"; break;
+ case PKT_OLD_COMMENT : s = "old_comment"; break;
+ case PKT_ATTRIBUTE : s = "attribute"; break;
+ case PKT_ENCRYPTED_MDC : s = "encrypted_mdc"; break;
+ case PKT_MDC : s = "mdc"; break;
+ case PKT_COMMENT : s = "comment"; break;
+ case PKT_GPG_CONTROL : s = "gpg_control"; break;
+ default: s = "unknown"; break;
+ }
+ return s;
+}
+
+
+/*
+ * Create a new filename and a return a pointer to a statically
+ * allocated buffer
+ */
+static char *
+create_filename (int pkttype)
+{
+ static unsigned int partno = 0;
+ static char *name;
+
+ if (!name)
+ name = xmalloc (strlen (opt_prefix) + 100 );
+
+ assert (pkttype < 1000 && pkttype >= 0 );
+ partno++;
+ sprintf (name, "%s%06u-%03d" EXTSEP_S "%.40s",
+ opt_prefix, partno, pkttype, pkttype_to_string (pkttype));
+ return name;
+}
+
+static int
+read_u16 (FILE *fp, size_t *rn)
+{
+ int c;
+
+ if ( (c = getc (fp)) == EOF )
+ return -1;
+ *rn = c << 8;
+ if ( (c = getc (fp)) == EOF )
+ return -1;
+ *rn |= c;
+ return 0;
+}
+
+static int
+read_u32 (FILE *fp, unsigned long *rn)
+{
+ size_t tmp;
+
+ if (read_u16 (fp, &tmp))
+ return -1;
+ *rn = tmp << 16;
+ if (read_u16 (fp, &tmp))
+ return -1;
+ *rn |= tmp;
+ return 0;
+}
+
+static int
+write_old_header (FILE *fp, int pkttype, unsigned int len)
+{
+ int ctb = (0x80 | ((pkttype & 15)<<2));
+
+ if (len < 256)
+ ;
+ else if (len < 65536)
+ ctb |= 1;
+ else
+ ctb |= 2;
+
+ if ( putc ( ctb, fp) == EOF )
+ return -1;
+
+ if ( (ctb & 2) )
+ {
+ if (putc ((len>>24), fp) == EOF)
+ return -1;
+ if (putc ((len>>16), fp) == EOF)
+ return -1;
+ }
+ if ( (ctb & 3) )
+ {
+ if (putc ((len>>8), fp) == EOF)
+ return -1;
+ }
+ if (putc ((len&0xff), fp) == EOF)
+ return -1;
+ return 0;
+}
+
+static int
+write_new_header (FILE *fp, int pkttype, unsigned int len)
+{
+ if ( putc ((0xc0 | (pkttype & 0x3f)), fp) == EOF )
+ return -1;
+
+ if (len < 192)
+ {
+ if (putc (len, fp) == EOF)
+ return -1;
+ }
+ else if (len < 8384)
+ {
+ len -= 192;
+ if (putc ((len/256)+192, fp) == EOF)
+ return -1;
+ if (putc ((len%256), fp) == EOF)
+ return -1;
+ }
+ else
+ {
+ if (putc ( 0xff, fp) == EOF)
+ return -1;
+ if (putc ( (len >> 24), fp) == EOF)
+ return -1;
+ if (putc ( (len >> 16), fp) == EOF)
+ return -1;
+ if (putc ( (len >> 8), fp) == EOF)
+ return -1;
+ if (putc ( (len & 0xff), fp) == EOF)
+ return -1;
+ }
+ return 0;
+}
+
+/* Return the length of the public key given BUF of BUFLEN with a
+ secret key. */
+static int
+public_key_length (const unsigned char *buf, size_t buflen)
+{
+ const unsigned char *s;
+ int nmpis;
+
+ /* byte version number (3 or 4)
+ u32 creation time
+ [u16 valid days (version 3 only)]
+ byte algorithm
+ n MPIs (n and e) */
+ if (!buflen)
+ return 0;
+ if (buf[0] < 2 || buf[0] > 4)
+ return 0; /* wrong version number */
+ if (buflen < (buf[0] == 4? 6:8))
+ return 0;
+ s = buf + (buf[0] == 4? 6:8);
+ buflen -= (buf[0] == 4? 6:8);
+ switch (s[-1])
+ {
+ case 1:
+ case 2:
+ case 3:
+ nmpis = 2;
+ break;
+ case 16:
+ case 20:
+ nmpis = 3;
+ break;
+ case 17:
+ nmpis = 4;
+ break;
+ default:
+ return 0;
+ }
+
+ for (; nmpis; nmpis--)
+ {
+ unsigned int nbits, nbytes;
+
+ if (buflen < 2)
+ return 0;
+ nbits = (s[0] << 8) | s[1];
+ s += 2; buflen -= 2;
+ nbytes = (nbits+7) / 8;
+ if (buflen < nbytes)
+ return 0;
+ s += nbytes; buflen -= nbytes;
+ }
+
+ return s - buf;
+}
+
+static int
+handle_zlib(int algo,FILE *fpin,FILE *fpout)
+{
+ z_stream zs;
+ byte *inbuf, *outbuf;
+ unsigned int inbufsize, outbufsize;
+ int c,zinit_done, zrc, nread, count;
+ size_t n;
+
+ memset (&zs, 0, sizeof zs);
+ inbufsize = 2048;
+ inbuf = xmalloc (inbufsize);
+ outbufsize = 8192;
+ outbuf = xmalloc (outbufsize);
+ zs.avail_in = 0;
+ zinit_done = 0;
+
+ do
+ {
+ if (zs.avail_in < inbufsize)
+ {
+ n = zs.avail_in;
+ if (!n)
+ zs.next_in = (Bytef *) inbuf;
+ count = inbufsize - n;
+ for (nread=0;
+ nread < count && (c=getc (fpin)) != EOF;
+ nread++)
+ inbuf[n+nread] = c;
+
+ n += nread;
+ if (nread < count && algo == 1)
+ {
+ inbuf[n] = 0xFF; /* chew dummy byte */
+ n++;
+ }
+ zs.avail_in = n;
+ }
+ zs.next_out = (Bytef *) outbuf;
+ zs.avail_out = outbufsize;
+
+ if (!zinit_done)
+ {
+ zrc = (algo == 1? inflateInit2 ( &zs, -13)
+ : inflateInit ( &zs ));
+ if (zrc != Z_OK)
+ {
+ log_fatal ("zlib problem: %s\n", zs.msg? zs.msg :
+ zrc == Z_MEM_ERROR ? "out of core" :
+ zrc == Z_VERSION_ERROR ?
+ "invalid lib version" :
+ "unknown error" );
+ }
+ zinit_done = 1;
+ }
+ else
+ {
+#ifdef Z_SYNC_FLUSH
+ zrc = inflate (&zs, Z_SYNC_FLUSH);
+#else
+ zrc = inflate (&zs, Z_PARTIAL_FLUSH);
+#endif
+ if (zrc == Z_STREAM_END)
+ ; /* eof */
+ else if (zrc != Z_OK && zrc != Z_BUF_ERROR)
+ {
+ if (zs.msg)
+ log_fatal ("zlib inflate problem: %s\n", zs.msg );
+ else
+ log_fatal ("zlib inflate problem: rc=%d\n", zrc );
+ }
+ for (n=0; n < outbufsize - zs.avail_out; n++)
+ {
+ if (putc (outbuf[n], fpout) == EOF )
+ return 1;
+ }
+ }
+ }
+ while (zrc != Z_STREAM_END && zrc != Z_BUF_ERROR);
+ inflateEnd (&zs);
+
+ return 0;
+}
+
+#ifdef HAVE_BZIP2
+static int
+handle_bzip2(int algo,FILE *fpin,FILE *fpout)
+{
+ bz_stream bzs;
+ byte *inbuf, *outbuf;
+ unsigned int inbufsize, outbufsize;
+ int c,zinit_done, zrc, nread, count;
+ size_t n;
+
+ memset (&bzs, 0, sizeof bzs);
+ inbufsize = 2048;
+ inbuf = xmalloc (inbufsize);
+ outbufsize = 8192;
+ outbuf = xmalloc (outbufsize);
+ bzs.avail_in = 0;
+ zinit_done = 0;
+
+ do
+ {
+ if (bzs.avail_in < inbufsize)
+ {
+ n = bzs.avail_in;
+ if (!n)
+ bzs.next_in = inbuf;
+ count = inbufsize - n;
+ for (nread=0;
+ nread < count && (c=getc (fpin)) != EOF;
+ nread++)
+ inbuf[n+nread] = c;
+
+ n += nread;
+ if (nread < count && algo == 1)
+ {
+ inbuf[n] = 0xFF; /* chew dummy byte */
+ n++;
+ }
+ bzs.avail_in = n;
+ }
+ bzs.next_out = outbuf;
+ bzs.avail_out = outbufsize;
+
+ if (!zinit_done)
+ {
+ zrc = BZ2_bzDecompressInit(&bzs,0,0);
+ if (zrc != BZ_OK)
+ log_fatal ("bz2lib problem: %d\n",zrc);
+ zinit_done = 1;
+ }
+ else
+ {
+ zrc = BZ2_bzDecompress(&bzs);
+ if (zrc == BZ_STREAM_END)
+ ; /* eof */
+ else if (zrc != BZ_OK && zrc != BZ_PARAM_ERROR)
+ log_fatal ("bz2lib inflate problem: %d\n", zrc );
+ for (n=0; n < outbufsize - bzs.avail_out; n++)
+ {
+ if (putc (outbuf[n], fpout) == EOF )
+ return 1;
+ }
+ }
+ }
+ while (zrc != BZ_STREAM_END && zrc != BZ_PARAM_ERROR);
+ BZ2_bzDecompressEnd(&bzs);
+
+ return 0;
+}
+#endif /* HAVE_BZIP2 */
+
+/* hdr must point to a buffer large enough to hold all header bytes */
+static int
+write_part ( const char *fname, FILE *fpin, unsigned long pktlen,
+ int pkttype, int partial, unsigned char *hdr, size_t hdrlen)
+{
+ FILE *fpout;
+ int c, first;
+ unsigned char *p;
+ const char *outname = create_filename (pkttype);
+
+#if defined(__riscos__) && defined(USE_ZLIBRISCOS)
+ static int initialized = 0;
+
+ if (!initialized)
+ initialized = riscos_load_module("ZLib", zlib_path, 1);
+#endif
+ if (opt_no_split)
+ fpout = stdout;
+ else
+ {
+ if (opt_verbose)
+ log_info ("writing `%s'\n", outname);
+ fpout = fopen (outname, "wb");
+ if (!fpout)
+ {
+ log_error ("error creating `%s': %s\n", outname, strerror(errno));
+ /* stop right now, otherwise we would mess up the sequence
+ of the part numbers */
+ g10_exit (1);
+ }
+ }
+
+ if (opt_secret_to_public
+ && (pkttype == PKT_SECRET_KEY || pkttype == PKT_SECRET_SUBKEY))
+ {
+ unsigned char *blob = xmalloc (pktlen);
+ int i, len;
+
+ pkttype = pkttype == PKT_SECRET_KEY? PKT_PUBLIC_KEY:PKT_PUBLIC_SUBKEY;
+
+ for (i=0; i < pktlen; i++)
+ {
+ c = getc (fpin);
+ if (c == EOF)
+ goto read_error;
+ blob[i] = c;
+ }
+ len = public_key_length (blob, pktlen);
+ if (!len)
+ {
+ log_error ("error calcualting public key length\n");
+ g10_exit (1);
+ }
+ if ( (hdr[0] & 0x40) )
+ {
+ if (write_new_header (fpout, pkttype, len))
+ goto write_error;
+ }
+ else
+ {
+ if (write_old_header (fpout, pkttype, len))
+ goto write_error;
+ }
+
+ for (i=0; i < len; i++)
+ {
+ if ( putc (blob[i], fpout) == EOF )
+ goto write_error;
+ }
+
+ goto ready;
+ }
+
+
+ if (!opt_uncompress)
+ {
+ for (p=hdr; hdrlen; p++, hdrlen--)
+ {
+ if ( putc (*p, fpout) == EOF )
+ goto write_error;
+ }
+ }
+
+ first = 1;
+ while (partial)
+ {
+ size_t partlen;
+
+ if (partial == 1)
+ { /* openpgp */
+ if (first )
+ {
+ c = pktlen;
+ assert( c >= 224 && c < 255 );
+ first = 0;
+ }
+ else if ((c = getc (fpin)) == EOF )
+ goto read_error;
+ else
+ hdr[hdrlen++] = c;
+
+ if (c < 192)
+ {
+ pktlen = c;
+ partial = 0; /* (last segment may follow) */
+ }
+ else if (c < 224 )
+ {
+ pktlen = (c - 192) * 256;
+ if ((c = getc (fpin)) == EOF)
+ goto read_error;
+ hdr[hdrlen++] = c;
+ pktlen += c + 192;
+ partial = 0;
+ }
+ else if (c == 255)
+ {
+ if (read_u32 (fpin, &pktlen))
+ goto read_error;
+ hdr[hdrlen++] = pktlen >> 24;
+ hdr[hdrlen++] = pktlen >> 16;
+ hdr[hdrlen++] = pktlen >> 8;
+ hdr[hdrlen++] = pktlen;
+ partial = 0;
+ }
+ else
+ { /* next partial body length */
+ for (p=hdr; hdrlen; p++, hdrlen--)
+ {
+ if ( putc (*p, fpout) == EOF )
+ goto write_error;
+ }
+ partlen = 1 << (c & 0x1f);
+ for (; partlen; partlen--)
+ {
+ if ((c = getc (fpin)) == EOF)
+ goto read_error;
+ if ( putc (c, fpout) == EOF )
+ goto write_error;
+ }
+ }
+ }
+ else if (partial == 2)
+ { /* old gnupg */
+ assert (!pktlen);
+ if ( read_u16 (fpin, &partlen) )
+ goto read_error;
+ hdr[hdrlen++] = partlen >> 8;
+ hdr[hdrlen++] = partlen;
+ for (p=hdr; hdrlen; p++, hdrlen--)
+ {
+ if ( putc (*p, fpout) == EOF )
+ goto write_error;
+ }
+ if (!partlen)
+ partial = 0; /* end of packet */
+ for (; partlen; partlen--)
+ {
+ c = getc (fpin);
+ if (c == EOF)
+ goto read_error;
+ if ( putc (c, fpout) == EOF )
+ goto write_error;
+ }
+ }
+ else
+ { /* compressed: read to end */
+ pktlen = 0;
+ partial = 0;
+ hdrlen = 0;
+ if (opt_uncompress)
+ {
+ if ((c = getc (fpin)) == EOF)
+ goto read_error;
+
+ if(c==1 || c==2)
+ {
+ if(handle_zlib(c,fpin,fpout))
+ goto write_error;
+ }
+#ifdef HAVE_BZIP2
+ else if(c==3)
+ {
+ if(handle_bzip2(c,fpin,fpout))
+ goto write_error;
+ }
+#endif /* HAVE_BZIP2 */
+ else
+ {
+ log_error("invalid compression algorithm (%d)\n",c);
+ goto read_error;
+ }
+ }
+ else
+ {
+ while ( (c=getc (fpin)) != EOF )
+ {
+ if ( putc (c, fpout) == EOF )
+ goto write_error;
+ }
+ }
+ if (!feof (fpin))
+ goto read_error;
+ }
+ }
+
+ for (p=hdr; hdrlen; p++, hdrlen--)
+ {
+ if ( putc (*p, fpout) == EOF )
+ goto write_error;
+ }
+
+ /* standard packet or last segment of partial length encoded packet */
+ for (; pktlen; pktlen--)
+ {
+ c = getc (fpin);
+ if (c == EOF)
+ goto read_error;
+ if ( putc (c, fpout) == EOF )
+ goto write_error;
+ }
+
+ ready:
+ if ( !opt_no_split && fclose (fpout) )
+ log_error ("error closing `%s': %s\n", outname, strerror (errno));
+ return 0;
+
+ write_error:
+ log_error ("error writing `%s': %s\n", outname, strerror (errno));
+ if (!opt_no_split)
+ fclose (fpout);
+ return 2;
+
+ read_error:
+ if (!opt_no_split)
+ {
+ int save = errno;
+ fclose (fpout);
+ errno = save;
+ }
+ return -1;
+}
+
+
+
+static int
+do_split (const char *fname, FILE *fp)
+{
+ int c, ctb, pkttype;
+ unsigned long pktlen = 0;
+ int partial = 0;
+ unsigned char header[20];
+ int header_idx = 0;
+
+ ctb = getc (fp);
+ if (ctb == EOF)
+ return 3; /* ready */
+ header[header_idx++] = ctb;
+
+ if (!(ctb & 0x80))
+ {
+ log_error("invalid CTB %02x\n", ctb );
+ return 1;
+ }
+ if ( (ctb & 0x40) )
+ { /* new CTB */
+ pkttype = (ctb & 0x3f);
+ if( (c = getc (fp)) == EOF )
+ return -1;
+ header[header_idx++] = c;
+
+ if ( c < 192 )
+ pktlen = c;
+ else if ( c < 224 )
+ {
+ pktlen = (c - 192) * 256;
+ if( (c = getc (fp)) == EOF )
+ return -1;
+ header[header_idx++] = c;
+ pktlen += c + 192;
+ }
+ else if ( c == 255 )
+ {
+ if (read_u32 (fp, &pktlen))
+ return -1;
+ header[header_idx++] = pktlen >> 24;
+ header[header_idx++] = pktlen >> 16;
+ header[header_idx++] = pktlen >> 8;
+ header[header_idx++] = pktlen;
+ }
+ else
+ { /* partial body length */
+ pktlen = c;
+ partial = 1;
+ }
+ }
+ else
+ {
+ int lenbytes;
+
+ pkttype = (ctb>>2)&0xf;
+ lenbytes = ((ctb&3)==3)? 0 : (1<<(ctb & 3));
+ if (!lenbytes )
+ {
+ pktlen = 0; /* don't know the value */
+ if( pkttype == PKT_COMPRESSED )
+ partial = 3;
+ else
+ partial = 2; /* the old GnuPG partial length encoding */
+ }
+ else
+ {
+ for ( ; lenbytes; lenbytes-- )
+ {
+ pktlen <<= 8;
+ if( (c = getc (fp)) == EOF )
+ return -1;
+ header[header_idx++] = c;
+
+ pktlen |= c;
+ }
+ }
+ }
+
+ return write_part (fname, fp, pktlen, pkttype, partial,
+ header, header_idx);
+}
+
+
+static void
+split_packets (const char *fname)
+{
+ FILE *fp;
+ int rc;
+
+ if (!fname || !strcmp (fname, "-"))
+ {
+ fp = stdin;
+ fname = "-";
+ }
+ else if ( !(fp = fopen (fname,"rb")) )
+ {
+ log_error ("can't open `%s': %s\n", fname, strerror (errno));
+ return;
+ }
+
+ while ( !(rc = do_split (fname, fp)) )
+ ;
+ if ( rc > 0 )
+ ; /* error already handled */
+ else if ( ferror (fp) )
+ log_error ("error reading `%s': %s\n", fname, strerror (errno));
+ else
+ log_error ("premature EOF while reading `%s'\n", fname );
+
+ if ( fp != stdin )
+ fclose (fp);
+}
diff --git a/tools/lspgpot b/tools/lspgpot
new file mode 100755
index 0000000..f406392
--- /dev/null
+++ b/tools/lspgpot
@@ -0,0 +1,27 @@
+#!/bin/sh
+# lspgpot - script to extract the ownertrust values
+# from PGP keyrings and list them in GnuPG ownertrust format.
+#
+# 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 program 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.
+
+if ! gpg --version > /dev/null 2>&1 ; then
+ echo "GnuPG not available!"
+ exit 1
+fi
+
+gpg --dry-run --with-fingerprint --with-colons $* | awk '
+BEGIN { FS=":"
+ printf "# Ownertrust listing generated by lspgpot\n"
+ printf "# This can be imported using the command:\n"
+ printf "# gpg --import-ownertrust\n\n" }
+$1 == "fpr" { fpr = $10 }
+$1 == "rtv" && $2 == 1 && $3 == 2 { printf "%s:3:\n", fpr; next }
+$1 == "rtv" && $2 == 1 && $3 == 5 { printf "%s:4:\n", fpr; next }
+$1 == "rtv" && $2 == 1 && $3 == 6 { printf "%s:5:\n", fpr; next }
+'
diff --git a/tools/mail-signed-keys b/tools/mail-signed-keys
new file mode 100755
index 0000000..80fbb34
--- /dev/null
+++ b/tools/mail-signed-keys
@@ -0,0 +1,114 @@
+#!/bin/sh
+# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+#
+# 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 program 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.
+
+# FIXME: Add --dry-run, use only valid email addreses, extract only given keys
+
+dryrun=0
+if [ "$1" = "--dry-run" ]; then
+ dryrun=1
+ shift
+fi
+
+if [ -z "$1" -o -z "$2" -o -z "$3" ]; then
+ echo "usage: mail-signed-keys keyring signedby signame" >&2
+ exit 1
+fi
+
+signame="$3"
+
+if [ ! -f $1 ]; then
+ echo "mail-signed-keys: '$1': no such file" >&2
+ exit 1
+fi
+
+[ -f '.#tdb.tmp' ] && rm '.#tdb.tmp'
+ro="--homedir . --no-options --trustdb-name=./.#tdb.tmp --dry-run --lock-never --no-default-keyring --keyring $1"
+
+signedby=`gpg $ro --list-keys --with-colons $2 \
+ 2>/dev/null | awk -F: '$1=="pub" {print $5; exit 0}'`
+
+if [ -z "$signedby" ]; then
+ echo "mail-signed-keys: '$2': no such signator" >&2
+ exit 1
+fi
+
+if [ "$dryrun" = "0" ]; then
+ echo "About to send the the keys signed by $signedby" >&2
+ echo -n "to their owners. Do you really want to do this? (y/N)" >&2
+ read
+ [ "$REPLY" != "y" -a "$REPLY" != "Y" ] && exit 0
+fi
+
+gpg $ro --check-sigs --with-colons 2>/dev/null \
+ | awk -F: -v signedby="$signedby" -v gpgopt="$ro" \
+ -v dryrun="$dryrun" -v signame="$signame" '
+BEGIN { sendmail="/usr/lib/sendmail -oi -t " }
+$1 == "pub" { nextkid=$5; nextuid=$10
+ if( uidcount > 0 ) { myflush() }
+ kid=nextkid; uid=nextuid; next
+ }
+$1 == "uid" { uid=$10 ; next }
+$1 == "sig" && $2 == "!" && $5 == signedby { uids[uidcount++] = uid; next }
+END { if( uidcount > 0 ) { myflush() } }
+
+function myflush()
+{
+ if ( kid == signedby ) { uidcount=0; return }
+ print "sending key " substr(kid,9) " to" | "cat >&2"
+ for(i=0; i < 1; i++ ) {
+ print " " uids[i] | "cat >&2"
+ if( dryrun == 0 ) {
+ if( i == 0 ) {
+ printf "To: %s", uids[i] | sendmail
+ }
+ else {
+ printf ",\n %s", uids[i] | sendmail
+ }
+ }
+ }
+ if(dryrun == 0) {
+ printf "\n" | sendmail
+ print "Subject: I signed your key " substr(kid,9) | sendmail
+ print "" | sendmail
+ print "Hi," | sendmail
+ print "" | sendmail
+ print "Here you get back the signed key." | sendmail
+ print "Please send it yourself to a keyserver." | sendmail
+ print "" | sendmail
+ print "Peace," | sendmail
+ print " " signame | sendmail
+ print "" | sendmail
+ cmd = "gpg " gpgopt " --export -a " kid " 2>/dev/null"
+ while( (cmd | getline) > 0 ) {
+ print | sendmail
+ }
+ print "" | sendmail
+ close(cmd)
+ close( sendmail )
+ }
+ uidcount=0
+}
+'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/make-dns-cert.c b/tools/make-dns-cert.c
new file mode 100644
index 0000000..496b63b
--- /dev/null
+++ b/tools/make-dns-cert.c
@@ -0,0 +1,239 @@
+/* make-dns-cert.c - An OpenPGP-to-DNS CERT conversion tool
+ * Copyright (C) 2006 Free Software Foundation, Inc.
+ *
+ * This file is part of GnuPG.
+ *
+ * GnuPG is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GnuPG is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ */
+
+#include <config.h>
+#include <unistd.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+/* We use TYPE37 instead of CERT since not all nameservers can handle
+ CERT yet... */
+
+static int
+cert_key(const char *name,const char *keyfile)
+{
+ int fd,ret=1,err,i;
+ struct stat statbuf;
+
+ fd=open(keyfile,O_RDONLY);
+ if(fd==-1)
+ {
+ fprintf(stderr,"Cannot open key file %s: %s\n",keyfile,strerror(errno));
+ return 1;
+ }
+
+ err=fstat(fd,&statbuf);
+ if(err==-1)
+ {
+ fprintf(stderr,"Unable to stat key file %s: %s\n",
+ keyfile,strerror(errno));
+ goto fail;
+ }
+
+ if(statbuf.st_size>65536)
+ {
+ fprintf(stderr,"Key %s too large for CERT encoding\n",keyfile);
+ goto fail;
+ }
+
+ if(statbuf.st_size>16384)
+ fprintf(stderr,"Warning: key file %s is larger than the default"
+ " GnuPG max-cert-size\n",keyfile);
+
+ printf("%s\tTYPE37\t\\# %u 0003 0000 00 ",
+ name,(unsigned int)statbuf.st_size+5);
+
+ err=1;
+ while(err!=0)
+ {
+ unsigned char buffer[1024];
+
+ err=read(fd,buffer,1024);
+ if(err==-1)
+ {
+ fprintf(stderr,"Unable to read key file %s: %s\n",
+ keyfile,strerror(errno));
+ goto fail;
+ }
+
+ for(i=0;i<err;i++)
+ printf("%02X",buffer[i]);
+ }
+
+ printf("\n");
+
+ ret=0;
+
+ fail:
+ close(fd);
+
+ return ret;
+}
+
+static int
+url_key(const char *name,const char *fpr,const char *url)
+{
+ int len=6,fprlen=0;
+
+ if(fpr)
+ {
+ const char *tmp = fpr;
+ while (*tmp)
+ {
+ if ((*tmp >= 'A' && *tmp <= 'F') ||
+ (*tmp >= 'a' && *tmp <= 'f') ||
+ (*tmp >= '0' && *tmp <= '9'))
+ {
+ fprlen++;
+ }
+ else if (*tmp != ' ' && *tmp != '\t')
+ {
+ fprintf(stderr,"Fingerprint must consist of only hex digits"
+ " and whitespace\n");
+ return 1;
+ }
+
+ tmp++;
+ }
+
+ if(fprlen%2)
+ {
+ fprintf(stderr,"Fingerprint must be an even number of characters\n");
+ return 1;
+ }
+
+ fprlen/=2;
+ len+=fprlen;
+ }
+
+ if(url)
+ len+=strlen(url);
+
+ if(!fpr && !url)
+ {
+ fprintf(stderr,
+ "Cannot generate a CERT without either a fingerprint or URL\n");
+ return 1;
+ }
+
+ printf("%s\tTYPE37\t\\# %d 0006 0000 00 %02X",name,len,fprlen);
+
+ if(fpr)
+ printf(" %s",fpr);
+
+ if(url)
+ {
+ const char *c;
+ printf(" ");
+ for(c=url;*c;c++)
+ printf("%02X",*c);
+ }
+
+ printf("\n");
+
+ return 0;
+}
+
+static void
+usage(FILE *stream)
+{
+ fprintf(stream,"make-dns-cert\n");
+ fprintf(stream,"\t-f\tfingerprint\n");
+ fprintf(stream,"\t-u\tURL\n");
+ fprintf(stream,"\t-k\tkey file\n");
+ fprintf(stream,"\t-n\tDNS name\n");
+}
+
+int
+main(int argc,char *argv[])
+{
+ int arg,err=1;
+ char *fpr=NULL,*url=NULL,*keyfile=NULL,*name=NULL;
+
+ if(argc==1)
+ {
+ usage(stderr);
+ return 1;
+ }
+ else if(argc>1 && strcmp(argv[1],"--version")==0)
+ {
+ printf("make-dns-cert (GnuPG) " VERSION "\n");
+ return 0;
+ }
+ else if(argc>1 && strcmp(argv[1],"--help")==0)
+ {
+ usage(stdout);
+ return 0;
+ }
+
+ while((arg=getopt(argc,argv,"hf:u:k:n:"))!=-1)
+ switch(arg)
+ {
+ default:
+ case 'h':
+ usage(stdout);
+ exit(0);
+
+ case 'f':
+ fpr=optarg;
+ break;
+
+ case 'u':
+ url=optarg;
+ break;
+
+ case 'k':
+ keyfile=optarg;
+ break;
+
+ case 'n':
+ name=optarg;
+ break;
+ }
+
+ if(!name)
+ {
+ fprintf(stderr,"No name provided\n");
+ return 1;
+ }
+
+ if(keyfile && (fpr || url))
+ {
+ fprintf(stderr,"Cannot generate a CERT record with both a keyfile and"
+ " a fingerprint or URL\n");
+ return 1;
+ }
+
+ if(keyfile)
+ err=cert_key(name,keyfile);
+ else
+ err=url_key(name,fpr,url);
+
+ return err;
+}
diff --git a/tools/mk-tdata.c b/tools/mk-tdata.c
new file mode 100644
index 0000000..833875d
--- /dev/null
+++ b/tools/mk-tdata.c
@@ -0,0 +1,67 @@
+/* mk-tdata.c - Create some simple random testdata
+ * Copyright (C) 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
+ *
+ * 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 program 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.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+
+#ifndef RAND_MAX /* for SunOS */
+#define RAND_MAX 32767
+#endif
+
+int
+main(int argc, char **argv)
+{
+ int i, c = 0;
+ int limit =0;
+ int char_mode = 0;
+
+ if (argc)
+ {
+ argc--;
+ argv++;
+ }
+
+ /* Check for option --char N */
+ if (argc > 1 && !strcmp (argv[0], "--char"))
+ {
+ char_mode = 1;
+ c = strtol (argv[1], NULL, 0);
+ argc -= 2;
+ argv += 2;
+ }
+
+ limit = argc ? atoi(argv[0]) : 0;
+
+ srand(getpid());
+
+ for (i=0; !limit || i < limit; i++ )
+ {
+ if (char_mode)
+ {
+ putchar (c);
+ }
+ else
+ {
+#ifdef HAVE_RAND
+ c = ((unsigned)(1 + (int) (256.0*rand()/(RAND_MAX+1.0)))-1);
+#else
+ c = ((unsigned)(1 + (int) (256.0*random()/(RAND_MAX+1.0)))-1);
+#endif
+ putchar (c);
+ }
+ }
+ return 0;
+}
diff --git a/tools/mpicalc.c b/tools/mpicalc.c
new file mode 100644
index 0000000..915dcc3
--- /dev/null
+++ b/tools/mpicalc.c
@@ -0,0 +1,385 @@
+/* mpitest.c - test the mpi functions
+ * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ *
+ * This is an RPN calculator; values must be given in hex.
+ * Operation is like dc(1) except that the input/output radix is
+ * always 16 and you can use a '-' to prefix a negative number.
+ * Addition operators: ++ and --. All operators must be delimited by a blank
+ *
+ *
+ * This file is part of GnuPG.
+ *
+ * GnuPG is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GnuPG is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+#include "util.h"
+#include "mpi.h"
+#include "i18n.h"
+
+#define STACKSIZE 100
+static MPI stack[STACKSIZE];
+static int stackidx;
+
+
+const char *
+strusage( int level )
+{
+ const char *p;
+ switch( level ) {
+ case 10:
+ case 0: p = "mpicalc - v" VERSION "; "
+ "Copyright 1997 Werner Koch (dd9jn)" ; break;
+ case 13: p = "mpicalc"; break;
+ case 14: p = VERSION; break;
+ case 1:
+ case 11: p = "Usage: mpicalc (-h for help)";
+ break;
+ case 2:
+ case 12: p =
+ "\nSyntax: mpicalc [options] [files]\n"
+ "MPI RPN calculator\n";
+ break;
+ default: p = default_strusage(level);
+ }
+ return p;
+}
+
+
+static void
+i18n_init(void)
+{
+#ifdef ENABLE_NLS
+ setlocale( LC_ALL, "" );
+ bindtextdomain( PACKAGE, G10_LOCALEDIR );
+ textdomain( PACKAGE );
+#endif
+}
+
+
+static void
+do_add(void)
+{
+ if( stackidx < 2 ) {
+ fputs("stack underflow\n",stderr);
+ return;
+ }
+ mpi_add( stack[stackidx-2], stack[stackidx-2], stack[stackidx-1] );
+ stackidx--;
+}
+
+static void
+do_sub(void)
+{
+ if( stackidx < 2 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ mpi_sub( stack[stackidx-2], stack[stackidx-2], stack[stackidx-1] );
+ stackidx--;
+}
+
+static void
+do_inc(void)
+{
+ if( stackidx < 1 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ mpi_add_ui( stack[stackidx-1], stack[stackidx-1], 1 );
+}
+
+static void
+do_dec(void)
+{
+ if( stackidx < 1 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ /* mpi_sub_ui( stack[stackidx-1], stack[stackidx-1], 1 ); */
+}
+
+static void
+do_mul(void)
+{
+ if( stackidx < 2 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ mpi_mul( stack[stackidx-2], stack[stackidx-2], stack[stackidx-1] );
+ stackidx--;
+}
+
+static void
+do_mulm(void)
+{
+ if( stackidx < 3 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ mpi_mulm( stack[stackidx-3], stack[stackidx-3],
+ stack[stackidx-2], stack[stackidx-1] );
+ stackidx -= 2;
+}
+
+static void
+do_div(void)
+{
+ if( stackidx < 2 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ mpi_fdiv_q( stack[stackidx-2], stack[stackidx-2], stack[stackidx-1] );
+ stackidx--;
+}
+
+static void
+do_rem(void)
+{
+ if( stackidx < 2 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ mpi_fdiv_r( stack[stackidx-2], stack[stackidx-2], stack[stackidx-1] );
+ stackidx--;
+}
+
+static void
+do_powm(void)
+{
+ MPI a;
+ if( stackidx < 3 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ a= mpi_alloc(10);
+ mpi_powm( a, stack[stackidx-3], stack[stackidx-2], stack[stackidx-1] );
+ mpi_free(stack[stackidx-3]);
+ stack[stackidx-3] = a;
+ stackidx -= 2;
+}
+
+static void
+do_inv(void)
+{
+ MPI a = mpi_alloc(40);
+ if( stackidx < 2 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ mpi_invm( a, stack[stackidx-2], stack[stackidx-1] );
+ mpi_set(stack[stackidx-2],a);
+ mpi_free(a);
+ stackidx--;
+}
+
+static void
+do_gcd(void)
+{
+ MPI a = mpi_alloc(40);
+ if( stackidx < 2 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ mpi_gcd( a, stack[stackidx-2], stack[stackidx-1] );
+ mpi_set(stack[stackidx-2],a);
+ mpi_free(a);
+ stackidx--;
+}
+
+static void
+do_rshift(void)
+{
+ if( stackidx < 1 ) {
+ fputs("stack underflow\n", stderr);
+ return;
+ }
+ mpi_rshift( stack[stackidx-1],stack[stackidx-1], 1 );
+}
+
+
+int
+main(int argc, char **argv)
+{
+ static ARGPARSE_OPTS opts[] = {
+ {0} };
+ ARGPARSE_ARGS pargs;
+ int i, c;
+ int state = 0;
+ char strbuf[1000];
+ int stridx=0;
+
+ pargs.argc = &argc;
+ pargs.argv = &argv;
+ pargs.flags = 0;
+
+ i18n_init();
+ while( arg_parse( &pargs, opts) ) {
+ switch( pargs.r_opt ) {
+ default : pargs.err = 2; break;
+ }
+ }
+ if( argc )
+ usage(1);
+
+
+ for(i=0; i < STACKSIZE; i++ )
+ stack[i] = NULL;
+ stackidx =0;
+
+ while( (c=getc(stdin)) != EOF ) {
+ if( !state ) { /* waiting */
+ if( isdigit(c) ) {
+ state = 1;
+ ungetc(c, stdin);
+ strbuf[0] = '0';
+ strbuf[1] = 'x';
+ stridx=2;
+ }
+ else if( isspace(c) )
+ ;
+ else {
+ switch(c) {
+ case '+':
+ if( (c=getc(stdin)) == '+' )
+ do_inc();
+ else {
+ ungetc(c, stdin);
+ do_add();
+ }
+ break;
+ case '-':
+ if( (c=getc(stdin)) == '-' )
+ do_dec();
+ else if( isdigit(c) || (c >='A' && c <= 'F') ) {
+ state = 1;
+ ungetc(c, stdin);
+ strbuf[0] = '-';
+ strbuf[1] = '0';
+ strbuf[2] = 'x';
+ stridx=3;
+ }
+ else {
+ ungetc(c, stdin);
+ do_sub();
+ }
+ break;
+ case '*':
+ do_mul();
+ break;
+ case 'm':
+ do_mulm();
+ break;
+ case '/':
+ do_div();
+ break;
+ case '%':
+ do_rem();
+ break;
+ case '^':
+ do_powm();
+ break;
+ case 'I':
+ do_inv();
+ break;
+ case 'G':
+ do_gcd();
+ break;
+ case '>':
+ do_rshift();
+ break;
+ case 'i': /* dummy */
+ if( !stackidx )
+ fputs("stack underflow\n", stderr);
+ else {
+ mpi_free(stack[stackidx-1]);
+ stackidx--;
+ }
+ break;
+ case 'd': /* duplicate the tos */
+ if( !stackidx )
+ fputs("stack underflow\n", stderr);
+ else if( stackidx < STACKSIZE ) {
+ mpi_free(stack[stackidx]);
+ stack[stackidx] = mpi_copy( stack[stackidx-1] );
+ stackidx++;
+ }
+ else
+ fputs("stack overflow\n", stderr);
+ break;
+ case 'c':
+ for(i=0; i < stackidx; i++ )
+ mpi_free(stack[i]), stack[i] = NULL;
+ stackidx = 0;
+ break;
+ case 'p': /* print the tos */
+ if( !stackidx )
+ puts("stack is empty");
+ else {
+ mpi_print(stdout, stack[stackidx-1], 1 );
+ putchar('\n');
+ }
+ break;
+ case 'f': /* print the stack */
+ for( i = stackidx-1 ; i >= 0; i-- ) {
+ printf("[%2d]: ", i );
+ mpi_print(stdout, stack[i], 1 );
+ putchar('\n');
+ }
+ break;
+ default:
+ fputs("invalid operator\n", stderr);
+ }
+ }
+ }
+ else if( state == 1 ) { /* in a number */
+ if( !isxdigit(c) ) { /* store the number */
+ state = 0;
+ ungetc(c, stdin);
+ if( stridx < 1000 )
+ strbuf[stridx] = 0;
+
+ if( stackidx < STACKSIZE ) {
+ if( !stack[stackidx] )
+ stack[stackidx] = mpi_alloc(10);
+ if( mpi_fromstr(stack[stackidx], strbuf) )
+ fputs("invalid number\n", stderr);
+ else
+ stackidx++;
+ }
+ else
+ fputs("stack overflow\n", stderr);
+ }
+ else { /* store digit */
+ if( stridx < 999 )
+ strbuf[stridx++] = c;
+ else if( stridx == 999 ) {
+ strbuf[stridx] = 0;
+ fputs("string too large - truncated\n", stderr);
+ stridx++;
+ }
+ }
+ }
+
+ }
+ for(i=0; i < stackidx; i++ )
+ mpi_free(stack[i]);
+ return 0;
+}
diff --git a/tools/ring-a-party b/tools/ring-a-party
new file mode 100755
index 0000000..01e0f3f
--- /dev/null
+++ b/tools/ring-a-party
@@ -0,0 +1,114 @@
+#!/bin/sh
+# ring-a-party - print a keyring suitable for a key signing party
+# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+#
+# 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 program 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.
+
+if [ $# -lt 1 ]; then
+ echo "usage: ring-a-party keyring [headerline]" >&2
+ exit 1
+fi
+
+keyring="$1"
+hdrline="$1"
+if [ $# -gt 1 ]; then
+ hdrline="$2"
+fi
+
+if [ ! -f $keyring ]; then
+ echo "ring-a-party: '$keyring': no such file" >&2
+ exit 1
+fi
+
+echo "ring-a-party: output will be written to 'a.pub'" >&2
+
+
+gpg --dry-run --with-fingerprint --with-colons $keyring \
+ | gawk -v "KEYRING=$hdrline" '
+BEGIN { FS=":"
+ algos[1] = "RSA";
+ algos[16] = "Elgamal";
+ algos[17] = "DSA";
+ any = 0;
+ lines = -1;
+ page = 0;
+ now = strftime("%b %d %H:%M %Y");
+ }
+END {
+ if (any) myflush();
+}
+$1 == "pub" {
+ if( any ) myflush();
+ uidcount = 0;
+ signencrypt = 0;
+ uids[uidcount++] = $10;
+ nbits = $3;
+ keyid = substr($5,9);
+ created = $6;
+ expires = $7;
+ algostr = mapalgo($4);
+ if( $4 == 20 || $4 == 1 ) signencrypt = 1;
+ any = 1;
+ }
+$1 == "fpr" { fpr = $10 }
+$1 == "uid" { uids[uidcount++] = $10 }
+$1 == "sub" { if( $4 != 17 && $4 != 3 ) signencrypt=1 }
+
+function myflush()
+{
+ # fixme: take lines to print here into account
+ if( lines > 45 || lines == -1 ) {
+ if( lines != -1 ) printf "\f";
+ page++;
+ printf "%s %-50.50s Page %d\n\n", now, KEYRING, page ;
+ printf " Type Bits KeyID Created Expires Algorithm Use\n\n";
+ lines = 1;
+ }
+ printf "[ ] pub %04d 0x%s %10s %10s %-10s %15s\n",
+ nbits, keyid, created, expires == ""? "----------":expires, algostr,
+ signencrypt == 1? "Sign & Encrypt":"Sign only";
+ length(fpr) == 40 ? printfpr20( fpr ) : printfpr16( fpr );
+ lnes += 2;
+ for( i=0; i < uidcount; i++ ) {
+ printf "( ) uid %s\n", uids[i];
+ lines++;
+ }
+ printf "\n\n";
+ lines += 2;
+}
+
+function mapalgo( no )
+{
+ if( no in algos )
+ return algos[no];
+ return sprintf( "algoID=%ds", no );
+}
+
+
+function printfpr16( s )
+{
+ printf " f16 Fingerprint16 =";
+ for(i=0; i < 16; i++ ) {
+ if( i == 8 ) printf " ";
+ printf " %s", substr( s, i*2+1, 2 );
+ }
+ printf "\n"
+}
+
+function printfpr20( s )
+{
+ printf " f20 Fingerprint20 =";
+ for(i=0; i < 10; i++ ) {
+ if( i == 5 ) printf " ";
+ printf " %s", substr( s, i*4+1, 4 );
+ }
+ printf "\n"
+}
+
+' | tee a.pub | gpg --print-mds
diff --git a/tools/shmtest.c b/tools/shmtest.c
new file mode 100644
index 0000000..f483405
--- /dev/null
+++ b/tools/shmtest.c
@@ -0,0 +1,201 @@
+/* shmtest.c
+ * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ *
+ * 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 program 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.
+ */
+
+
+#include <config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <signal.h>
+#include <unistd.h>
+#ifdef HAVE_SYS_IPC_H
+#include <sys/types.h>
+#include <sys/ipc.h>
+#endif
+#ifdef HAVE_SYS_SHM_H
+#include <sys/shm.h>
+#endif
+#include "util.h"
+#include "ttyio.h"
+#include "i18n.h"
+
+#ifdef HAVE_DOSISH_SYSTEM
+int main( int argc, char **argv )
+{
+ fprintf(stderr, "Sorry, not yet available for DOSish systems\n");
+ exit(1);
+}
+#else
+
+static int serverpid = -1;
+
+static void
+my_usage(void)
+{
+ fprintf(stderr, "usage: shmtest gpg-command-line\n");
+ exit(1);
+}
+
+const char *
+strusage( int level )
+{
+ return default_strusage(level);
+}
+
+static void
+i18n_init(void)
+{
+#ifdef ENABLE_NLS
+ setlocale( LC_ALL, "" );
+ bindtextdomain( PACKAGE, G10_LOCALEDIR );
+ textdomain( PACKAGE );
+#endif
+}
+
+
+static void
+do_get_string( int mode, const char *keyword, byte *area, size_t areasize )
+{
+ size_t n, len;
+ char *p=NULL;
+ int yes=0;
+
+ n = area[0] << 8 | area[1];
+ /* fixme: do some sanity checks here */
+ if( mode == 1 )
+ p = tty_get( keyword );
+ else if( mode == 3 )
+ p = tty_get_hidden( keyword );
+ else
+ yes = tty_get_answer_is_yes( keyword );
+ if( p ) {
+ len = strlen(p);
+ memcpy( area+n+2, p, len );
+ area[n] = len >> 8;
+ area[n+1] = len;
+ xfree(p);
+ }
+ else { /* bool */
+ area[n] = 0;
+ area[n+1] = 1;
+ area[n+2] = yes;
+ }
+ area[3] = 1; /* we should better use a semaphore */
+ kill( serverpid, SIGUSR1 );
+}
+
+
+
+int
+main(int argc, char **argv)
+{
+ void *area = NULL;
+ size_t areasize = 4096;
+ int shm_id = -1;
+ FILE *fp;
+ char buf[200];
+ char *p, *p2;
+ size_t n;
+ int i;
+
+ log_set_name("shmtest");
+ i18n_init();
+#ifndef USE_SHM_COPROCESSING
+ log_info("SHM_COPRPOCESSING is not available\n");
+#else
+ if( argc < 1 )
+ my_usage();
+
+ for(n=0,i=1; i < argc; i++ )
+ n += strlen(argv[i]) + 1;
+ p = xmalloc( 100 + n );
+ strcpy( p, "../g10/gpg --status-fd 1 --run-as-shm-coprocess 0");
+ for(i=1; i < argc; i++ ) {
+ strcat(p, " " );
+ strcat(p, argv[i] );
+ }
+
+ fp = popen( p, "r" );
+ xfree( p );
+ if( !fp )
+ log_error("popen failed: %s\n", strerror(errno));
+
+ while ( fgets (buf, sizeof (buf) - 1, fp ) != NULL ) {
+ size_t len = strlen(buf);
+ if( len >= 9 && !memcmp( buf, "[GNUPG:] ", 9 ) ) {
+ int word=0;
+ int is_info = 0, is_get = 0;
+
+ for( p = strtok(buf+9, " \n"); p ; p = strtok(NULL, " \n")) {
+ word++;
+ if( word==1 && !strcmp(p,"SHM_INFO") ) {
+ if( !area )
+ is_info=1;
+ else
+ log_error("duplicate SHM_INFO ignored\n" );
+ }
+ else if( is_info && (p2 = strchr(p, '=' )) ) {
+ int val;
+ *p2++ = 0;
+ val = atoi(p2); /* should be atou() for some values */
+ if( !strcmp(p, "pv" ) ) {
+ if( atoi(p2) != 1 )
+ log_fatal("invalid protocol version %d\n", val );
+ is_info = 2;
+ }
+ else if( !strcmp(p, "pid" ) )
+ serverpid = val;
+ else if( !strcmp(p, "shmid" ) )
+ shm_id = val;
+ }
+ else if( word == 1 && !strcmp(p,"SHM_GET") )
+ is_get = 1;
+ else if( word == 1 && !strcmp(p,"SHM_GET_BOOL") )
+ is_get = 2;
+ else if( word == 1 && !strcmp(p,"SHM_GET_HIDDEN") )
+ is_get = 3;
+ else if( word == 2 && is_get ) {
+ do_get_string( is_get, p, area, areasize );
+ break;
+ }
+ else if( word == 1 )
+ log_info("Status: %s\n", p);
+ }
+ if( is_info ) {
+ if( is_info < 2 )
+ log_fatal("SHM info without protocol version\n");
+ if( serverpid == -1 )
+ log_fatal("SHM info without server's pid\n");
+ if( shm_id == -1 )
+ log_fatal("SHM info without id\n");
+ log_info("Shared memory info: server=%d shm_id=%d\n",
+ serverpid, shm_id);
+ area = shmat( shm_id, 0, 0 );
+ if( area == (void*)-1 )
+ log_fatal("attach to shared memory failed: %s\n",
+ strerror(errno));
+ }
+ }
+ else
+ fputs (buf, stdout);
+ }
+
+
+ if( pclose(fp) )
+ log_error("pclose failed\n");
+
+ return 0;
+#endif
+}
+
+#endif