See ChangeLog: Tue Jun 15 14:23:10 CEST 1999 Werner Koch

This commit is contained in:
Werner Koch 1999-06-15 12:31:07 +00:00
parent b5f36dd0dd
commit 9da1694e19
21 changed files with 187 additions and 34 deletions

View File

@ -29,10 +29,10 @@ nh@df.lth.se
Weak key patches.
GNUPG Rémi Guyomarch ????????????
Assigns changes.
GNUPG Rémi Guyomarch 1999-05-25
Assigns past and future changes. (g10/compress.c, g10/encr-data.c,
g10/free-packet.c, g10/mdfilter.c, g10/plaintext.c, util/iobuf.c)
rguyom@mail.dotcom.fr
Various speed up patches.
TRANSLATIONS Marco d'Itri 1997-02-22

7
BUGS
View File

@ -46,6 +46,11 @@ and after about half a day in the rsync snapshots.
rndunix hangs on hp/ux. The problme is related to my_plcose which is
not always called. (I suggest to use EGD instead of rndunix.)
[ **] #19 1999-06-11
"trustdb transaction too large" with about 500 signatures on a key
FAEBD5FC.
Next #20
Next #19

View File

@ -1,6 +1,10 @@
Thu Jun 10 14:18:23 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
Tue Jun 15 12:21:08 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
* acinclude.m4 (GNUPG_SYS_NM_PARSE): Support for {net,free}bsd,
Thu Jun 10 14:18:23 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
* configure.in (ZLIB,GDBM): Check both, header and lib.
Sat Jun 5 15:30:33 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>

View File

@ -1,6 +1,12 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = intl zlib util mpi cipher tools g10 po doc checks
if COMPILE_LIBGCRYPT
gcrypt = gcrypt
else
gcrypt =
endif
SUBDIRS = intl zlib util mpi cipher tools g10 po doc checks ${gcrypt}
EXTRA_DIST = VERSION PROJECTS BUGS

6
NEWS
View File

@ -1,6 +1,4 @@
* New option -N to insert notations and a --set-policy-url.
* New subcommand "delsig" in the edit menu.
* The name of the output file is not anymore the one which is
@ -12,7 +10,9 @@
* latin-2 character set works (--charset=iso-8859-2).
* New option --with-key-data to list the public key parameters
* New option --with-key-data to list the public key parameters.
New option -N to insert notations and a --set-policy-url.
A couple of other options to allow restting of options.
Noteworthy changes in version 0.9.7

1
THANKS
View File

@ -58,6 +58,7 @@ Max Valianskiy maxcom@maxcom.ml.org
Michael Roth mroth@nessie.de
Michael Sobolev mss@despair.transas.com
Nicolas Graner Nicolas.Graner@cri.u-psud.fr
NIIBE Yutaka gniibe@chroot.org
Niklas Hernaeus
Nimrod Zimerman zimerman@forfree.at
N J Doye nic@niss.ac.uk

View File

@ -404,7 +404,7 @@ case "$host_os" in
aix*)
ac_symcode='[BCDTU]'
;;
openbsd* | sunos* | cygwin32* | mingw32*)
freebsd* | netbsd* | openbsd* | sunos* | cygwin32* | mingw32*)
ac_sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
ac_symxfrm='_\1 \1'
;;

View File

@ -89,6 +89,8 @@ dummy_get_nbits( int algo, MPI *pkey )
/****************
* Put the static entries into the table.
* This is out constructor function which fill the table
* of algorithms with the one we have statically linked.
*/
static void
setup_pubkey_table(void)

View File

@ -102,6 +102,16 @@ AC_ARG_WITH(included-zlib,
[g10_force_zlib=yes], [g10_force_zlib=no] )
AC_MSG_RESULT($g10_force_zlib)
dnl
dnl Check wether we want to compile libgcrypt
dnl
AC_MSG_CHECKING([whether compilation of libgcrypt is requested])
AC_ARG_ENABLE(libgcrypt,
[ --enable-libgcrypt compile the libgcrypt [default=no]],
[compile_libgcrypt="$enableval"],[compile_libgcrypt=yes])
AM_CONDITIONAL(COMPILE_LIBGCRYPT, test x$compile_libgcrypt = xyes)
AC_MSG_RESULT($compile_libgcrypt)
dnl Checks for programs.
@ -121,6 +131,14 @@ AC_ISC_POSIX
AC_PROG_INSTALL
AC_PROG_RANLIB
if test x$compile_libgcrypt = xyes; then
dnl Don't default to build shared libs
AM_DISABLE_SHARED
AM_PROG_LIBTOOL
fi
MPI_OPT_FLAGS=""
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
@ -577,6 +595,7 @@ doc/Makefile
tools/Makefile
zlib/Makefile
checks/Makefile
gcrypt/Makefile
])
dnl *-*wedit:notab*-* Please keep this as the last line.

View File

@ -391,6 +391,19 @@ B<--no-comment>
B<--comment> I<string>
Use I<string> as comment string in clear text signatures.
B<--default-comment>
Force to write the standard comment string in clear
text signatures. Use this to overwrite B<--comment>
from a config file.
B<--no-version>
Omit the version string in clear text signatures.
B<--emit-version>
Force to write the version string in clear text
signatures. Use this to overwrite a previous
B<--no-version> from a config file.
B<--notation-data>, B<-N> I<name>=<value>
Put the name value pair into the signature as notation data.
I<name> Must consists only of alphanumeric characters, digits
@ -493,6 +506,13 @@ B<--passphrase-fd> I<n>
B<--rfc1991>
Try to be more RFC1991 (PGP 2.x) compliant.
B<--openpgp>
Reset all packet, cipher and digest options to OpenPGP
behavior. Use this option to reset all previous
options like B<--rfc1991>, B<--force-v3-sigs>, B<--s2k-*>,
B<--cipher-algo>, B<--digest-algo> and B<--compress-algo> to
OpenPGP compliant values.
B<--force-v3-sigs>
OpenPGP states that an implementation should generate
v4 signatures but PGP 5.x recognizes v4 signatures only
@ -509,6 +529,11 @@ B<--lock-once>
and do not release the lock until the process
terminates.
B<--lock-multiple>
Release the locks every time a lock is no longer
needed. Use this to overwrite a previous B<--lock-once>
from a config file.
B<--no-verbose>
Reset verbose level to 0.

View File

@ -1,6 +1,22 @@
Thu Jun 10 14:18:23 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
Tue Jun 15 12:21:08 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
* g10.c (main): Made iterated+salted the default S2K method.
* Makefile.am (install-data-local): Use DESTDIR.
* passphrase.c (passphrase_to_dek): Emit missing-passphrase while in
batchmode.
* parse-packet.c (parse_pubkeyenc): Fixed a SEGV.
Mon Jun 14 21:18:54 CEST 1999 Michael Roth <mroth@nessie.de>
* g10.c: New options --openpgp, --no-tty, --emit-version,
--default-comment and --lock-multiple
Thu Jun 10 14:18:23 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
* free-packet.c (free_encrypted): Fixed EOF case (Remi).
(free_plaintext): Ditto.

View File

@ -82,11 +82,12 @@ $(PROGRAMS): $(needed_libs)
install-data-local:
$(mkinstalldirs) $(pkgdatadir)
$(INSTALL_DATA) $(srcdir)/options.skel $(pkgdatadir)/options.skel
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
$(INSTALL_DATA) $(srcdir)/options.skel \
$(DESTDIR)$(pkgdatadir)/options.skel
@set -e;\
if test -f $(bindir)/gpgm ; then
if test -f $(DESTDIR)$(bindir)/gpgm ; then
echo "removing obsolete gpgm binary"
rm $(bindir)/gpgm ;
rm $(DESTDIR)$(bindir)/gpgm ;
fi

View File

@ -405,6 +405,20 @@ write_pubkey_enc_from_list( PK_LIST pk_list, DEK *dek, IOBUF out )
enc->pubkey_algo = pk->pubkey_algo;
keyid_from_pk( pk, enc->keyid );
enc->throw_keyid = opt.throw_keyid;
/* Okay, what's going on: We have the session key somewhere in
* the structure DEK and want to encode this session key in
* an integer value of n bits. pubkey_nbits gives us the
* number of bits we have to use. We then encode the session
* key in some way and we get it back in the big intger value
* FRAME. Then we use FRAME, the public key PK->PKEY and the
* algorithm number PK->PUBKEY_ALGO and pass it to pubkey_encrypt
* which returns the encrypted value in the array ENC->DATA.
* This array has a size which depends on the used algorithm
* (e.g. 2 for ElGamal). We don't need frame anymore because we
* have everything now in enc->data which is the passed to
* build_packet()
*/
frame = encode_session_key( dek, pubkey_nbits( pk->pubkey_algo,
pk->pkey ) );
rc = pubkey_encrypt( pk->pubkey_algo, enc->data, frame, pk->pkey );

View File

@ -116,11 +116,13 @@ enum cmd_and_opt_values { aNull = 0,
oStatusFD,
oNoComment,
oNoVersion,
oEmitVersion,
oCompletesNeeded,
oMarginalsNeeded,
oMaxCertDepth,
oLoadExtension,
oRFC1991,
oOpenPGP,
oCipherAlgo,
oDigestAlgo,
oCompressAlgo,
@ -132,6 +134,7 @@ enum cmd_and_opt_values { aNull = 0,
oNoArmor,
oNoDefKeyring,
oNoGreeting,
oNoTTY,
oNoOptions,
oNoBatch,
oHomedir,
@ -147,6 +150,7 @@ enum cmd_and_opt_values { aNull = 0,
oSetPolicyURL,
oUseEmbeddedFilename,
oComment,
oDefaultComment,
oThrowKeyid,
oForceV3Sigs,
oForceMDC,
@ -157,6 +161,7 @@ enum cmd_and_opt_values { aNull = 0,
oNotDashEscaped,
oEscapeFrom,
oLockOnce,
oLockMultiple,
oKeyServer,
oEncryptTo,
oNoEncryptTo,
@ -226,6 +231,7 @@ static ARGPARSE_OPTS opts[] = {
{ oOutput, "output", 2, N_("use as output file")},
{ oVerbose, "verbose", 0, N_("verbose") },
{ oQuiet, "quiet", 0, N_("be somewhat more quiet") },
{ oNoTTY, "no-tty", 0, N_("don't use the terminal at all") },
{ oForceV3Sigs, "force-v3-sigs", 0, N_("force v3 signatures") },
{ oForceMDC, "force-mdc", 0, N_("always use a MDC for encryption") },
{ oDryRun, "dry-run", 0, N_("do not make any changes") },
@ -249,6 +255,7 @@ static ARGPARSE_OPTS opts[] = {
{ oMaxCertDepth, "max-cert-depth", 1, "@" },
{ oLoadExtension, "load-extension" ,2, N_("|FILE|load extension module FILE")},
{ oRFC1991, "rfc1991", 0, N_("emulate the mode described in RFC1991")},
{ oOpenPGP, "openpgp", 0, N_("set all packet, cipher and digest options to OpenPGP behavior")},
{ oS2KMode, "s2k-mode", 1, N_("|N|use passphrase mode N")},
{ oS2KDigest, "s2k-digest-algo",2,
N_("|NAME|use message digest algorithm NAME for passphrases")},
@ -299,10 +306,13 @@ static ARGPARSE_OPTS opts[] = {
{ oSetFilename, "set-filename", 2, "@" },
{ oSetPolicyURL, "set-policy-url", 2, "@" },
{ oComment, "comment", 2, "@" },
{ oNoVersion, "no-version", 0, "@"},
{ oDefaultComment, "default-comment", 0, "@" },
{ oNoVersion, "no-version", 0, "@"},
{ oEmitVersion, "emit-version", 0, "@"},
{ oNotDashEscaped, "not-dash-escaped", 0, "@" },
{ oEscapeFrom, "escape-from-lines", 0, "@" },
{ oLockOnce, "lock-once", 0, "@" },
{ oLockMultiple, "lock-multiple", 0, "@" },
{ oLoggerFD, "logger-fd",1, "@" },
{ oUseEmbeddedFilename, "use-embedded-filename", 0, "@" },
{0} };
@ -513,11 +523,11 @@ main( int argc, char **argv )
create_dotlock(NULL); /* register locking cleanup */
i18n_init();
opt.compress = -1; /* defaults to standard compress level */
/* fixme: set the next two to zero and decide where used */
/* note: if you change these lines, look at oOpenPGP */
opt.def_cipher_algo = 0;
opt.def_digest_algo = 0;
opt.def_compress_algo = 2;
opt.s2k_mode = 1; /* salted */
opt.s2k_mode = 3; /* iterated+salted */
opt.s2k_digest_algo = DIGEST_ALGO_RMD160;
opt.s2k_cipher_algo = CIPHER_ALGO_BLOWFISH;
opt.completes_needed = 1;
@ -655,6 +665,7 @@ main( int argc, char **argv )
case oArmor: opt.armor = 1; opt.no_armor=0; break;
case oOutput: opt.outfile = pargs.r.ret_str; break;
case oQuiet: opt.quiet = 1; break;
case oNoTTY: opt.quiet = 1; tty_no_terminal(1); break;
case oDryRun: opt.dry_run = 1; break;
case oInteractive: opt.interactive = 1; break;
case oVerbose: g10_opt_verbose++;
@ -687,6 +698,7 @@ main( int argc, char **argv )
case oQuickRandom: quick_random_gen(1); break;
case oNoComment: opt.no_comment=1; break;
case oNoVersion: opt.no_version=1; break;
case oEmitVersion: opt.no_version=0; break;
case oCompletesNeeded: opt.completes_needed = pargs.r.ret_int; break;
case oMarginalsNeeded: opt.marginals_needed = pargs.r.ret_int; break;
case oMaxCertDepth: opt.max_cert_depth = pargs.r.ret_int; break;
@ -712,6 +724,20 @@ main( int argc, char **argv )
opt.no_comment = 1;
opt.escape_from = 1;
break;
case oOpenPGP:
opt.rfc1991 = 0;
opt.escape_from = 0;
opt.force_v3_sigs = 0;
opt.compress_keys = 0; /* not mandated but we do it */
opt.compress_sigs = 0; /* ditto. */
opt.not_dash_escaped = 0;
opt.def_cipher_algo = 0;
opt.def_digest_algo = 0;
opt.def_compress_algo = 2;
opt.s2k_mode = 3; /* iterated+salted */
opt.s2k_digest_algo = DIGEST_ALGO_RMD160;
opt.s2k_cipher_algo = CIPHER_ALGO_BLOWFISH;
break;
case oEmuChecksumBug: opt.emulate_bugs |= EMUBUG_GPGCHKSUM; break;
case oCompressSigs: opt.compress_sigs = 1; break;
case oRunAsShmCP:
@ -725,6 +751,7 @@ main( int argc, char **argv )
case oSetPolicyURL: opt.set_policy_url = pargs.r.ret_str; break;
case oUseEmbeddedFilename: opt.use_embedded_filename = 1; break;
case oComment: opt.comment_string = pargs.r.ret_str; break;
case oDefaultComment: opt.comment_string = NULL; break;
case oThrowKeyid: opt.throw_keyid = 1; break;
case oForceV3Sigs: opt.force_v3_sigs = 1; break;
case oForceMDC: opt.force_mdc = 1; break;
@ -758,6 +785,7 @@ main( int argc, char **argv )
case oNotDashEscaped: opt.not_dash_escaped = 1; break;
case oEscapeFrom: opt.escape_from = 1; break;
case oLockOnce: opt.lock_once = 1; break;
case oLockMultiple: opt.lock_once = 0; break;
case oKeyServer: opt.keyserver_name = pargs.r.ret_str; break;
case oNotation: add_notation_data( pargs.r.ret_str ); break;

View File

@ -640,7 +640,7 @@ parse_pubkeyenc( IOBUF inp, int pkttype, unsigned long pktlen, PACKET *packet )
int i, ndata;
PKT_pubkey_enc *k;
k = packet->pkt.pubkey_enc = m_alloc(sizeof *packet->pkt.pubkey_enc );
k = packet->pkt.pubkey_enc = m_alloc_clear(sizeof *packet->pkt.pubkey_enc);
if( pktlen < 12 ) {
log_error("packet(%d) too short\n", pkttype);
goto leave;

View File

@ -184,8 +184,10 @@ passphrase_to_dek( u32 *keyid, int cipher_algo, STRING2KEY *s2k, int mode )
pw = m_alloc_secure( strlen(fd_passwd)+1 );
strcpy( pw, fd_passwd );
}
else if( opt.batch )
else if( opt.batch ) {
write_status( STATUS_MISSING_PASSPHRASE );
log_fatal("Can't query password in batchmode\n");
}
else {
pw = cpr_get_hidden("passphrase.enter", _("Enter passphrase: ") );
tty_kill_prompt();

View File

@ -27,6 +27,7 @@ char *tty_get( const char *prompt );
char *tty_get_hidden( const char *prompt );
void tty_kill_prompt(void);
int tty_get_answer_is_yes( const char *prompt );
int tty_no_terminal(int onoff);
#endif /*G10_TTYIO_H*/

View File

@ -24,6 +24,8 @@ gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
DESTDIR =
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
@ -111,16 +113,16 @@ install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(datadir); \
$(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
*.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \
*) destdir=$(DESTDIR)$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$$destdir/$$lang/LC_MESSAGES; \
@ -153,12 +155,12 @@ install-data-yes: all
done
if test "$(PACKAGE)" = "gettext"; then \
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(gettextsrcdir); \
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(gettextsrcdir)/Makefile.in.in; \
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
@ -171,12 +173,12 @@ uninstall:
for cat in $$catalogs; do \
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; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
done
rm -f $(gettextsrcdir)/po-Makefile.in.in
rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
check: all

View File

@ -2252,7 +2252,7 @@ msgstr "la clave p
#: g10/sig-check.c:292
msgid "public key is %lu seconds newer than the signature\n"
msgstr "la clave pública es %lu segundos más nueva que la firma\n"
msgstr "la clave pública es %lu segundos más nueva que la firma\n"
#: g10/sig-check.c:308
msgid "NOTE: signature key expired %s\n"
@ -2573,7 +2573,7 @@ msgstr "Revocaci
#: g10/trustdb.c:1417
msgid "Invalid user ID revocation"
msgstr "Revocación identificativo de usuario no válida.\n"
msgstr "Revocación identificativo de usuario no válida."
#: g10/trustdb.c:1512
msgid "Too many preferences"

View File

@ -1,3 +1,7 @@
Mon Jun 14 21:18:54 CEST 1999 Michael Roth <mroth@nessie.de>
* ttyio.c: tty_no_terminal() new.
Sat Jun 5 15:30:33 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
* strgutil.c (set_native_charset): Support Latin-2

View File

@ -58,6 +58,7 @@ static FILE *ttyfp = NULL;
static int initialized;
static int last_prompt_len;
static int batchmode;
static int no_terminal;
#ifdef HAVE_TCGETATTR
static struct termios termsave;
@ -130,11 +131,22 @@ tty_batchmode( int onoff )
return old;
}
int
tty_no_terminal(int onoff)
{
int old = no_terminal;
no_terminal = onoff ? 1 : 0;
return old;
}
void
tty_printf( const char *fmt, ... )
{
va_list arg_ptr;
if (no_terminal)
return;
if( !initialized )
init_ttyfp();
@ -188,6 +200,9 @@ tty_printf( const char *fmt, ... )
void
tty_print_string( byte *p, size_t n )
{
if (no_terminal)
return;
if( !initialized )
init_ttyfp();
@ -236,6 +251,11 @@ do_get( const char *prompt, int hidden )
exit(2);
}
if (no_terminal) {
log_error("Sorry, no terminal at all requested - can't get input\n");
exit(2);
}
if( !initialized )
init_ttyfp();
@ -349,9 +369,12 @@ tty_get_hidden( const char *prompt )
void
tty_kill_prompt()
{
if ( no_terminal )
return;
if( !initialized )
init_ttyfp();
if( batchmode )
last_prompt_len = 0;
if( !last_prompt_len )