aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog17
-rw-r--r--g10/mainproc.c3
-rw-r--r--g10/parse-packet.c15
3 files changed, 32 insertions, 3 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index e12c6b2a8..e71b6a049 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,20 @@
+2001-09-18 Werner Koch <[email protected]>
+
+ * parse-packet.c (parse): Stop on impossible packet lengths.
+
+2001-09-17 Werner Koch <[email protected]>
+
+ * mainproc.c (print_notation_data): Wrap notation data status lines
+ after 50 chars.
+
+ * mainproc.c (proc_pubkey_enc): Make option try-all-secrets work.
+
+2001-09-14 Werner Koch <[email protected]>
+
+ * parse-packet.c (dump_sig_subpkt): List key server preferences
+ and show the revocable flag correctly. Contributed by Davod Shaw.
+
2001-09-09 Werner Koch <[email protected]>
* keyedit.c (keyedit_menu): No need to define another p.
diff --git a/g10/mainproc.c b/g10/mainproc.c
index 20a9b98d0..8bffddc50 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -300,6 +300,7 @@ proc_pubkey_enc( CTX c, PACKET *pkt )
|| enc->pubkey_algo == PUBKEY_ALGO_DSA
|| is_RSA(enc->pubkey_algo) ) {
if ( !c->dek && ((!enc->keyid[0] && !enc->keyid[1])
+ || opt.try_all_secrets
|| !seckey_available( enc->keyid )) ) {
if( opt.list_only )
result = -1;
@@ -746,7 +747,7 @@ print_notation_data( PKT_signature *sig )
print_string( log_stream(), p+n1, n2, 0 );
putc( '\n', log_stream() );
write_status_buffer ( STATUS_NOTATION_NAME, p , n1, 0 );
- write_status_buffer ( STATUS_NOTATION_DATA, p+n1, n2, 20 );
+ write_status_buffer ( STATUS_NOTATION_DATA, p+n1, n2, 50 );
}
if( (p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_POLICY, &n ) )) {
log_info(_("Policy: ") );
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index c1477b010..696428d2a 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -368,6 +368,14 @@ parse( IOBUF inp, PACKET *pkt, int onlykeypkts, off_t *retpos,
}
}
+ if (pktlen == 0xffffffff) {
+ /* with a some probability this is caused by a problem in the
+ * the uncompressing layer - in some error cases it just loops
+ * and spits out 0xff bytes. */
+ log_error ("%s: garbled packet detected\n", iobuf_where(inp) );
+ g10_exit (2);
+ }
+
if( out && pkttype ) {
if( iobuf_write( out, hdr, hdrlen ) == -1 )
rc = G10ERR_WRITE_FILE;
@@ -766,7 +774,8 @@ dump_sig_subpkt( int hashed, int type, int critical,
p = "regular expression";
break;
case SIGSUBPKT_REVOCABLE:
- p = "revocable";
+ if( length )
+ printf("%srevocable", *buffer? "":"not ");
break;
case SIGSUBPKT_KEY_EXPIRE:
if( length >= 4 )
@@ -829,7 +838,9 @@ dump_sig_subpkt( int hashed, int type, int critical,
printf(" %d", buffer[i] );
break;
case SIGSUBPKT_KS_FLAGS:
- p = "key server preferences";
+ fputs("key server preferences:",stdout);
+ for(i=0;i<length;i++)
+ printf(" %02X", buffer[i]);
break;
case SIGSUBPKT_PREF_KS:
p = "preferred key server";