diff options
Diffstat (limited to 'g10')
-rw-r--r-- | g10/ChangeLog | 8 | ||||
-rw-r--r-- | g10/pkclist.c | 4 | ||||
-rw-r--r-- | g10/revoke.c | 3 | ||||
-rw-r--r-- | g10/trustdb.c | 13 |
4 files changed, 22 insertions, 6 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index cd202aa89..69c109209 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,11 @@ +Tue Dec 29 19:55:38 CET 1998 Werner Koch <[email protected]> + + * revoke.c (gen_revoke): Removed compression. + + * pkclist.c (do_we_trust_pre): special check for revoked keys + + * trustdb.c (update_trust_record): Fixed revoke flag. + Tue Dec 29 14:41:47 CET 1998 Werner Koch <[email protected]> * misc.c (disable_core_dumps): Check for EINVAL (Atari) diff --git a/g10/pkclist.c b/g10/pkclist.c index 414c7efd2..6c08a6a45 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -369,7 +369,9 @@ do_we_trust_pre( PKT_public_key *pk, int trustlevel ) { int rc = do_we_trust( pk, trustlevel ); - if( !opt.batch && !rc ) { + if( (trustlevel & TRUST_FLAG_REVOKED) && !rc ) + return 0; + else if( !opt.batch && !rc ) { tty_printf(_( "It is NOT certain that the key belongs to its owner.\n" "If you *really* know what you are doing, you may answer\n" diff --git a/g10/revoke.c b/g10/revoke.c index fd940dbc0..88af788a9 100644 --- a/g10/revoke.c +++ b/g10/revoke.c @@ -148,9 +148,6 @@ gen_revoke( const char *uname ) afx.what = 1; afx.hdrlines = "Comment: A revocation certificate should follow\n"; iobuf_push_filter( out, armor_filter, &afx ); - if( opt.compress ) - iobuf_push_filter( out, compress_filter, &zfx ); - /* create it */ rc = make_keysig_packet( &sig, pk, NULL, NULL, sk, 0x20, 0, NULL, NULL); diff --git a/g10/trustdb.c b/g10/trustdb.c index cb5be1028..759720cd7 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -2939,9 +2939,18 @@ update_trust_record( KBNODE keyblock, int recheck, int *modified ) /* delete keyrecords from the trustdb which are not anymore used */ /* should we really do this, or is it better to keep them and */ /* mark as unused? */ + /* And set the revocation flag into the dir record */ + drec.r.dir.dirflags &= ~DIRF_REVOKED; lastrecno = 0; for( recno=drec.r.dir.keylist; recno; recno = krec.r.key.next ) { read_record( recno, &krec, RECTYPE_KEY ); + if( recno == drec.r.dir.keylist ) { /* this is the primary key */ + if( (krec.r.key.keyflags & KEYF_REVOKED) ) { + drec.r.dir.dirflags |= DIRF_REVOKED; + drec.dirty = 1; + } + } + if( !qry_recno_list( recno_list, recno, RECTYPE_KEY ) ) { /* delete this one */ if( !lastrecno ) { @@ -2994,11 +3003,11 @@ update_trust_record( KBNODE keyblock, int recheck, int *modified ) if( rc ) rc = tdbio_cancel_transaction(); else { + if( modified && tdbio_is_dirty() ) + *modified = 1; drec.r.dir.dirflags |= DIRF_CHECKED; drec.r.dir.dirflags &= ~DIRF_VALVALID; write_record( &drec ); - if( modified && tdbio_is_dirty() ) - *modified = 1; rc = tdbio_end_transaction(); } rel_recno_list( &recno_list ); |