1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-03 12:11:33 +01:00

*** empty log message ***

This commit is contained in:
Werner Koch 1998-10-01 07:23:00 +00:00
parent 9a854f1010
commit 6f73ec963a
20 changed files with 1684 additions and 1163 deletions

7
NEWS
View File

@ -12,11 +12,12 @@ Noteworthy changes in version 0.4.1
when changing a passphrase. when changing a passphrase.
* doc/OpenPGP talks about OpenPGP compliance, doc/HACKING gives * doc/OpenPGP talks about OpenPGP compliance, doc/HACKING gives
some hints about the internal structure. a few hints about the internal structure.
* checked gnupg against the August 1998 draft (07) and I believe * Checked gnupg against the August 1998 draft (07) and I believe
it is in compliance with this document (except one point). it is in compliance with this document (except for one point).
* Fixed some bugs in the import merging code.
Noteworthy changes in version 0.4.0 Noteworthy changes in version 0.4.0
----------------------------------- -----------------------------------

1
THANKS
View File

@ -5,6 +5,7 @@ errors.
Anand Kumria wildfire@progsoc.uts.edu.au Anand Kumria wildfire@progsoc.uts.edu.au
Ariel T Glenn ariel@columbia.edu Ariel T Glenn ariel@columbia.edu
Brian Moore bem@cmc.net
Brian Warner warner@lothar.com Brian Warner warner@lothar.com
Caskey L. Dickson caskey@technocage.com Caskey L. Dickson caskey@technocage.com
Charles Levert charles@comm.polymtl.ca Charles Levert charles@comm.polymtl.ca

5
TODO
View File

@ -9,7 +9,10 @@
* Why does OpenPGP say: The algorithm byte is included in the * Why does OpenPGP say: The algorithm byte is included in the
checksum of an encoded key, but the actual implementaion does checksum of an encoded key, but the actual implementaion does
not do this but works?? not do this but works - According to Hal Finney, this is a bug
in the specs.
* fix armor problems (see mails by Brian Moore).
* write a tool to extract selected keys from a file. * write a tool to extract selected keys from a file.

View File

@ -494,7 +494,7 @@ md_stop_debug( MD_HANDLE md )
} }
#ifdef HAVE_U64_TYPEDEF #ifdef HAVE_U64_TYPEDEF
{ /* a kludge to pull in the __muldi3 for Solaris */ { /* a kludge to pull in the __muldi3 for Solaris */
volatile u32 a = (u32)md; volatile u32 a = (u32)(ulong)md;
volatile u32 b = 42; volatile u32 b = 42;
volatile u64 c; volatile u64 c;
c = a * b; c = a * b;

View File

@ -22,7 +22,7 @@
Compatibility Notes Compatibility Notes
=================== ===================
GNUPG (>0.4) is in compliance with OpenPGP despite these exeptions: GNUPG (>=0.4.1) is in compliance with OpenPGP despite these exeptions:
* (5.1) The critical bit in signature subpackets is currently * (5.1) The critical bit in signature subpackets is currently
ignored. This will be fixed soon. ignored. This will be fixed soon.
@ -58,6 +58,8 @@
* multi-part armored messages are not supported. * multi-part armored messages are not supported.
MIME should be used instead. MIME should be used instead.
Most of the OPTIONAL stuff is implemented.

View File

@ -1,3 +1,7 @@
Wed Sep 30 10:15:33 1998 Werner Koch (wk@isil.d.shuttle.de)
* import.c (import_one): Fixed update of wrong keyblock.
Tue Sep 29 08:32:08 1998 me,,, (wk@tobold) Tue Sep 29 08:32:08 1998 me,,, (wk@tobold)
* mainproc.c (proc_plaintext): Display note for special filename. * mainproc.c (proc_plaintext): Display note for special filename.

View File

@ -213,7 +213,7 @@ static ARGPARSE_OPTS opts[] = {
{ oNoComment, "no-comment", 0, N_("do not write comment packets")}, { oNoComment, "no-comment", 0, N_("do not write comment packets")},
{ oCompletesNeeded, "completes-needed", 1, N_("(default is 1)")}, { oCompletesNeeded, "completes-needed", 1, N_("(default is 1)")},
{ oMarginalsNeeded, "marginals-needed", 1, N_("(default is 3)")}, { oMarginalsNeeded, "marginals-needed", 1, N_("(default is 3)")},
{ oLoadExtension, "load-extension" ,2, N_("|file|load extension module")}, { oLoadExtension, "load-extension" ,2, N_("|FILE|load extension module FILE")},
{ oRFC1991, "rfc1991", 0, N_("emulate the mode described in RFC1991")}, { oRFC1991, "rfc1991", 0, N_("emulate the mode described in RFC1991")},
{ oS2KMode, "s2k-mode", 1, N_("|N|use passphrase mode N")}, { oS2KMode, "s2k-mode", 1, N_("|N|use passphrase mode N")},
{ oS2KDigest, "s2k-digest-algo",2, { oS2KDigest, "s2k-digest-algo",2,

View File

@ -360,7 +360,7 @@ import_one( const char *fname, KBNODE keyblock )
if( (rc=lock_keyblock( &kbpos )) ) if( (rc=lock_keyblock( &kbpos )) )
log_error_f(keyblock_resource_name(&kbpos), log_error_f(keyblock_resource_name(&kbpos),
_("can't lock public keyring: %s\n"), g10_errstr(rc) ); _("can't lock public keyring: %s\n"), g10_errstr(rc) );
else if( (rc=update_keyblock( &kbpos, keyblock )) ) else if( (rc=update_keyblock( &kbpos, keyblock_orig )) )
log_error_f( keyblock_resource_name(&kbpos), log_error_f( keyblock_resource_name(&kbpos),
_("can't write keyblock: %s\n"), g10_errstr(rc) ); _("can't write keyblock: %s\n"), g10_errstr(rc) );
unlock_keyblock( &kbpos ); unlock_keyblock( &kbpos );
@ -398,7 +398,7 @@ import_one( const char *fname, KBNODE keyblock )
(ulong)keyid[1], g10_errstr(rc) ); (ulong)keyid[1], g10_errstr(rc) );
} }
else if( mod_key ) else if( mod_key )
rc = update_trustdb( new_key? pk: pk_orig); rc = update_trust_record( keyblock_orig );
else else
rc = clear_trust_checked_flag( new_key? pk : pk_orig ); rc = clear_trust_checked_flag( new_key? pk : pk_orig );
} }
@ -418,7 +418,6 @@ import_secret_one( const char *fname, KBNODE keyblock )
{ {
PKT_secret_key *sk; PKT_secret_key *sk;
KBNODE node, uidnode; KBNODE node, uidnode;
KBNODE keyblock_orig = NULL;
KBPOS kbpos; KBPOS kbpos;
u32 keyid[2]; u32 keyid[2];
int rc = 0; int rc = 0;
@ -477,7 +476,6 @@ import_secret_one( const char *fname, KBNODE keyblock )
log_error_f(fname, _("key %08lX: secret key not found: %s\n"), log_error_f(fname, _("key %08lX: secret key not found: %s\n"),
(ulong)keyid[1], g10_errstr(rc)); (ulong)keyid[1], g10_errstr(rc));
release_kbnode( keyblock_orig );
return rc; return rc;
} }

View File

@ -83,8 +83,13 @@ typedef struct {
typedef struct { typedef struct {
u32 keyid[2]; /* 64 bit keyid */
ulong local_id; /* internal use, valid if > 0 */ ulong local_id; /* internal use, valid if > 0 */
struct {
unsigned checked:1; /* signature has been checked */
unsigned valid:1; /* signature is good (if checked is set) */
unsigned unknown_critical:1;
} flags;
u32 keyid[2]; /* 64 bit keyid */
u32 timestamp; /* signature made */ u32 timestamp; /* signature made */
byte version; byte version;
byte sig_class; /* sig classification, append for MD calculation*/ byte sig_class; /* sig classification, append for MD calculation*/

View File

@ -811,6 +811,11 @@ parse_signature( IOBUF inp, int pkttype, unsigned long pktlen,
if( is_v4 ) { /*extract required information */ if( is_v4 ) { /*extract required information */
const byte *p; const byte *p;
/* FIXME: set sig->flags.unknown_critical is there is a
* critical bit set for packets which are not understood
* It does only make sense for hashed data.
*/
p = parse_sig_subpkt( sig->hashed_data, SIGSUBPKT_SIG_CREATED, NULL ); p = parse_sig_subpkt( sig->hashed_data, SIGSUBPKT_SIG_CREATED, NULL );
if( !p ) if( !p )
log_error("signature packet without timestamp\n"); log_error("signature packet without timestamp\n");

View File

@ -224,6 +224,8 @@ do_check( PKT_public_key *pk, PKT_signature *sig, MD_HANDLE digest )
rc = pubkey_verify( pk->pubkey_algo, result, sig->data, pk->pkey, rc = pubkey_verify( pk->pubkey_algo, result, sig->data, pk->pkey,
cmp_help, &ctx ); cmp_help, &ctx );
mpi_free( result ); mpi_free( result );
sig->flags.checked = 1;
sig->flags.valid = !rc;
return rc; return rc;
} }

View File

@ -1879,6 +1879,27 @@ is_algo_in_prefs( ulong lid, int preftype, int algo )
} }
static int
get_dir_record( PKT_public_key *pk, TRUSTREC *rec )
{
int rc=0;
if( pk->local_id ) {
if( tdbio_read_record( pk->local_id, rec, RECTYPE_DIR ) ) {
log_error("get_dir_record: read record failed\n");
rc = G10ERR_TRUSTDB;
}
}
else { /* no local_id: scan the trustdb */
if( (rc=tdbio_search_dir_bypk( pk, rec )) && rc != -1 )
log_error("get_dir_record: search_record failed: %s\n",
g10_errstr(rc));
}
return rc;
}
/**************** /****************
* This function simply looks for the key in the trustdb * This function simply looks for the key in the trustdb
* and makes sure that pk->local_id is set to the coreect value. * and makes sure that pk->local_id is set to the coreect value.
@ -1890,22 +1911,7 @@ int
query_trust_record( PKT_public_key *pk ) query_trust_record( PKT_public_key *pk )
{ {
TRUSTREC rec; TRUSTREC rec;
int rc=0; return get_dir_record( pk, &rec );
if( pk->local_id ) {
if( tdbio_read_record( pk->local_id, &rec, RECTYPE_DIR ) ) {
log_error("query_trust_record: read record failed\n");
return G10ERR_TRUSTDB;
}
}
else { /* no local_id: scan the trustdb */
if( (rc=tdbio_search_dir_bypk( pk, &rec )) && rc != -1 ) {
log_error("query_trust_record: search_record failed: %s\n",
g10_errstr(rc));
return rc;
}
}
return rc;
} }
@ -1915,17 +1921,9 @@ clear_trust_checked_flag( PKT_public_key *pk )
TRUSTREC rec; TRUSTREC rec;
int rc; int rc;
if( !pk->local_id ) { rc = get_dir_record( pk, &rec );
query_trust_record( pk ); if( rc )
if( !pk->local_id )
log_bug("clear_trust_checked_flag: Still no LID\n");
}
if( (rc=tdbio_read_record( pk->local_id, &rec, RECTYPE_DIR ))) {
log_error("clear_trust_checked_flag: read record failed: %s\n",
g10_errstr(rc));
return rc; return rc;
}
if( !(rec.r.dir.dirflags & DIRF_CHECKED) ) if( !(rec.r.dir.dirflags & DIRF_CHECKED) )
return 0; return 0;
@ -1942,6 +1940,44 @@ clear_trust_checked_flag( PKT_public_key *pk )
} }
/****************
* Update all the info from the public keyblock, the signatures-checked
* flag is reset. The key must already exist in the keydb.
* Note: This function clears all keyblock flags.
*/
int
update_trust_record( KBNODE keyblock )
{
PKT_public_key *primary_pk;
KBNODE node;
TRUSTREC drec;
int modified = 0;
int rc = 0;
clear_kbnode_flags( keyblock );
node = find_kbnode( keyblock, PKT_PUBLIC_KEY );
primary_pk = node->pkt->pkt.public_key;
rc = get_dir_record( primary_pk, &drec );
if( rc )
return rc;
if( drec.r.dir.dirflags & DIRF_CHECKED ) /* <<--- FIXME: remove this! */
modified = 1;
if( modified ) {
/* reset the checked flag */
drec.r.dir.dirflags &= ~DIRF_CHECKED;
rc = tdbio_write_record( &drec );
if( rc )
log_error("update_trust_record: write dir record failed: %s\n",
g10_errstr(rc));
}
return rc;
}
/**************** /****************
* helper function for insert_trust_record() * helper function for insert_trust_record()
*/ */

View File

@ -58,6 +58,7 @@ int keyid_from_lid( ulong lid, u32 *keyid );
int query_trust_record( PKT_public_key *pk ); int query_trust_record( PKT_public_key *pk );
int clear_trust_checked_flag( PKT_public_key *pk ); int clear_trust_checked_flag( PKT_public_key *pk );
int insert_trust_record( PKT_public_key *pk ); int insert_trust_record( PKT_public_key *pk );
int update_trust_record( KBNODE keyblock );
int update_ownertrust( ulong lid, unsigned new_trust ); int update_ownertrust( ulong lid, unsigned new_trust );
/*-- pkclist.c --*/ /*-- pkclist.c --*/

View File

@ -21,6 +21,7 @@
#include <config.h> #include <config.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <assert.h> #include <assert.h>
#include "mpi.h" #include "mpi.h"

665
po/de.po

File diff suppressed because it is too large Load Diff

668
po/en.po

File diff suppressed because it is too large Load Diff

665
po/fr.po

File diff suppressed because it is too large Load Diff

668
po/it.po

File diff suppressed because it is too large Load Diff

View File

@ -173,13 +173,13 @@ g10_log_bug( const char *fmt, ... )
void void
g10_log_bug0( const char *file, int line, const char *func ) g10_log_bug0( const char *file, int line, const char *func )
{ {
log_bug("Ohhhh jeeee ... (%s:%d:%s)\n", file, line, func ); log_bug("you found a bug ... (%s:%d:%s)\n", file, line, func );
} }
#else #else
void void
g10_log_bug0( const char *file, int line ) g10_log_bug0( const char *file, int line )
{ {
log_bug("Ohhhh jeeee ... (%s:%d)\n", file, line); log_bug("you found a bug ... (%s:%d)\n", file, line);
} }
#endif #endif

View File

@ -1,5 +1,5 @@
# Generated automatically from Makefile.in by configure. # Generated automatically from Makefile.in by configure.
# Makefile.in generated automatically by automake 1.3 from Makefile.am # Makefile.in generated automatically by automake 1.2f from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997, 1998 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 # This Makefile.in is free software; the Free Software Foundation
@ -37,8 +37,6 @@ mandir = ${prefix}/man
includedir = ${prefix}/include includedir = ${prefix}/include
oldincludedir = /usr/include oldincludedir = /usr/include
DISTDIR =
pkgdatadir = $(datadir)/gnupg pkgdatadir = $(datadir)/gnupg
pkglibdir = $(libdir)/gnupg pkglibdir = $(libdir)/gnupg
pkgincludedir = $(includedir)/gnupg pkgincludedir = $(includedir)/gnupg
@ -68,8 +66,8 @@ host_alias = i586-pc-linux-gnu
host_triplet = i586-pc-linux-gnu host_triplet = i586-pc-linux-gnu
target_alias = i586-pc-linux-gnu target_alias = i586-pc-linux-gnu
target_triplet = i586-pc-linux-gnu target_triplet = i586-pc-linux-gnu
CATALOGS = CATALOGS = en.gmo de.gmo it.gmo fr.gmo
CATOBJEXT = CATOBJEXT = .gmo
CC = gcc CC = gcc
CPP = gcc -E CPP = gcc -E
DATADIRNAME = share DATADIRNAME = share
@ -77,25 +75,25 @@ DYNLINK_LDFLAGS = -rdynamic
G10_LOCALEDIR = /usr/local//locale G10_LOCALEDIR = /usr/local//locale
GENCAT = GENCAT =
GMOFILES = en.gmo de.gmo it.gmo fr.gmo GMOFILES = en.gmo de.gmo it.gmo fr.gmo
GMSGFMT = GMSGFMT = /usr/local/bin/msgfmt
GT_NO = GT_NO =
GT_YES = #YES# GT_YES = #YES#
INCLUDE_LOCALE_H = #include <locale.h> INCLUDE_LOCALE_H = #include <locale.h>
INSTOBJEXT = INSTOBJEXT = .mo
INTLDEPS = INTLDEPS = $(top_builddir)/intl/libintl.a
INTLLIBS = INTLLIBS = $(top_builddir)/intl/libintl.a
INTLOBJS = INTLOBJS = $(GETTOBJS)
MKINSTALLDIRS = scripts/mkinstalldirs MKINSTALLDIRS = scripts/mkinstalldirs
MPI_EXTRA_ASM_OBJS = MPI_EXTRA_ASM_OBJS =
MSGFMT = MSGFMT = /usr/local/bin/msgfmt
PACKAGE = gnupg PACKAGE = gnupg
POFILES = en.po de.po it.po fr.po POFILES = en.po de.po it.po fr.po
POSUB = POSUB = po
RANLIB = ranlib RANLIB = ranlib
USE_INCLUDED_LIBINTL = no USE_INCLUDED_LIBINTL = yes
USE_NLS = no USE_NLS = yes
VERSION = 0.4.0a VERSION = 0.4.0a
ZLIBS = ../zlib/libzlib.a ZLIBS =
l = l =
CFLAGS = -O -Wall CFLAGS = -O -Wall
@ -105,7 +103,7 @@ EXTRA_DIST = README algorithm.doc ChangeLog example.c
# I found no other easy way to use this only if zlib is neede # I found no other easy way to use this only if zlib is neede
# doing this with SUBDIR = @xxx@ in the top Makefile.am does not # doing this with SUBDIR = @xxx@ in the top Makefile.am does not
# work because automake doesn't scan this Makefile.am here. # work because automake doesn't scan this Makefile.am here.
noinst_LIBRARIES = libzlib.a #noinst_LIBRARIES = libzlib.a
libzlib_a_SOURCES = adler32.c compress.c crc32.c gzio.c \ libzlib_a_SOURCES = adler32.c compress.c crc32.c gzio.c \
uncompr.c deflate.c trees.c zutil.c \ uncompr.c deflate.c trees.c zutil.c \
@ -124,7 +122,7 @@ LIBRARIES = $(noinst_LIBRARIES)
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I.. DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
CPPFLAGS = CPPFLAGS =
LDFLAGS = LDFLAGS =
LIBS = -ldl LIBS = -ldl -lz
libzlib_a_LIBADD = libzlib_a_LIBADD =
libzlib_a_OBJECTS = adler32.o compress.o crc32.o gzio.o uncompr.o \ libzlib_a_OBJECTS = adler32.o compress.o crc32.o gzio.o uncompr.o \
deflate.o trees.o zutil.o inflate.o infblock.o inftrees.o infcodes.o \ deflate.o trees.o zutil.o inflate.o infblock.o inftrees.o infcodes.o \
@ -146,14 +144,14 @@ DEP_FILES = .deps/adler32.P .deps/compress.P .deps/crc32.P \
SOURCES = $(libzlib_a_SOURCES) SOURCES = $(libzlib_a_SOURCES)
OBJECTS = $(libzlib_a_OBJECTS) OBJECTS = $(libzlib_a_OBJECTS)
all: Makefile $(LIBRARIES) default: all
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .S .c .o .s .SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu zlib/Makefile cd $(top_srcdir) && $(AUTOMAKE) --gnu zlib/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \ cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
@ -269,6 +267,8 @@ install: install-exec install-data all
uninstall: uninstall:
all: Makefile $(LIBRARIES)
install-strip: install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs: installdirs:
@ -305,7 +305,7 @@ maintainer-clean: maintainer-clean-noinstLIBRARIES \
@echo "This command is intended for maintainers to use;" @echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ .PHONY: default mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
mostlyclean-compile distclean-compile clean-compile \ mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile tags mostlyclean-tags distclean-tags \ maintainer-clean-compile tags mostlyclean-tags distclean-tags \