1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

release 0.2.9

This commit is contained in:
Werner Koch 1998-02-26 16:56:31 +00:00
parent 5a05af2bca
commit 4e8c3794b3
53 changed files with 1662 additions and 977 deletions

263
ABOUT-NLS
View File

@ -1,16 +1,16 @@
Notes on the GNU Translation Project
************************************
Notes on the Free Translation Project
*************************************
GNU is going international! The GNU Translation Project is a way to
get maintainers, translators and users all together, so GNU will
gradually become able to speak many native languages. A few packages
already provide native language translation for their messages.
Free software is going international! The Free Translation Project
is a way to get maintainers of free software, translators, and users all
together, so that will gradually become able to speak many languages.
A few packages already provide translations for their messages.
If you found this `ABOUT-NLS' file inside a GNU distribution, you
may assume that the distributed package does use GNU `gettext'
internally, itself available at your nearest GNU archive site. But you
do not need to install GNU `gettext' prior to configuring, installing
or using this package with messages translated.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
itself available at your nearest GNU archive site. But you do *not*
need to install GNU `gettext' prior to configuring, installing or using
this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
@ -25,60 +25,85 @@ related to internationalization, you should tell about the version of
One advise in advance
=====================
If you want to exploit the full power of the GNU `gettext' package
you should configure it using
If you want to exploit the full power of internationalization, you
should configure it using
--with-gnu-gettext.
./configure --with-included-gettext
No existing implementation at this point provides so many useful
features (such as locale alias or message inheritance). It is also not
possible to provide this additional functionality on top of a catgets
implementation.
to force usage of internationalizing routines provided within this
package, despite the existence of internationalizing capabilities in the
operating system where this package is being installed. So far, only
the `gettext' implementation in the GNU C library version 2 provides as
many features (such as locale alias or message inheritance) as the
implementation here. It is also not possible to offer this additional
functionality on top of a `catgets' implementation. Future versions of
GNU `gettext' will very likely convey even more functionality. So it
might be a good idea to change to GNU `gettext' as soon as possible.
Future versions of GNU `gettext' will very likely provide even more
functionality. So it might be a good idea to change to GNU `gettext'
as soon as possible.
So you need not provide this option if you are using GNU libc 2 or
you have installed a recent copy of the GNU gettext package with the
included `libintl'.
INSTALL Matters
===============
Some GNU packages are "localizable" when properly installed; the
Some packages are "localizable" when properly installed; the
programs they contain can be made to speak your own native language.
Most such packages use GNU `gettext'. Other packages have their own
ways to internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system provides
usable `catgets' or `gettext' functions. If neither is available, the
GNU `gettext' own library will be used. However, installers may use
special options at configuration time for changing this behaviour. The
commands:
usable `catgets' (if using this is selected by the installer) or
`gettext' functions. If neither is available, the GNU `gettext' own
library will be used. This library is wholly contained within this
package, usually in the `intl/' subdirectory, so prior installation of
the GNU `gettext' package is *not* required. Installers may use
special options at configuration time for changing the default
behaviour. The commands:
./configure --with-gnu-gettext
./configure --with-included-gettext
./configure --with-catgets
./configure --disable-nls
will respectively bypass system `catgets' or `gettext' to use GNU
`gettext', or else, totally disable translation of messages.
will respectively bypass any pre-existing `catgets' or `gettext' to use
the internationalizing routines provided within this package, enable
the use of the `catgets' functions (if found on the locale system), or
else, *totally* disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, configure will
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-gnu-gettext
./configure --with-included-gettext
to prevent auto-detection.
By default the configuration process will not test for the `catgets'
function and therefore they will not be used. The reasons are already
given above: the emulation on top of `catgets' cannot provide all the
extensions provided by the GNU `gettext' library. If you nevertheless
want to use the `catgets' functions use
./configure --with-catgets
to enable the test for `catgets' (this causes no harm if `catgets' is
not available on your system). If you really select this option we
would like to hear about the reasons because we cannot think of any
good one ourself.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations are disabled, all those available are installed together
with the package. However, the environment variable `LINGUAS' may be
set, prior to configuration, to limit the installed set. `LINGUAS'
should then contain a space separated list of two-letter codes, stating
which languages are allowed.
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
together with the package. However, the environment variable `LINGUAS'
may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
Using This Package
==================
@ -87,117 +112,115 @@ Using This Package
only have to set the `LANG' environment variable to the appropriate
ISO 639 `LL' two-letter code prior to using the programs in the
package. For example, let's suppose that you speak German. At the
shell prompt, merely execute `setenv LANG de' (in `csh') or
`export LANG; LANG=de' (in `sh'). This can be done from your `.login'
or `.profile' file, once and for all. Packages which are not
internationalized will merely ignore the setting of this variable.
shell prompt, merely execute `setenv LANG de' (in `csh'),
`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
can be done from your `.login' or `.profile' file, once and for all.
An operating system might already offer message localization for
many of its programs, while other programs have been installed locally
with the full capabilities of GNU `gettext'. Just using `gettext'
extended syntax for `LANG' would break proper localization of already
available operating system programs. In this case, users should set
both `LANGUAGE' and `LANG' variables in their environment, as programs
using GNU `gettext' give preference to `LANGUAGE'. For example, some
Swedish users would rather read translations in German than English for
when Swedish is not available. This is easily accomplished by setting
`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
Translating Teams
=================
The GNU `gettext' tool set contains *everything* maintainers need
for internationalizing their packages for messages. It also contains
quite useful tools for helping translators at localizing messages to
their native language, once a package has already been
internationalized.
To achieve the GNU Translation Project, we need many interested
For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translating team has its own mailing list, courtesy of Linux
International. You may reach your translating team at the address
Each translation team has its own mailing list, courtesy of Linux
International. You may reach your translation team at the address
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
language. Language codes are *not* the same as country codes given in
ISO 3166. The following translating teams exist, as of November 1995:
language. Language codes are *not* the same as the country codes given
in ISO 3166. The following translation teams exist, as of December
1997:
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
Esperanto `eo', Finnish `fi', French `fr', Irish `ga', German
`de', Greek `el', Italian `it', Japanese `ja', Indonesian `in',
Norwegian `no', Persian `fa', Polish `pl', Portuguese `pt',
Russian `ru', Spanish `es', Swedish `sv', Telugu `te' and Turkish
`tr'.
Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
`hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
`pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
Swedish `sv', and Turkish `tr'.
For example, you may reach the Chinese translating team by writing to
For example, you may reach the Chinese translation team by writing to
`zh@li.org'.
If you'd like to volunteer to *work* at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is *not* the same as the list itself, it has
`-request' appended. For example, Swedish people can send a message to
`sv-request@li.org', having this message body:
`-request' appended. For example, speakers of Swedish can send a
message to `sv-request@li.org', having this message body:
subscribe
Keep in mind that team members should be interested in *working* at
translations, or at solving translational difficulties, rather than
merely lurking around. If your team does not exist yet and you want to
start one, please write to `gnu-translation@prep.ai.mit.edu'; you will
then reach the GNU coordinator for all translator teams.
Keep in mind that team members are expected to participate
*actively* in translations, or at solving translational difficulties,
rather than merely lurking around. If your team does not exist yet and
you want to start one, or if you are unsure about what to do or how to
get started, please write to `translation@iro.umontreal.ca' to reach the
coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology used in GNU. Proven linguistic skill are praised more
than programming skill, here. For the time being, please avoid
subscribing to the English team unless explicitely invited to do so.
the terminology in use. Proven linguistic skill are praised more than
programming skill, here.
Available Packages
==================
Languages are not equally supported in all GNU packages. The
following matrix shows the current state of GNU internationalization,
as of November 1995. Listed are: internationalized packages, and
languages for which work is in progress, or about to start.
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of December
1997. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination.
See note cs de en fr it ja nl no pt sv
\ .-------------------------------.
chess (1) | X / X |
clisp | X X X |
diffutils (2) | / . |
fileutils | . / |
flex (3) | / . |
m4 | - / - - . - |
gettext | X / X X X |
ptx | - / - - |
recode | - / - - - |
sh-utils | . / . |
sharutils | X / X X X X X |
tar | X / X - X X |
textutils | . / . |
wdiff | - - / - - |
`-------------------------------'
cs de en fr it ja nl no pt sv
Ready PO files cs da de en es fi fr it ja ko nl no pl pt ru sl sv
.----------------------------------------------------.
bash | [] [] [] | 3
bison | [] [] [] | 3
clisp | [] [] [] [] | 4
cpio | [] [] [] [] [] [] | 6
diffutils | [] [] [] [] [] | 5
enscript | [] [] [] [] [] [] | 6
fileutils | [] [] [] [] [] [] [] [] [] [] | 10
findutils | [] [] [] [] [] [] [] [] [] | 9
flex | [] [] [] [] | 4
gcal | [] [] [] [] [] | 5
gettext | [] [] [] [] [] [] [] [] [] [] [] | 12
grep | [] [] [] [] [] [] [] [] [] [] | 10
hello | [] [] [] [] [] [] [] [] [] [] | 10
id-utils | [] [] [] | 3
indent | [] [] [] [] [] | 5
libc | [] [] [] [] [] [] [] | 7
m4 | [] [] [] [] [] [] | 6
make | [] [] [] [] [] [] | 6
music | [] [] | 2
ptx | [] [] [] [] [] [] [] [] | 8
recode | [] [] [] [] [] [] [] [] [] | 9
sh-utils | [] [] [] [] [] [] [] [] | 8
sharutils | [] [] [] [] [] | 5
tar | [] [] [] [] [] [] [] [] [] [] | 10
texinfo | [] [] | 2
textutils | [] [] [] [] [] [] [] [] [] | 9
wdiff | [] [] [] [] [] [] [] [] | 8
`----------------------------------------------------'
17 languages cs da de en es fi fr it ja ko nl no pl pt ru sl sv
27 packages 3 3 25 1 18 1 26 2 1 12 20 9 19 7 4 7 17 175
The interpretation legend and notes are:
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
used for implementing regional variants of languages, or language
dialects.
`/'
There is no PO file, this package merely defaults to this language.
For a PO file in the matrix above to be effective, the package to
which it applies should also have been internationalized and
distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
`.'
The effort of localizing this package has been undertaken by
someone, or by a translating team, and work is, or should be in
progress.
`-'
A PO file for this package and this language is completed and is
currently available in a pretest release, or is all ready for
inclusion in the next release of this package.
`X'
The localization of this package to this particular language is
fully completed, and now distributed through an official release.
(1)
This package is translated to specific languages by methods
predating GNU `gettext'. Translations are all kept on disk files,
and sources contain numbers where one normally expects strings.
(2)
This package is planned to switch to GNU `gettext'. For the time
being, it uses temporary means for internationalization.
(3)
This package has its translatable strings marked, but does not use
GNU `gettext'. A convenience patch may be available separately.
If November 1995 seems to be old, you may fetch a more recent copy
If December 1997 seems to be old, you may fetch a more recent copy
of this `ABOUT-NLS' file on most GNU archive sites.

View File

@ -1,3 +1,20 @@
Thu Feb 26 17:09:27 1998 Werner Koch (wk@isil.d.shuttle.de)
* configure.in, acinclude.m4, intl/, po/: New macros taken
from GNOME, switched to automake 1.2f
Thu Feb 26 09:05:46 1998 Werner Koch (wk@isil.d.shuttle.de)
* configure.in (doc/Makefile): New
Thu Feb 26 07:40:47 1998 Werner Koch (wk@isil.d.shuttle.de)
* configure.in: Changed gettext stuff
Wed Feb 25 11:44:10 1998 Werner Koch (wk@isil.d.shuttle.de)
* checks/*test : restructured the directory.
Tue Feb 24 15:59:12 1998 Werner Koch (wk@isil.d.shuttle.de)
* configure.in: Changed the name of the package to GNUPG and

27
INSTALL
View File

@ -33,13 +33,36 @@ in any CPU directory, because there maybe no C substitute.
Don't forget to delete "config.cache" and run "./config.status --recheck".
The Random Device
=================
The current version of GNUPG needs the support of a random device.
If there is no such device, it uses a very simple RNG, which does
not generate strong random numbers.
Random devices are available in Linux, FreeBSD and OpenBSD.
The device files may not exist on your system, please check this
and create them if needed.
The Linux files should look like this:
cr--r--r-- 1 root sys 1, 8 May 28 1997 /dev/random
cr--r--r-- 1 root sys 1, 9 Feb 16 08:23 /dev/urandom
You can create them with:
mknod /dev/random c 1 8
mknod /dev/random c 1 8
The FreeBSD files [from the 970202 snapshot]:
crw-r--r-- 1 root wheel 2, 3 Feb 25 16:54 /dev/random
crw-r--r-- 1 root wheel 2, 4 Feb 25 16:54 /dev/urandom
You can create them with:
mknod /dev/random c 2 3
mknod /dev/urandom c 2 4
Installation
============
pgp is not installed as suid:root; if you want to do it, do it manually.
gpg is not installed as suid:root; if you want to do it, do it manually.
The ~/.gpg directory will be created if it does not exist. Your first
The ~/.gnupg directory will be created if it does not exist. Your first
action should be to create a key pair: "gpg --gen-key".

View File

@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = intl po zlib util mpi cipher tools g10 checks
SUBDIRS = intl po zlib util mpi cipher tools g10 doc checks
EXTRA_DIST = VERSION

View File

@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.2d from Makefile.am
# Makefile.in generated automatically by automake 1.2f from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
@ -72,21 +72,27 @@ G10_LOCALEDIR = @G10_LOCALEDIR@
GENCAT = @GENCAT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTLSUB = @INTLSUB@
MKINSTALLDIRS = @MKINSTALLDIRS@
MPI_EXTRA_ASM_OBJS = @MPI_EXTRA_ASM_OBJS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
ZLIBS = @ZLIBS@
l = @l@
SUBDIRS = intl po zlib util mpi cipher tools g10 checks
SUBDIRS = intl po zlib util mpi cipher tools g10 doc checks
EXTRA_DIST = VERSION
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
@ -189,8 +195,12 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LI
list='$(SUBDIRS)'; for subdir in $$list; do \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
done; \
test -z "$(ETAGS_ARGS)config.h.in$(SOURCES)$(HEADERS)$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:

11
NEWS
View File

@ -1,3 +1,12 @@
Noteworthy changes in version 0.2.9
-----------------------------------
* Fixed FreeBSD bug.
* Added a simple man page.
* Switched to automake1.2f and a newer gettext.
Noteworthy changes in version 0.2.8
-----------------------------------
@ -40,7 +49,7 @@ Noteworthy changes in version 0.2.5
-----------------------------------
* Added zlib for systems which don't have it.
Use "./configure --with-zlib" to link with thi static version
Use "./configure --with-zlib" to link with the static version.
* Generalized some more functions and rewrote the encoding of
message digests into MPIs.

5
README
View File

@ -82,11 +82,10 @@
Key generation shows progress by printing different characters to
stderr:
"." Miller-Rabin test failed.
"." Last 10 Miller-Rabin tests failed.
"+" Miller-Rabin test succeeded.
"!" Reloading the pool with fresh prime numbers
"^" Checking a new value for the generator
"~" Issued during generator checks
"<" Size of one factor decreased
">" Size of one factor increased
@ -204,7 +203,7 @@
-----------------------
There are several ways to specify a userID, here are some examples:
* Only by the short keyid (prepend a zero if it start with A..F):
* Only by the short keyid (prepend a zero if it begins with A..F):
"234567C4"
"0F34E556E"

1
TODO
View File

@ -1,6 +1,7 @@
* improve iobuf by reading more than one byte at once,
this shoud espceially done for the buffer in the chain.
Change the buffering to a mbuf like scheme? Need it for PSST anyway.
* add a way to difference between errors and eof in the underflow/flush
function of iobuf.
* add checking of armor trailers

View File

@ -1 +1 @@
0.2.8
0.2.9

View File

@ -1,247 +1,5 @@
dnl macros to configure g10
AC_PREREQ(2.5)
AC_DEFUN(md_TYPE_PTRDIFF_T,
[AC_CACHE_CHECK([for ptrdiff_t], ac_cv_type_ptrdiff_t,
[AC_TRY_COMPILE(stddef.h, [ptrdiff_t p], ac_cv_type_ptrdiff_t=yes,
ac_cv_type_ptrdiff_t=no)])
if test $ac_cv_type_ptrdiff_t = yes; then
AC_DEFINE(HAVE_PTRDIFF_T)
fi
])
AC_DEFUN(md_PATH_PROG,
[AC_PATH_PROG($1,$2,$3)dnl
if echo $$1 | grep openwin > /dev/null; then
echo "WARNING: Do not use OpenWin's $2. (Better remove it.) >&AC_FD_MSG"
ac_cv_path_$1=$2
$1=$2
fi
])
dnl Check NLS options
AC_DEFUN(ud_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], ud_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
ud_cv_val_LC_MESSAGES=yes, ud_cv_val_LC_MESSAGES=no)])
if test $ud_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES)
fi
fi])
AC_DEFUN(ud_WITH_NLS,
[AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
[ --disable-nls do not use Native Language Support],
nls_cv_use_nls=$enableval, nls_cv_use_nls=yes)
AC_MSG_RESULT($nls_cv_use_nls)
dnl If we use NLS figure out what method
if test "$nls_cv_use_nls" = "yes"; then
AC_DEFINE(ENABLE_NLS)
AC_MSG_CHECKING([for explicitly using GNU gettext])
AC_ARG_WITH(gnu-gettext,
[ --with-gnu-gettext use the GNU gettext library],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
if test "$nls_cv_force_use_gnu_gettext" = "yes"; then
nls_cv_use_gnu_gettext=yes
else
dnl User does not insist on using GNU NLS library. Figure out what
dnl to use. If gettext or catgets are available (in this order) we
dnl use this. Else we have to fall back to GNU NLS library.
AC_CHECK_LIB(intl, main)
AC_CHECK_LIB(i, main)
CATOBJEXT=NONE
dnl Debian 1.3.1 does not have libintl.h but libintl.a
AC_CHECK_HEADER(libintl.h, [ AC_DEFINE(HAVE_LIBINTL_H) ])
if test "$ac_cv_lib_intl_main" = yes \
&& test "$ac_cv_header_libintl_h" != "yes" ; then
nls_cv_use_gnu_gettext=yes
else
AC_CHECK_FUNC(gettext,
[AC_DEFINE(HAVE_GETTEXT)
md_PATH_PROG(MSGFMT, msgfmt, no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(dcgettext)
md_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
md_PATH_PROG(XGETTEXT, xgettext, xgettext)
CATOBJEXT=.mo
INSTOBJEXT=.mo
DATADIRNAME=lib
if test "$ac_cv_lib_intl[_]main" = yes; then
INTLLIBS=-lintl
elif test "$ac_cv_lib_i[_]main" = yes; then
INTLLIBS=-li
fi
fi])
if test "$CATOBJEXT" = "NONE"; then
dnl No gettext in C library. Try catgets next.
AC_CHECK_FUNC(catgets,
[AC_DEFINE(HAVE_CATGETS)
INTLOBJS="\$(CATOBJS)"
AC_PATH_PROG(GENCAT, gencat, no)dnl
if test "$GENCAT" != "no"; then
AC_PATH_PROGS(GMSGFMT, [gmsgfmt msgfmt], msgfmt)
md_PATH_PROG(XGETTEXT, xgettext, xgettext)
CATOBJEXT=.cat
INSTOBJEXT=.cat
DATADIRNAME=lib
INTLDEPS="\${top_srcdir}/intl/libintl.a"
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi])
fi
fi
if test "$CATOBJEXT" = "NONE"; then
dnl Neither gettext nor catgets in included in the C library.
dnl Fall back on GNU gettext library.
nls_cv_use_gnu_gettext=yes
fi
fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
INTLOBJS="\$(GETTOBJS)"
md_PATH_PROG(MSGFMT, msgfmt, msgfmt)
md_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
md_PATH_PROG(XGETTEXT, xgettext, xgettext)
AC_SUBST(MSGFMT)
CATOBJEXT=.gmo
INSTOBJEXT=.mo
DATADIRNAME=share
INTLDEPS="\${top_srcdir}/intl/libintl.a"
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
# We need to process the intl/ and po/ directory.
INTLSUB=intl
POSUB=po
else
DATADIRNAME=share
nls_cv_header_intl=libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done
dnl Make all variables we use known to autoconf.
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLDEPS)
AC_SUBST(INTLLIBS)
AC_SUBST(INTLOBJS)
AC_SUBST(INTLSUB)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
])
AC_DEFUN(AM_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_C_INLINE])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_CHECK_HEADERS([limits.h locale.h nl_types.h malloc.h string.h unistd.h values.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp])
if test "${ac_cv_func_stpcpy+set}" != "set"; then
AC_CHECK_FUNCS(stpcpy)
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
AC_DEFINE(HAVE_STPCPY)
fi
ud_LC_MESSAGES
ud_WITH_NLS
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
dnl Determine which catalog format we have (if any is needed)
dnl For now we know about two different formats:
dnl Linux and the normal X/Open format
test -d intl || mkdir intl
if test "$CATOBJEXT" = ".cat"; then
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
dnl Transform the SED scripts while copying because some dumb SEDs
dnl cannot handle comments.
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
fi
dnl po2tbl.sed is always needed.
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile.
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
posrcprefix="$srcdir/"
else
posrcprefix="../$srcdir/"
fi
else
posrcprefix="../"
fi
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])
dnl --------------------------------------------------
dnl G10 stuff
dnl --------------------------------------------------
dnl WK_MSG_PRINT(STRING)
dnl print a message
@ -354,3 +112,394 @@ define(WK_CHECK_CACHE,
])
######################################################################
# progtest.m4 from gettext 0.32
######################################################################
# Search path for a program which passes the given test.
# Ulrich Drepper <drepper@cygnus.com>, 1996.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
/*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test -n "[$]$1"; then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])
######################################################################
# lcmessage.m4 from gettext 0.32
######################################################################
# Check whether LC_MESSAGES is available in <locale.h>.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
AC_DEFUN(AM_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES)
fi
fi])
######################################################################
# gettext.m4 from gettext 0.32
######################################################################
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 3
AC_DEFUN(AM_WITH_NLS,
[AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
[ --disable-nls do not use Native Language Support],
USE_NLS=$enableval, USE_NLS=yes)
AC_MSG_RESULT($USE_NLS)
AC_SUBST(USE_NLS)
USE_INCLUDED_LIBINTL=no
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
AC_DEFINE(ENABLE_NLS)
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
dnl User does not insist on using GNU NLS library. Figure out what
dnl to use. If gettext or catgets are available (in this order) we
dnl use this. Else we have to fall back to GNU NLS library.
dnl catgets is only used if permitted by option --with-catgets.
nls_cv_header_intl=
nls_cv_header_libgt=
CATOBJEXT=NONE
AC_CHECK_HEADER(libintl.h,
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
if test "$gt_cv_func_gettext_libc" != "yes"; then
AC_CHECK_LIB(intl, bindtextdomain,
[AC_CACHE_CHECK([for gettext in libintl],
gt_cv_func_gettext_libintl,
[AC_TRY_LINK([], [return (int) gettext ("")],
gt_cv_func_gettext_libintl=yes,
gt_cv_func_gettext_libintl=no)])])
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
AC_DEFINE(HAVE_GETTEXT)
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(dcgettext)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr],
[CATOBJEXT=.gmo
DATADIRNAME=share],
[CATOBJEXT=.mo
DATADIRNAME=lib])
INSTOBJEXT=.mo
fi
fi
])
if test "$CATOBJEXT" = "NONE"; then
AC_MSG_CHECKING([whether catgets can be used])
AC_ARG_WITH(catgets,
[ --with-catgets use catgets functions if available],
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
AC_MSG_RESULT($nls_cv_use_catgets)
if test "$nls_cv_use_catgets" = "yes"; then
dnl No gettext in C library. Try catgets next.
AC_CHECK_LIB(i, main)
AC_CHECK_FUNC(catgets,
[AC_DEFINE(HAVE_CATGETS)
INTLOBJS="\$(CATOBJS)"
AC_PATH_PROG(GENCAT, gencat, no)dnl
if test "$GENCAT" != "no"; then
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
if test "$GMSGFMT" = "no"; then
AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
fi
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.cat
INSTOBJEXT=.cat
DATADIRNAME=lib
INTLDEPS='$(top_builddir)/intl/libintl.a'
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi])
fi
fi
if test "$CATOBJEXT" = "NONE"; then
dnl Neither gettext nor catgets in included in the C library.
dnl Fall back on GNU gettext library.
nls_cv_use_gnu_gettext=yes
fi
fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
INTLOBJS="\$(GETTOBJS)"
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_SUBST(MSGFMT)
USE_INCLUDED_LIBINTL=yes
CATOBJEXT=.gmo
INSTOBJEXT=.mo
DATADIRNAME=share
INTLDEPS='$(top_builddir)/intl/libintl.a'
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext programs is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
# We need to process the po/ directory.
POSUB=po
else
DATADIRNAME=share
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
# If this is used in GNU gettext we have to set USE_NLS to `yes'
# because some of the sources are only built for this goal.
if test "$PACKAGE" = gettext; then
USE_NLS=yes
USE_INCLUDED_LIBINTL=yes
fi
dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done
dnl Make all variables we use known to autoconf.
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLDEPS)
AC_SUBST(INTLLIBS)
AC_SUBST(INTLOBJS)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
])
AC_DEFUN(AM_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_C_INLINE])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
unistd.h values.h sys/param.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
__argz_count __argz_stringify __argz_next])
if test "${ac_cv_func_stpcpy+set}" != "set"; then
AC_CHECK_FUNCS(stpcpy)
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
AC_DEFINE(HAVE_STPCPY)
fi
AM_LC_MESSAGES
AM_WITH_NLS
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
dnl The reference to <locale.h> in the installed <libintl.h> file
dnl must be resolved because we cannot expect the users of this
dnl to define HAVE_LOCALE_H.
if test $ac_cv_header_locale_h = yes; then
INCLUDE_LOCALE_H="#include <locale.h>"
else
INCLUDE_LOCALE_H="\
/* The system does not provide the header <locale.h>. Take care yourself. */"
fi
AC_SUBST(INCLUDE_LOCALE_H)
dnl Determine which catalog format we have (if any is needed)
dnl For now we know about two different formats:
dnl Linux libc-5 and the normal X/Open format
test -d intl || mkdir intl
if test "$CATOBJEXT" = ".cat"; then
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
dnl Transform the SED scripts while copying because some dumb SEDs
dnl cannot handle comments.
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
fi
dnl po2tbl.sed is always needed.
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
dnl In the intl/Makefile.in we have a special dependency which makes
dnl only sense for gettext. We comment this out for non-gettext
dnl packages.
if test "$PACKAGE" = "gettext"; then
GT_NO="#NO#"
GT_YES=
else
GT_NO=
GT_YES="#YES#"
fi
AC_SUBST(GT_NO)
AC_SUBST(GT_YES)
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
dnl Try to locate is.
MKINSTALLDIRS=
if test -n "$ac_aux_dir"; then
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
fi
if test -z "$MKINSTALLDIRS"; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
AC_SUBST(MKINSTALLDIRS)
dnl *** For now the libtool support in intl/Makefile is not for real.
l=
AC_SUBST(l)
dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile.
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
posrcprefix="$srcdir/"
else
posrcprefix="../$srcdir/"
fi
else
posrcprefix="../"
fi
rm -f po/POTFILES
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])

View File

@ -1,9 +1,43 @@
## Process this file with automake to create Makefile.in
TESTS = checkit
TESTS = version.test decrypt.test clearsig.test armsigs.test \
sigs.test armencrypt.test armencryptp.test \
encrypt.test encryptp.test signencrypt.test \
armsignencrypt.test armdetach.test detach.test \
armdetachm.test detachm.test genkey1024.test
TEST_FILES = pubring.asc secring.asc gnupg.asc plain-1 plain-2 plain-3o.asc \
plain-1.asc plain-2.asc plain-3.asc
EXTRA_DIST = $(TESTS) $(TEST_FILES)
DATA_FILES = data-500 data-9000 data-32000 data-80000
EXTRA_DIST = $(TESTS) $(TEST_FILES)
CLEANFILES = prepared.stamp x y z out err $(DATA_FILES)
check: prepared.stamp
prepared.stamp: pubring.gpg secring.gpg gnupg.sig plain-3 $(DATA_FILES)
@set -x; \
echo "def" | ../g10/gpg -v --no-operation; \
echo timestamp >./prepared.stamp
pubring.gpg: pubring.asc
../g10/gpgm --yes --dearmor -o pubring.gpg pubring.asc
secring.gpg: secring.asc
../g10/gpgm --yes --dearmor -o secring.gpg secring.asc
gnupg.sig: gnupg.asc
../g10/gpgm --yes --dearmor -o gnupg.sig gnupg.asc
plain-3: plain-3o.asc
../g10/gpgm --yes --dearmor -o plain-3 plain-3o.asc
data-500:
head -c 500 /dev/urandom >data-500
data-9000:
head -c 9000 /dev/urandom >data-9000
data-32000:
head -c 32000 /dev/urandom >data-32000
data-80000:
head -c 80000 /dev/urandom >data-80000

11
checks/armdetach.test Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking armored detached signatures
for i in $plain_files $data_files ; do
echo "$usrpass1" | run_gpg --passphrase-fd 0 -sab -o x --yes $i
run_gpg -o /dev/null --yes x <$i || error "$i: bad signature"
done

9
checks/armdetachm.test Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking armored detached signatures of multiple files
i="$plain_files $data_files"
echo "$usrpass1" | run_gpg --passphrase-fd 0 -sab -o x --yes $i
cat $i | run_gpg -o /dev/null --yes x || error "$i: bad signature"

11
checks/armencrypt.test Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking armored encryption
for i in $plain_files $data_files ; do
run_gpg -ea -o x --yes -r "$usrname2" $i
run_gpg -o y --yes x
cmp $i y || error "$i: mismatch"
done

12
checks/armencryptp.test Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking armored encryption with a pipe
for i in $plain_files $data_files ; do
run_gpg -ea --yes -r "$usrname2" < $i | tee x | run_gpg -o y --yes
cmp $i y || error "$i: mismatch"
run_gpg --yes < x > y
cmp $i y || error "$i: mismatch"
done

13
checks/armsignencrypt.test Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking armored signing and encryption
for i in $plain_files $data_files ; do
echo "$usrpass1" \
| run_gpg --passphrase-fd 0 -sae -o x --yes -r "$usrname2" $i
run_gpg -o y --yes x
cmp $i y || error "$i: mismatch"
done

11
checks/armsigs.test Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking armored signatures
for i in $plain_files $data_files ; do
echo "$usrpass1" | run_gpg --passphrase-fd 0 -sa -o x --yes $i
run_gpg -o y --yes x
cmp $i y || error "$i: mismatch"
done

View File

@ -1,213 +0,0 @@
#!/bin/bash
# Script for G10 testing
#---------------------------------------------------------
#--------------------------------
#------ constants ---------------
#--------------------------------
usrname1="one"
usrpass1="def"
usrname2="two"
usrpass2=""
plain_files="plain-1 plain-2"
data_files=""
exp_files=""
#--------------------------------
#------ utility functions -------
#--------------------------------
fatal () {
echo "$pgmname: fatal:" $* >&2
exit 1;
}
error () {
echo "$pgmname:" $* >&2
exit 1
}
info () {
echo "$pgmname:" $* >&2
}
chdir () {
cd $1 || fatal "cannot cd to $1"
}
cleanup () {
rm $data_files x y z 2>/dev/null
echo "#empty" >./options
}
run_g10 () {
if ! eval ../g10/gpg --homedir . $* ; then
echo "(../g10/gpg --homedir . $*) failed" >&2
exit 1
fi
}
run_g10maint () {
if ! eval ../g10/gpgm --homedir . $* ; then
echo "(../g10/gpgm --homedir . $*) failed" >&2
exit 1
fi
}
#--------------------------------
#-------- main program ----------
#--------------------------------
set -e
pgmname=$(basename $0)
trap cleanup SIGHUP SIGINT SIGQUIT
# some checks
for i in $plain_files plain-3o.asc ; do
[ -f $i ] || fatal "$i: missing"
done
for i in $exp_files; do
[ -f $i ] || fatal "$i: script missing"
done
# create the keyrings
cat <<EOF >./options
no-greeting
no-secmem-warning
batch
EOF
# print the G10 version
run_g10 --version
info Unpacking some material
run_g10maint --yes --dearmor -o pubring.gpg pubring.asc
run_g10maint --yes --dearmor -o secring.gpg secring.asc
run_g10maint --yes --dearmor -o gnupg.sig gnupg.asc
run_g10maint --yes --dearmor -o plain-3 plain-3o.asc
plain_files="$plain_files plain-3"
# make sure all files are created
echo "$usrpass1" | run_g10 --no-operation
info Checking decryption
for i in $plain_files ; do
echo "$usrpass1" | run_g10 --passphrase-fd 0 -o y --yes $i.asc
cmp $i y || error "$i: mismatch"
done
info Checking cleartext signatures
# There is a minor glitch, which appends a lf to the cleartext.
# I do not consider that a bug, but I have to use the head .. mimic.
# It is not clear what should happen to leading LFs, we must
# change the defintion of cleartext, so that only 1 empty line
# must follow the headers, but some specs say: any number of empty lines ..
# clean-sat removes leading LFs
# I know that this does not work for random data files (due to large lines
# or what ever) - I hope we can live with it.
for i in $plain_files; do
echo "$usrpass1" | run_g10 --passphrase-fd 0 -sat -o x --yes $i
run_g10 -o y --yes x
../tools/clean-sat < $i > z
head -c $[ $(cat y | wc -c) - 1 ] y | diff - z || error "$i: mismatch"
done
info Creating some random data files
for i in 500 9000 32000 80000; do
head -c $i /dev/urandom >data-$i
data_files="$data_files data-$i"
done
info Checking armored signatures
for i in $plain_files $data_files ; do
echo "$usrpass1" | run_g10 --passphrase-fd 0 -sa -o x --yes $i
run_g10 -o y --yes x
cmp $i y || error "$i: mismatch"
done
info Checking signatures
for i in $plain_files $data_files; do
echo "$usrpass1" | run_g10 --passphrase-fd 0 -s -o x --yes $i
run_g10 -o y --yes x
cmp $i y || error "$i: mismatch"
done
info Checking armored encryption
for i in $plain_files $data_files ; do
run_g10 -ea -o x --yes -r "$usrname2" $i
run_g10 -o y --yes x
cmp $i y || error "$i: mismatch"
done
info Checking armored encryption with a pipe
for i in $plain_files $data_files ; do
run_g10 -ea --yes -r "$usrname2" < $i | tee x \
| run_g10 -o y --yes
cmp $i y || error "$i: mismatch"
run_g10 --yes < x > y
cmp $i y || error "$i: mismatch"
done
info Checking encryption
for i in $plain_files $data_files ; do
run_g10 -e -o x --yes -r "$usrname2" $i
run_g10 -o y --yes x
cmp $i y || error "$i: mismatch"
done
info Checking encryption with a pipe
for i in $plain_files $data_files ; do
run_g10 -e --yes -r "$usrname2" < $i \
| run_g10 --yes > y
cmp $i y || error "$i: mismatch"
done
info Checking signing and encryption
for i in $plain_files $data_files ; do
echo "$usrpass1" \
| run_g10 --passphrase-fd 0 -se -o x --yes -r "$usrname2" $i
run_g10 -o y --yes x
cmp $i y || error "$i: mismatch"
done
info Checking armored signing and encryption
for i in $plain_files $data_files ; do
echo "$usrpass1" \
| run_g10 --passphrase-fd 0 -sae -o x --yes -r "$usrname2" $i
run_g10 -o y --yes x
cmp $i y || error "$i: mismatch"
done
info Checking armored detached signatures
for i in $plain_files $data_files ; do
echo "$usrpass1" | run_g10 --passphrase-fd 0 -sab -o x --yes $i
run_g10 -o /dev/null --yes x <$i || error "$i: bad signature"
done
info Checking detached signatures
for i in $plain_files $data_files ; do
echo "$usrpass1" | run_g10 --passphrase-fd 0 -sb -o x --yes $i
run_g10 -o /dev/null --yes x <$i || error "$i: bad signature"
done
info Checking detached signatures of multiple files
i="$plain_files $data_files"
echo "$usrpass1" | run_g10 --passphrase-fd 0 -sb -o x --yes $i
cat $i | run_g10 -o /dev/null --yes x || error "$i: bad signature"
info Checking armored detached signatures of multiple files
i="$plain_files $data_files"
echo "$usrpass1" | run_g10 --passphrase-fd 0 -sab -o x --yes $i
cat $i | run_g10 -o /dev/null --yes x || error "$i: bad signature"
info "All tests passed."
exit 0

20
checks/clearsig.test Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking cleartext signatures
# There is a minor glitch, which appends a lf to the cleartext.
# I do not consider that a bug, but I have to use the head .. mimic.
# It is not clear what should happen to leading LFs, we must
# change the defintion of cleartext, so that only 1 empty line
# must follow the headers, but some specs say: any number of empty lines ..
# clean-sat removes leading LFs
# I know that this does not work for random data files (due to large lines
# or what ever) - I hope we can live with it.
for i in $plain_files; do
echo "$usrpass1" | run_gpg --passphrase-fd 0 -sat -o x --yes $i
run_gpg -o y --yes x
../tools/clean-sat < $i > z
head -c $[ $(cat y | wc -c) - 1 ] y | diff - z || error "$i: mismatch"
done

10
checks/decrypt.test Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking decryption of supplied files
for i in $plain_files ; do
echo "$usrpass1" | run_gpg --passphrase-fd 0 -o y --yes $i.asc
cmp $i y || error "$i: mismatch"
done

79
checks/defs.inc Executable file
View File

@ -0,0 +1,79 @@
# definitions for the check scripts
#--------------------------------
#------ constants ---------------
#--------------------------------
# Note that usrpass1 is also used in Makefile.am
usrname1="one"
usrpass1="def"
usrname2="two"
usrpass2=""
plain_files="plain-1 plain-2 plain-3"
data_files="data-500 data-9000 data-32000 data-80000"
exp_files=""
#cleanup_files="x y z"
#--------------------------------
#------ utility functions -------
#--------------------------------
fatal () {
echo "$pgmname: fatal:" $* >&2
exit 1;
}
error () {
echo "$pgmname:" $* >&2
exit 1
}
info () {
echo "$pgmname:" $* >&2
}
chdir () {
cd $1 || fatal "cannot cd to $1"
}
#cleanup () {
# rm $cleanup_files 2>/dev/null || true
# echo "#empty" >./options
#}
#add_cleanup () {
# cleanup_files="$cleanup_files $*"
#}
run_gpg () {
if ! eval ../g10/gpg --homedir . $* 2>err ; then
cat err >&2
echo "(../g10/gpg --homedir . $*) failed" >&2
exit 1
fi
grep -v 'gpg: Good signature from' err || true
}
run_gpgm () {
if ! eval ../g10/gpgm --homedir . $* ; then
echo "(../g10/gpgm --homedir . $*) failed" >&2
exit 1
fi
}
set -e
pgmname=$(basename $0)
#trap cleanup SIGHUP SIGINT SIGQUIT
[ -z $srcdir ] && fatal "not called from make"
cat <<EOF >./options
no-greeting
no-secmem-warning
batch
EOF

10
checks/detach.test Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking detached signatures
for i in $plain_files $data_files ; do
echo "$usrpass1" | run_gpg --passphrase-fd 0 -sb -o x --yes $i
run_gpg -o /dev/null --yes x <$i || error "$i: bad signature"
done

9
checks/detachm.test Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking detached signatures of multiple files
i="$plain_files $data_files"
echo "$usrpass1" | run_gpg --passphrase-fd 0 -sb -o x --yes $i
cat $i | run_gpg -o /dev/null --yes x || error "$i: bad signature"

11
checks/encrypt.test Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking encryption
for i in $plain_files $data_files ; do
run_gpg -e -o x --yes -r "$usrname2" $i
run_gpg -o y --yes x
cmp $i y || error "$i: mismatch"
done

10
checks/encryptp.test Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking encryption with a pipe
for i in $plain_files $data_files ; do
run_gpg -e --yes -r "$usrname2" < $i | run_gpg --yes > y
cmp $i y || error "$i: mismatch"
done

59
checks/genkey1024.test Executable file
View File

@ -0,0 +1,59 @@
#!/bin/sh
. defs.inc || exit 3
info "This expect script does yet work"
exit 0
expect - <<EOF
set timeout -1
match_max 100000
spawn ../g10/gpg --no-batch --quick-random --homedir . --gen-key
expect -exact "Please select the algorithm to use:\r
(1) ElGamal is the suggested one.\r
(2) DSA can only be used for signatures.\r
Your selection? (1,2) "
send -- "1\r"
expect -exact "1\r
\r \rAbout to generate a new ElGamal keypair.\r
minimum keysize is 768 bits\r
default keysize is 1024 bits\r
highest suggested keysize is 2048 bits\r
What keysize do you want? (1024) "
send -- "\r"
expect -exact "\r
\r \rRequested keysize is 1024 bits\r
\r
You need a User-ID to identify your key; the software constructs the user id\r
from Real Name, Comment and Email Address in this form:\r
\"Heinrich Heine (Der Dichter) <heinrichh@uni-duesseldorf.de>\"\r
\r
Real name: "
send -- "Harry H.\r"
expect -exact "Harry H.\r
\r \rEmail address: "
send -- "hh@ddorf.de\r"
expect -exact "hh@ddorf.de\r
\r \rComment: "
send -- "a test\r"
expect -exact "a test\r
\r \rYou selected this USER-ID:\r
\"Harry H. (a test) <hh@ddorf.de> (INSECURE!)\"\r
\r
Edit (N)ame, (C)omment, (E)mail or (O)kay? "
send -- "o\r"
expect -exact "o\r
\r \rYou need a Passphrase to protect your secret key.\r
\r
Enter pass phrase: "
send -- "abc\r"
expect -ex "abc\r\n"
expect -ex "\r \rRepeat pass phrase:\ "
send -- "abc\r"
expect -ex "abc\r\n"
expect {
-ex "public and secret key created and signed.\r"
eof abort
}
EOF

13
checks/signencrypt.test Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking signing and encryption
for i in $plain_files $data_files ; do
echo "$usrpass1" \
| run_gpg --passphrase-fd 0 -se -o x --yes -r "$usrname2" $i
run_gpg -o y --yes x
cmp $i y || error "$i: mismatch"
done

11
checks/sigs.test Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
. defs.inc || exit 3
#info Checking signatures
for i in $plain_files $data_files; do
echo "$usrpass1" | run_gpg --passphrase-fd 0 -s -o x --yes $i
run_gpg -o y --yes x
cmp $i y || error "$i: mismatch"
done

10
checks/version.test Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
. defs.inc || exit 3
# print the GPG version
run_gpg --version
cat err
#fixme: check that the output is correct

View File

@ -1,3 +1,8 @@
Thu Feb 26 07:57:02 1998 Werner Koch (wk@isil.d.shuttle.de)
* primegen.c (generate_elg_prime): Changed the progress printing.
(gen_prime): Ditto.
Tue Feb 24 12:28:42 1998 Werner Koch (wk@isil.d.shuttle.de)
* md5.c, md.5 : Replaced by a modified version of md5.c from

View File

@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.2d from Makefile.am
# Makefile.in generated automatically by automake 1.2f from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
@ -72,19 +72,25 @@ G10_LOCALEDIR = @G10_LOCALEDIR@
GENCAT = @GENCAT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTLSUB = @INTLSUB@
MKINSTALLDIRS = @MKINSTALLDIRS@
MPI_EXTRA_ASM_OBJS = @MPI_EXTRA_ASM_OBJS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
ZLIBS = @ZLIBS@
l = @l@
INCLUDES = -I$(top_srcdir)/include
EXTRA_DIST = @CIPHER_EXTRA_DIST@
@ -164,9 +170,6 @@ distclean-noinstLIBRARIES:
maintainer-clean-noinstLIBRARIES:
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
@ -174,7 +177,7 @@ maintainer-clean-noinstLIBRARIES:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core
-rm -f *.o core *.core
clean-compile:
@ -197,8 +200,12 @@ ID: $(HEADERS) $(SOURCES) $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
@ -226,12 +233,7 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file; \
done
MKDEP = $(CC) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include .deps/.P
.deps/.P: $(BUILT_SOURCES)
echo > $@
-include $(DEP_FILES)
@ -244,13 +246,16 @@ distclean-depend:
maintainer-clean-depend:
-rm -rf .deps
.deps/%.P: %.c
@echo "Computing dependencies for $<..."
@o='o'; \
test -n "$o" && o='$$o'; \
$(MKDEP) $< >$@.tmp \
&& sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," < $@.tmp > $@ \
&& rm -f $@.tmp
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
< .deps/$(*F).p > .deps/$(*F).P
@-rm -f .deps/$(*F).p
info:
dvi:
check: all

View File

@ -203,7 +203,7 @@ generate_elg_prime( unsigned pbits, unsigned qbits, MPI g, MPI **ret_factors )
else
fputc('^', stderr);
for(i=0; i < n+2; i++ ) {
fputc('~', stderr);
/*fputc('~', stderr);*/
mpi_fdiv_q(tmp, pmin1, factors[i] );
/* (no mpi_pow(), but it is okay to use this with mod prime) */
mpi_powm(b, g, tmp, prime );
@ -260,6 +260,8 @@ gen_prime( unsigned nbits, int secret, int randomlevel )
count1 = count2 = 0;
/* enter (endless) loop */
for(;;) {
int dotcount=0;
/* generate a random number */
mpi_set_bytes( prime, nbits, get_random_byte, randomlevel );
/* set high order bit to 1, set low order bit to 1 */
@ -315,7 +317,10 @@ gen_prime( unsigned nbits, int secret, int randomlevel )
m_free(mods);
return prime;
}
fputc('.', stderr);
if( ++dotcount == 10 ) {
fputc('.', stderr);
dotcount = 0;
}
}
fputc(':', stderr); /* restart with a new random value */
}

View File

@ -58,6 +58,9 @@
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
@ -91,10 +94,6 @@
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
/* libintl.h is available; this is obsolete because if we don't have
* this header we use a symlink to the one in intl/ */
#undef HAVE_LIBINTL_H
#undef HAVE_STPCPY
#undef BIG_ENDIAN_HOST
@ -124,6 +123,15 @@
/* The number of bytes in a unsigned short. */
#undef SIZEOF_UNSIGNED_SHORT
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
/* Define if you have the __argz_next function. */
#undef HAVE___ARGZ_NEXT
/* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
@ -175,6 +183,9 @@
/* Define if you have the tcgetattr function. */
#undef HAVE_TCGETATTR
/* Define if you have the <argz.h> header file. */
#undef HAVE_ARGZ_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
@ -190,6 +201,9 @@
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@ -202,9 +216,6 @@
/* Define if you have the i library (-li). */
#undef HAVE_LIBI
/* Define if you have the intl library (-lintl). */
#undef HAVE_LIBINTL
/* The AC_CHECK_SIZEOF() fails for some machines.
* we provide some fallback values here */

View File

@ -55,6 +55,7 @@ AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
dnl AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_ISC_POSIX
case "${target}" in
i386--mingw32)
@ -82,12 +83,10 @@ dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)
AM_GNU_GETTEXT
G10_LOCALEDIR="$g10_prefix/$DATADIRNAME/locale"
AC_SUBST(G10_LOCALEDIR)
AC_DEFINE_UNQUOTED(G10_LOCALEDIR, "$G10_LOCALEDIR")
WK_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl )
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@ -191,13 +190,8 @@ fi
AC_SUBST(CIPHER_EXTRA_OBJS)
AC_SUBST(CIPHER_EXTRA_DIST)
dnl
dnl If no gettext is found, default to gnu gettext
dnl
if test x$ac_cv_func_gettext = xno; then
LIBS="$LIBS -lintl -L\$(topbuilddir)/intl"
fi
AM_GNU_GETTEXT
WK_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl )
WK_DO_LINK_FILES
@ -209,6 +203,7 @@ util/Makefile
mpi/Makefile
cipher/Makefile
g10/Makefile
doc/Makefile
tools/Makefile
zlib/Makefile
checks/Makefile

13
doc/Makefile.am Normal file
View File

@ -0,0 +1,13 @@
## Process this file with automake to create Makefile.in
EXTRA_DIST = DETAILS rfcs gpg.1pod gpg.1
man_MANS = gpg.1
%: %pod
pod2man $< --section=`echo $@ | sed 's/^.*(?)$$/$$&/'`\
--release="`date -r $< '+%d %b %Y'`"\
--center="GNU Tools" --date=' '\
>$@,$$$$ && mv -f $@,$$$$ $@\
|| rm -f $@,$$$$

297
doc/gpg.1pod Normal file
View File

@ -0,0 +1,297 @@
=head1 NAME
gpg - GNU Privacy Guard
=head1 SYNOPSIS
B<gpg> [--homedir name] [--options file] [options] command [args]
=head1 DESCRIPTION
This is the main program from the GNUPG system.
=head1 COMMANDS
B<gpg> recognizes these commands:
B<-s>, B<--sign>
Make a signature. This option maybe combined
with B<--encrypt>.
B<--clearsign>
Make a clear text signature.
B<-b>, B<--detach-sign>
Make a detached signature.
B<-e>, B<--encrypt>
Encrypt data. This option may be combined with B<--sign>.
B<-c>, B<--symmetric>
Encrypt only with symmetric cipher
This command asks for a passphrase.
B<--store>
store only (make a RFC1991 packet).
B<-d>, B<--decrypt>
Decrypt data. This is the default operation for data
files.
B<-k> [I<keyring>]
Kludge to be somewhat compatibe to PGP.
Without arguments, all public key-rings are listed,
with one argument, only I<keyring> is listed.
Special combinations are also allowed, but it may
give starnge results when combined with more options.
B<-kv> Same as B<-k>
B<-kvv> List the signatures with every key.
B<-kvvv> Additional check all signatures.
B<-kvc> List fingerprints
B<-kvvc> List fingerprints and signatures
B<--list-keys>
List all keys in all public key-rings and check the
signatures.
B<--check-keys>
Check signatures on a key in the keyring
B<--fingerprint>
Show the fingerprints
B<--list-packets>
List only the sequence of packets. This is mainly
useful for debugging.
B<--gen-key>
Generate a new key pair. This command can only be
used interactive.
B<--sign-key> I<name>
Make a signature on key of user I<name>.
This looks for the key, displays the key and checks
all existing signatures of this key. If the key is
not yet signed by the default user (or the users given
with B<-u>), the program displays the information of
the key again, together with it's fingerprint and
asked whether it should be signed. This question
is repeated for all users specified with B<-u>.
The key is then signed and the keyring which
contains the key is updated.
B<--delete-key>
Remove key from the public keyring
B<--edit-sig>
Edit/remove a key signature.
B<--change-passphrase>
Change the passphrase of your secret keyring
B<--gen-revoke>
Generate a revocation certificate.
B<--export> [I<names>]
Either export all keys from all key-rings (default
key-rings and those registered via option B<--keyring>,
or if at least one name is given, those of the given
name. The new keyring is written to F<stdout> or to
the file given with option "output". Use together
with B<-a> to mail those keys.
B<--import>
import/merge keys
=head1 OPTIONS
Long options can be put in an options file (default F<~/.gnupg/options>);
do not write the 2 dashes, but simply the name of the option and any
arguments if required, lines with a hash as the first non-white-space
character are ignored. Commands maybe put in this file too, but that
does not make sense.
B<gpg> recognizes these options:
B<-a>, B<--armor>
Create ASCII armored output.
B<-o> I<file>, B<--output> I<file>
Write output to I<file>.
B<-u> I<name>, B<--local-user> I<name>
Use I<name> as the user-id to sign.
B<-r> I<name>, B<--remote-user> I<name>
Use I<name> as the user-id for encryption.
B<-v>, B<--verbose>
Give more informations during processing. If used
2 times, the input data is listed in detail.
B<-z> I<n>
Set compress level to I<n>. A value of 0 for I<n>
disables compression. Default is to use the default
compression level of zlib (which is 6).
B<-t>, B<--textmode>
Use canonical text mode. Used to make clear-text
signatures.
B<-n>, B<--dry-run>
Don't make any changes (not yet implemented).
B<--batch>
Batch mode; never ask, do not allow interactive
commands.
B<--no-batch>
Disable batch mode; this may be used if B<batch>
is used in the options file.
B<--yes>
Assume yes on most questions.
B<--no>
Assume no on most questions.
B<--keyring> I<file>
Add I<file> to the list of key-rings.
If I<file> begins with a tilde and a slash, these
are replaced by the HOME directory. If the filename
does not contain a slash, it is assumed to be in the
home-directory (F<~/.gnupg> if B<--homedir>) is not used.
B<--secret-keyring> I<file>
Same as B<--keyring> but for secret key-rings.
B<--homedir> I<dir>
Set the name of the home directory to I<dir>. If this
option is not used it defaults to F<~/.gnupg>. It does
not make sense to use this in a options file.
B<--options> I<file>
Read options from I<file> and do not try to read
them from the default options file in the homedir
(see B<--homedir>). This option is ignored when used
in an options file.
B<no-options>
Shortcut for B<--options> I</dev/null>. This option is
detected before an attempt to open an option file.
B<--debug> I<flags>
Set debugging flags. All flags are or-ed and I<flags> may
be given in C syntax (e.g. 0x0042).
B<--debug-all>
Set all useful debugging flags.
B<--status-fd> I<n>
Write special status strings to the file descriptor I<n>.
B<--no-comment>
Do not write comment packets.
B<--completes-needed> I<n>
Number of completey trusted users to introduce a new
key signator (defaults to 1).
B<--marginals-needed> I<n>
Number of marginally trusted users to introduce a new
key signator (defaults to 3)
B<--cipher-algo> I<name>
Use I<name> as cipher algorithm. Running the program
with the option B<--verbose> yields a list off supported
algorithms.
B<--pubkey-algo> I<name>
Use I<name> as puplic key algorithm. Running the program
with the option B<--verbose> yields a list off supported
algorithms.
B<--digest-algo> I<name>
Use I<name> as message digest algorithm. Running the
program with the option B<--verbose> yields a list off
supported algorithms.
B<--passphrase-fd> I<n>
Read the passphrase from file descriptor I<n>. If you use
0 for I<n>, the passphrase will be read from stdin. This
can only be used if only one passphrase is supplied.
B<Don't use this option if you can avoid it>
B<no-verbose>
Reset verbose level to 0.
B<no-greeting>
Suppress the initial copyright message but do not
enter batch mode.
B<no-armor>
Assume the input data is not in ASCCI armored format.
B<no-default-keyring>
Do not add the default key-rings to the list of
key-rings.
B<--version>
Print version information along with a list
of supported algorithms.
B<--warranty>
Print warranty information.
B<-h>, B<--help>
Print usage information.
=head1 RETURN VALUE
The Program returns 0 if everything was fine, 1 if at least
a signature was bad and other errorcode for fatal errors.
=head1 EXAMPLES
-se -r Bob [file] sign and encrypt for user Bob
-sat [file] make a clear text signature
-sb [file] make a detached signature
-k [userid] show keys
-kc [userid] show fingerprint
=head1 ENVIRONMENT
C<HOME> Used to locate the default home directory.
=head1 FILES
F<~/.gnupg/secring.gpg> The secret key-ring
F<~/.gnupg/pubring.gpg> The public key-ring
F<~/.gnupg/trustdb.gpg> The trust database
F<~/.gnupg/gnupg.gpg> Signature of GNUPG files.
F<~/.gnupg/options> May contain options
=head1 SEE ALSO
gpgm(1) gpgk(1)
=head1 WARNINGS
Use a B<good> password for your user account and a non-simple passphrase
to protect your secret key.
Keep in mind that, if this program is used over a network (telnet), it
is B<very> easy to spy out your passphrase!

92
doc/manual.sgml Normal file
View File

@ -0,0 +1,92 @@
<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
]>
<book>
<bookinfo>
<title>The GNU Privacy Guard</title>
<authorgroup>
<author> <firstname>Werner</firstname> <surname>Koch</surname>
<affiliation><address><email>wk@computer.org</email></address>
</affiliation>
</author>
</authorgroup>
<!-- <version>last modified: <date></version> -->
<copyright><year>1998</year><year>1998</year>
<holder>Free Software Foundation, Inc.</holder>
</copyright>
<legalnotice>
<para>This documentation 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.</para>
<para>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.</para>
<para>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., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA</para>
<para>For more details see the file COPYING in the source
distribution of GNUPG.</para>
</legalnotice>
</bookinfo>
<toc></toc>
<chapter id="intro">
<title>Introduction</title>
<sect1 id="feedback">
<title>Feedback</title>
<para>Well, I'm german and I find it hard to express myself in
english. So if you find some phrases and/or words that I used
in a wrong way (and you will find them :-) ), please send me a
mail, to let me correct this. Please send me notes about
typos, too.</para>
</sect1>
<sect1 id="whatis">
<title>What is GBUPG</title>
<para>GNUPG is a free data encryption and signing tool.
<screen>
<prompt/$/ <userinput>gpg --version</>
</screen>
</sect1>
</chapter>
<reference>
<title>Manual Pages</title>
<partintro>
<para>These are some short man(1) pages</para>
</partintro>
<refentry>
<refmeta>
<refentrytitle>gpg</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="tools">GNU Tools</refmiscinfo></refmiscinfo>
</refmeta>
<refsynopsisdiv>
<synopsis>
<command>gpg</command>
<optional><parameter>options</parameter></optional>
<replaceable class="parameter">file name</replaceable>
</synopsis>
<refpurpose>is the GNUU tool for signing and exncryption</>
<refsect1>
<title>Description</title>
<para> </para>
</refsect1>
</refentry>
</reference>
</book>

View File

@ -1,3 +1,14 @@
Wed Feb 25 11:40:04 1998 Werner Koch (wk@isil.d.shuttle.de)
* plaintext.c (ask_for_detached_datafile): add opt.verbose to
info output.
* openfile.c (open_sigfile): Try also name ending in ".asc"
Wed Feb 25 08:41:00 1998 Werner Koch (wk@isil.d.shuttle.de)
* keygen.c (generate_keypair): Fixed memory overflow.
Tue Feb 24 15:51:55 1998 Werner Koch (wk@isil.d.shuttle.de)
* parse-packet.c (parse_certificate): Support for S2K.

View File

@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.2d from Makefile.am
# Makefile.in generated automatically by automake 1.2f from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
@ -72,19 +72,25 @@ G10_LOCALEDIR = @G10_LOCALEDIR@
GENCAT = @GENCAT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTLSUB = @INTLSUB@
MKINSTALLDIRS = @MKINSTALLDIRS@
MPI_EXTRA_ASM_OBJS = @MPI_EXTRA_ASM_OBJS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
ZLIBS = @ZLIBS@
l = @l@
INCLUDES = -I$(top_srcdir)/include
EXTRA_DIST = OPTIONS pubring.asc
@ -229,14 +235,11 @@ install-binPROGRAMS: $(bin_PROGRAMS)
done
uninstall-binPROGRAMS:
$(NORMAL_UNINSTALL)
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
done
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
@ -244,7 +247,7 @@ uninstall-binPROGRAMS:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core
-rm -f *.o core *.core
clean-compile:
@ -270,8 +273,12 @@ ID: $(HEADERS) $(SOURCES) $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
@ -299,12 +306,7 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file; \
done
MKDEP = $(CC) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include .deps/.P
.deps/.P: $(BUILT_SOURCES)
echo > $@
-include $(DEP_FILES)
@ -317,13 +319,16 @@ distclean-depend:
maintainer-clean-depend:
-rm -rf .deps
.deps/%.P: %.c
@echo "Computing dependencies for $<..."
@o='o'; \
test -n "$o" && o='$$o'; \
$(MKDEP) $< >$@.tmp \
&& sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," < $@.tmp > $@ \
&& rm -f $@.tmp
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
< .deps/$(*F).p > .deps/$(*F).P
@-rm -f .deps/$(*F).p
info:
dvi:
check: all

View File

@ -1,11 +1,11 @@
# This is a sample option file
#
# Unless you you specify which option file to use with the
# commandline option "--options filename", g10 uses per
# default the file ~/.g10/options.
# commandline option "--options filename", gpg uses per
# default the file ~/.gnupg/options.
#
# An option file can contain all long options which are
# available in G10. If the first non white space character of
# available in GNUPG. If the first non white space character of
# a line is a '#', this line is ignored. Empty lines are also
# ignored.
#
@ -19,41 +19,6 @@
#-----------------------------------------------
# With some expections, those cannot be combined
add-key
# add key to the public keyring
change-passphrase
# change the passphrase of your secret keyring
check
# check a signature
decrypt
# decrypt data (default)
delete-key
# remove key from public keyring,
edit-sig
# edit a key signature. Currently you have only the option to delete
# some signatures.
encrypt
# (Can be combined with a "sign")
# encrypt data
export <names>
# Either export all keys from all keyrings (default keyrings and
# those registered via option "keyring"), or if at least one name is
# given, those of the givename. The new keyring is written to stdout
# or to the file given with option "output"
fingerprint
# show the fingerprints,
gen-key
# generate a new key pair, this is an interactive command.
gen-prime
# Generate a prime.
# With one argument: take it as the bitsize and make a simple prime of
@ -62,160 +27,10 @@ gen-prime
# With three arguments: same as above, but a third argument indicates
# that a generator should also be calculated.
list-packets
# List only the sequence of packets"},
print-mds
# print all message digests of all give filenames
sign
# (Can be combined with a "encrypt")
# make a signature
sign-key
# make a signature on a key in the keyring
# Argument is the userid of the key to sign.
# This looks for the key, displays the key and checks all
# existing signatures of this key. If the key is not yet signed
# by the default user (or the users given with "-l"), the programm
# displays the information of the key again, together with
# it's fingerprint and asked wehter it should be signed. This question
# is repeated for all users specified with "-l". The key is then signed
# and the keyring which contains the key is updated.
store
# simply packs the input data into a rfc1991 packet format
symmetric
# encrypt the input only with the symmetric (conventional) cipher.
# This asks for a passphrase.
test
# Used for testing some parts of the program
#----------------------------------------------
#------ Options without a long form ----------
#----------------------------------------------
-k
# List keyrings.
# Without arguments, all default public keyrings are listed
# With one argument, this keyring is listed.
#
# -kv is the same as -k
# -kvv list the signatures with every key
# -kvvv additional checks all signatures
# -kvc list fingerprints
# -kvvc list fingerprints and signatures
# Note that this is a kludge, to emulate the strange pgp syntax;
# combining it with other options may give other outputs.
-z n
# Set compress level to n.
# n = 0 disables compresson. Default compress level depends on
# the local zlib (6).
#-----------------------------------------------
#------------------- Options -------------------
#-----------------------------------------------
armor
# create ascii armored output
batch
# batch mode: never ask
no-batch
# disables batch
cache-all
# hold everything in memory
check-key
# check signatures on a key in the keyring
debug value|hexvalue
# set debugging flags,
debug-all
# enable full debugging
detach-sign
# make a detached signature,
dry-run
# don't make any changes
homedir dirname
# Set the name of the home directory which defaults to "~/.g10".
keyring filename
# add this filename to the list of keyrings.
# If the filename begins with a tilde and a slash, these are replaced
# by the HOME directory. If the filename does not contain a slash, it
# is assumed to be in "~/.g10"
local-user user-string
# use this user-string to sign or decrypt
no
# assume no on most questions
no-armor
# Assume the input data is not in ascii armored format.
no-default-keyring
# Do not add the default keyrings to the list of keyrings
no-greeting
# suppress the initial copyright etc. messages but do not enter batch mode.
no-verbose
# set verbose level to 0
options filename
# Ignored in option files.
no-options
# same as --options /dev/null. This option is detected
# before an attempt to open an option file
output filename
# use filename for output
passphrase-fd n
# Read the passphrase from file with the descriptor n. If you use
# 0 for n, the passphrase will be read from stdin. This can only be used
# if only one passphrase is supplied.
remote-user
# use this user-id for encryption"
secret-keyring filename
# add filename to the list of secret keyrings
# see "keyring" for further informations
status-fd n
# Write status informations to this file descriptor. If this option
# is not used, no status information is writte. This option is for the
# sake of a calling programm (e.g. a MUA) to ease up parsing of output
# and providing a defined set of status messages.
# FIXME: use a format ala "100 Blabla"?
verbose
# Give more informations suring processing. If used 2 times, the input data
# is listed in detail.
yes
# assume yes on most questions

View File

@ -137,7 +137,7 @@ strusage( int level )
static char *digests, *pubkeys, *ciphers;
const char *p;
switch( level ) {
case 11: p = "GNUPG"; break;
case 11: p = "gpg (GNUPG)"; break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
case 19: p = _(

View File

@ -502,7 +502,7 @@ generate_keypair()
tty_printf(_("You need a Passphrase to protect your secret key.\n\n") );
dek = m_alloc_secure( sizeof *dek );
dek = m_alloc_secure( sizeof *dek + 8 );
salt = (byte*)dek + sizeof *dek;
for(;;) {
dek->algo = CIPHER_ALGO_BLOWFISH;

View File

@ -124,7 +124,7 @@ open_outfile( const char *iname, int mode )
/****************
* Try to open a file without the extension ".sig"
* Try to open a file without the extension ".sig" or ".asc"
* Return NULL if such a file is not available.
*/
IOBUF
@ -135,7 +135,8 @@ open_sigfile( const char *iname )
if( iname ) {
len = strlen(iname);
if( len > 4 && !strcmp(iname + len - 4, ".sig") ) {
if( len > 4 && ( !strcmp(iname + len - 4, ".sig")
|| !strcmp(iname + len - 4, ".asc")) ) {
char *buf;
buf = m_strdup(iname);
buf[len-4] = 0 ;

View File

@ -160,7 +160,8 @@ ask_for_detached_datafile( md_filter_context_t *mfx, const char *inname )
}
if( !fp ) {
log_info("reading stdin ...\n");
if( opt.verbose )
log_info("reading stdin ...\n");
while( (c = getchar()) != EOF ) {
if( mfx->md )
md_putc(mfx->md, c );

View File

@ -1,3 +1,7 @@
Thu Feb 26 06:48:54 1998 Werner Koch (wk@isil.d.shuttle.de)
* config.links (X86_BROKEN_ALIGN): Added for some systems.
Mon Feb 23 12:21:40 1998 Werner Koch (wk@isil.d.shuttle.de)
* mpi/m68k/mpih-shift.S (Lspecial): Changed duplicate symbol.

View File

@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.2d from Makefile.am
# Makefile.in generated automatically by automake 1.2f from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
@ -72,19 +72,25 @@ G10_LOCALEDIR = @G10_LOCALEDIR@
GENCAT = @GENCAT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTLSUB = @INTLSUB@
MKINSTALLDIRS = @MKINSTALLDIRS@
MPI_EXTRA_ASM_OBJS = @MPI_EXTRA_ASM_OBJS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
ZLIBS = @ZLIBS@
l = @l@
INCLUDES = -I$(top_srcdir)/include
@ -180,9 +186,6 @@ distclean-noinstLIBRARIES:
maintainer-clean-noinstLIBRARIES:
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
@ -190,7 +193,7 @@ maintainer-clean-noinstLIBRARIES:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core
-rm -f *.o core *.core
clean-compile:
@ -213,8 +216,12 @@ ID: $(HEADERS) $(SOURCES) $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
@ -242,12 +249,7 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file; \
done
MKDEP = $(CC) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include .deps/.P
.deps/.P: $(BUILT_SOURCES)
echo > $@
-include $(DEP_FILES)
@ -260,13 +262,16 @@ distclean-depend:
maintainer-clean-depend:
-rm -rf .deps
.deps/%.P: %.c
@echo "Computing dependencies for $<..."
@o='o'; \
test -n "$o" && o='$$o'; \
$(MKDEP) $< >$@.tmp \
&& sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," < $@.tmp > $@ \
&& rm -f $@.tmp
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
< .deps/$(*F).p > .deps/$(*F).P
@-rm -f .deps/$(*F).p
info:
dvi:
check: all

View File

@ -12,11 +12,13 @@ echo '/* created by config.links - do not edit */' >./mpi/asm-syntax.h
case "${target}" in
i[34]86*-*-linuxaout* | i[34]86*-*-linuxoldld* | i[34]86*-*-*bsd*)
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
echo '#define X86_BROKEN_ALIGN' >>./mpi/asm-syntax.h
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
path="i386"
;;
i[56]86*-*-linuxaout* | i[56]86*-*-linuxoldld* | i[56]86*-*-*bsd*)
echo '#define BSD_SYNTAX' >>./mpi/asm-syntax.h
echo '#define X86_BROKEN_ALIGN' >>./mpi/asm-syntax.h
cat $srcdir/mpi/i386/syntax.h >>./mpi/asm-syntax.h
path="i586 i386"
;;

View File

@ -0,0 +1 @@

View File

@ -1,19 +1,10 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995 Free Software Foundation, Inc.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
@ -30,18 +21,19 @@ exec_prefix = @exec_prefix@
datadir = $(prefix)/@DATADIRNAME@
localedir = $(datadir)/locale
gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
CC = @CC@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
TUPDATE = tupdate
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
MSGMERGE = PATH=../src:$$PATH msgmerge
DEFS = @DEFS@
CFLAGS = @CFLAGS@
@ -55,7 +47,7 @@ SOURCES = cat-id-tbl.c
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
$(POFILES) $(SOURCES)
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
POTFILES = \
@ -71,7 +63,7 @@ INSTOBJEXT = @INSTOBJEXT@
.po.pox:
$(MAKE) $(PACKAGE).pot
$(TUPDATE) $(srcdir)/$(PACKAGE).pot $< > $*.pox
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
@ -85,68 +77,103 @@ INSTOBJEXT = @INSTOBJEXT@
&& rm -f $@ && $(GENCAT) $@ $*.msg
all: cat-id-tbl.c $(CATALOGS)
all: all-@USE_NLS@
$(PACKAGE).pot: $(POTFILES)
all-yes: cat-id-tbl.c $(CATALOGS)
all-no:
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
--files-from=$(srcdir)/POTFILES.in
if cmp -s $(PACKAGE).po $(srcdir)/$(PACKAGE).pot; then \
rm -f $(PACKAGE).po; \
else \
rm -f $(srcdir)/$(PACKAGE).pot \
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot; \
fi
rm -f $(srcdir)/$(PACKAGE).pot
mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
cat-id-tbl.c: stamp-cat-id
stamp-cat-id: $(PACKAGE).pot
rm -f cat-id-tbl.tmp.c
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
rm -f cat-id-tbl.tmp
sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp.c
if cmp -s cat-id-tbl.tmp.c $(srcdir)/cat-id-tbl.c; then \
rm cat-id-tbl.tmp.c; \
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
rm cat-id-tbl.tmp; \
else \
echo cat-id-tbl.c changed; \
rm -f $(srcdir)/cat-id-tbl.c; \
mv cat-id-tbl.tmp.c $(srcdir)/cat-id-tbl.c; \
mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
fi
cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
install: install-exec install-data
install-exec:
install-data: all
$(top_srcdir)/scripts/mkinstalldirs $(datadir)
catalogs='$(CATALOGS)'; \
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $(datadir); \
else \
$(top_srcdir)/mkinstalldirs $(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
if test "`echo $$cat | sed 's/.*\(\..*\)/\1/'`" = ".gmo"; then \
destdir=$(gnulocaledir); \
else \
destdir=$(localedir); \
fi; \
lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
cat=`basename $$cat`; \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$$destdir/$$lang/LC_MESSAGES; \
$(top_srcdir)/scripts/mkinstalldirs $$dir; \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $$dir; \
else \
$(top_srcdir)/mkinstalldirs $$dir; \
fi; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
fi; \
if test -r $$cat.m; then \
$(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
true; \
fi; \
fi; \
done
if test "$(PACKAGE)" = "gettext"; then \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $(gettextsrcdir); \
else \
$(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
# This installation goal is only used in GNU gettext. Packages which
# only use the library should use install instead.
install-src: install
$(top_srcdir)/scripts/mkinstalldirs $(gettextsrcdir)
cd $(srcdir) && \
$(INSTALL_DATA) Makefile.in.in $(gettextsrcdir)/po-Makefile.in.in
# Define this as empty until I found a useful application.
installcheck:
uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
done
rm -f $(gettextsrcdir)/po-Makefile.in.in
@ -154,39 +181,44 @@ check: all
cat-id-tbl.o: ../intl/libgettext.h
TAGS ID:
dvi info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp.c
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(GMOFILES)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
distdir: $(DEP_DISTFILES)
@for file in `cd $(srcdir) && echo $(DISTFILES)`; do \
test -f $(distdir)/$$file \
|| ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: update-po $(DISTFILES)
dists="$(DISTFILES)"; \
for file in $$dists; do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(PACKAGE).pot
PATH=`pwd`/../src:$$PATH; \
cd $(srcdir); \
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
mv $$lang.po $$lang.old.po; \
if $(TUPDATE) $(PACKAGE).pot $$lang.old.po > $$lang.po; then \
echo "$$lang:"; \
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
rm -f $$lang.old.po; \
else \
echo "tupdate for $$cat failed!"; \
echo "msgmerge for $$cat failed!"; \
rm -f $$lang.po; \
mv $$lang.old.po $$lang.po; \
fi; \
@ -198,12 +230,17 @@ POTFILES: POTFILES.in
else \
posrcprefix="../"; \
fi; \
sed -e '/^#/d' -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" \
-e '$$s/\(.*\) \\/\1/' < $(srcdir)/POTFILES.in > POTFILES )
rm -f $@-t $@ \
&& (sed -e '/^#/d' -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
Makefile: Makefile.in.in ../config.status POTFILES
cd .. && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= ./config.status
cd .. \
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View File

@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.2d from Makefile.am
# Makefile.in generated automatically by automake 1.2f from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
@ -72,19 +72,25 @@ G10_LOCALEDIR = @G10_LOCALEDIR@
GENCAT = @GENCAT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTLSUB = @INTLSUB@
MKINSTALLDIRS = @MKINSTALLDIRS@
MPI_EXTRA_ASM_OBJS = @MPI_EXTRA_ASM_OBJS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
ZLIBS = @ZLIBS@
l = @l@
INCLUDES = -I$(top_srcdir)/include
needed_libs = ../cipher/libcipher.a ../util/libutil.a ../mpi/libmpi.a ../util/libutil.a
@ -156,9 +162,6 @@ distclean-noinstPROGRAMS:
maintainer-clean-noinstPROGRAMS:
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
@ -166,7 +169,7 @@ maintainer-clean-noinstPROGRAMS:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core
-rm -f *.o core *.core
clean-compile:
@ -196,8 +199,12 @@ ID: $(HEADERS) $(SOURCES) $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
@ -225,12 +232,7 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file; \
done
MKDEP = $(CC) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include .deps/.P
.deps/.P: $(BUILT_SOURCES)
echo > $@
-include $(DEP_FILES)
@ -243,13 +245,16 @@ distclean-depend:
maintainer-clean-depend:
-rm -rf .deps
.deps/%.P: %.c
@echo "Computing dependencies for $<..."
@o='o'; \
test -n "$o" && o='$$o'; \
$(MKDEP) $< >$@.tmp \
&& sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," < $@.tmp > $@ \
&& rm -f $@.tmp
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
< .deps/$(*F).p > .deps/$(*F).P
@-rm -f .deps/$(*F).p
info:
dvi:
check: all

View File

@ -1,3 +1,8 @@
Thu Feb 26 14:36:51 1998 Werner Koch (wk@isil.d.shuttle.de)
* secmem.c (lock_pool): No error if EAGAIN is returned instead
of EPERM.
Fri Feb 20 17:43:05 1998 Werner Koch (wk@isil.d.shuttle.de)
* ttyio.c [MINGW32]: Add support for mingw32.

View File

@ -1,6 +1,6 @@
# Makefile.in generated automatically by automake 1.2d from Makefile.am
# Makefile.in generated automatically by automake 1.2f from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
@ -72,19 +72,25 @@ G10_LOCALEDIR = @G10_LOCALEDIR@
GENCAT = @GENCAT@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTLSUB = @INTLSUB@
MKINSTALLDIRS = @MKINSTALLDIRS@
MPI_EXTRA_ASM_OBJS = @MPI_EXTRA_ASM_OBJS@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
ZLIBS = @ZLIBS@
l = @l@
INCLUDES = -I$(top_srcdir)/include
@ -143,9 +149,6 @@ distclean-noinstLIBRARIES:
maintainer-clean-noinstLIBRARIES:
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
@ -153,7 +156,7 @@ maintainer-clean-noinstLIBRARIES:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core
-rm -f *.o core *.core
clean-compile:
@ -176,8 +179,12 @@ ID: $(HEADERS) $(SOURCES) $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
@ -205,12 +212,7 @@ distdir: $(DISTFILES)
|| cp -p $$d/$$file $(distdir)/$$file; \
done
MKDEP = $(CC) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include .deps/.P
.deps/.P: $(BUILT_SOURCES)
echo > $@
-include $(DEP_FILES)
@ -223,13 +225,16 @@ distclean-depend:
maintainer-clean-depend:
-rm -rf .deps
.deps/%.P: %.c
@echo "Computing dependencies for $<..."
@o='o'; \
test -n "$o" && o='$$o'; \
$(MKDEP) $< >$@.tmp \
&& sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," < $@.tmp > $@ \
&& rm -f $@.tmp
%.o: %.c
@echo '$(COMPILE) -c $<'; \
$(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
%.lo: %.c
@echo '$(LTCOMPILE) -c $<'; \
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
< .deps/$(*F).p > .deps/$(*F).P
@-rm -f .deps/$(*F).p
info:
dvi:
check: all

View File

@ -82,7 +82,11 @@ lock_pool( void *p, size_t n )
}
if( err ) {
if( errno != EPERM )
if( errno != EPERM
#ifdef EAGAIN /* OpenBSD returns this */
&& errno != EAGAIN
#endif
)
log_error("can´t lock memory: %s\n", strerror(err));
show_warning = 1;
}