aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog21
-rw-r--r--g10/g10.c14
-rw-r--r--g10/pkclist.c22
-rw-r--r--g10/plaintext.c2
-rw-r--r--g10/sign.c16
-rw-r--r--g10/status.c3
6 files changed, 48 insertions, 30 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index ab2c38654..ebf62b7ba 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,24 @@
+2004-08-08 David Shaw <[email protected]>
+
+ * plaintext.c (handle_plaintext): Bigger buffer for extra safety.
+
+ * g10.c (main): New alias --throw-keyid for --throw-keyids, so
+ that it continues to work in old configuration files. Noted by
+ Jens Adam.
+
+ * pkclist.c (algo_available): --pgp8 now allows blowfish, zlib,
+ and bzip2.
+
+ * status.c (do_get_from_fd): Flush stdout if status isn't flushing
+ it for us. This guarantees that any menus that were displayed
+ before the prompt don't get stuck in a buffer. Noted by Peter
+ Palfrader. This is Debian bug #254072.
+
+ * sign.c (update_keysig_packet): Revert change of 2004-05-18. It
+ is not appropriate to strip policy and notations when remaking a
+ sig. That should only happen when specifically requested by the
+ user.
+
2004-08-05 David Shaw <[email protected]>
* armor.c (radix64_read): No armor CRC is legal according to the
diff --git a/g10/g10.c b/g10/g10.c
index 4248a8514..6e3608851 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -242,8 +242,8 @@ enum cmd_and_opt_values
oComment,
oDefaultComment,
oNoComments,
- oThrowKeyid,
- oNoThrowKeyid,
+ oThrowKeyids,
+ oNoThrowKeyids,
oShowPhotos,
oNoShowPhotos,
oPhotoViewer,
@@ -517,8 +517,10 @@ static ARGPARSE_OPTS opts[] = {
{ oDigestAlgo, "digest-algo", 2, "@"},
{ oCertDigestAlgo, "cert-digest-algo", 2 , "@" },
{ oCompressAlgo,"compress-algo", 2, "@"},
- { oThrowKeyid, "throw-keyids", 0, "@"},
- { oNoThrowKeyid, "no-throw-keyids", 0, "@" },
+ { oThrowKeyids, "throw-keyid", 0, "@"},
+ { oThrowKeyids, "throw-keyids", 0, "@"},
+ { oNoThrowKeyids, "no-throw-keyid", 0, "@" },
+ { oNoThrowKeyids, "no-throw-keyids", 0, "@" },
{ oShowPhotos, "show-photos", 0, "@" },
{ oNoShowPhotos, "no-show-photos", 0, "@" },
{ oPhotoViewer, "photo-viewer", 2, "@" },
@@ -1977,8 +1979,8 @@ main( int argc, char **argv )
free_strlist(opt.comments);
opt.comments=NULL;
break;
- case oThrowKeyid: opt.throw_keyid = 1; break;
- case oNoThrowKeyid: opt.throw_keyid = 0; break;
+ case oThrowKeyids: opt.throw_keyid = 1; break;
+ case oNoThrowKeyids: opt.throw_keyid = 0; break;
case oShowPhotos:
deprecated_warning(configname,configlineno,"--show-photos",
"--list-options ","show-photos");
diff --git a/g10/pkclist.c b/g10/pkclist.c
index c153baad5..45b1c1485 100644
--- a/g10/pkclist.c
+++ b/g10/pkclist.c
@@ -1087,15 +1087,17 @@ algo_available( preftype_t preftype, int algo, void *hint )
&& algo != CIPHER_ALGO_CAST5))
return 0;
- if((PGP7 || PGP8) && (algo != CIPHER_ALGO_IDEA
- && algo != CIPHER_ALGO_3DES
- && algo != CIPHER_ALGO_CAST5
- && algo != CIPHER_ALGO_AES
- && algo != CIPHER_ALGO_AES192
- && algo != CIPHER_ALGO_AES256
- && algo != CIPHER_ALGO_TWOFISH))
+ if(PGP7 && (algo != CIPHER_ALGO_IDEA
+ && algo != CIPHER_ALGO_3DES
+ && algo != CIPHER_ALGO_CAST5
+ && algo != CIPHER_ALGO_AES
+ && algo != CIPHER_ALGO_AES192
+ && algo != CIPHER_ALGO_AES256
+ && algo != CIPHER_ALGO_TWOFISH))
return 0;
+ /* PGP8 supports all the ciphers we do.. */
+
return algo && !check_cipher_algo( algo );
}
else if( preftype == PREFTYPE_HASH )
@@ -1119,10 +1121,12 @@ algo_available( preftype_t preftype, int algo, void *hint )
}
else if( preftype == PREFTYPE_ZIP )
{
- if((PGP6 || PGP7 || PGP8) && (algo != COMPRESS_ALGO_NONE
- && algo != COMPRESS_ALGO_ZIP))
+ if((PGP6 || PGP7) && (algo != COMPRESS_ALGO_NONE
+ && algo != COMPRESS_ALGO_ZIP))
return 0;
+ /* PGP8 supports all the compression algos we do */
+
return !check_compress_algo( algo );
}
else
diff --git a/g10/plaintext.c b/g10/plaintext.c
index 66d9d8e96..e32272232 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -66,7 +66,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
the format code (say, recode UTF-8 to local). */
if(!nooutput && is_status_enabled())
{
- char status[20];
+ char status[50];
sprintf(status,"%X %lu ",(byte)pt->mode,(ulong)pt->timestamp);
write_status_text_and_buffer(STATUS_PLAINTEXT,
diff --git a/g10/sign.c b/g10/sign.c
index efa936f0f..3ba6d6e0b 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1,6 +1,6 @@
/* sign.c - sign data
- * Copyright (C) 1998, 1999, 2000, 2001, 2002,
- * 2003 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003,
+ * 2004 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -1387,18 +1387,6 @@ update_keysig_packet( PKT_signature **ret_sig,
/* create a new signature packet */
sig = copy_signature (NULL, orig_sig);
-
- /* We've copied the signature, subpackets and all, but we don't
- want any old policies or notations coming over: the signature
- is being remade, so these need to be restated as well. Note
- that other subpackets like backsigs come over as well, but we
- want to keep those. We don't delete policies or notations from
- the unhashed area - since we don't put them there, this is a
- case of not messing about with things that we are not
- responsible for. */
-
- delete_sig_subpkt(sig->hashed,SIGSUBPKT_POLICY);
- delete_sig_subpkt(sig->hashed,SIGSUBPKT_NOTATION);
/* We need to create a new timestamp so that new sig expiration
calculations are done correctly... */
diff --git a/g10/status.c b/g10/status.c
index ef0cc8cbb..1ed1ca038 100644
--- a/g10/status.c
+++ b/g10/status.c
@@ -540,6 +540,9 @@ do_get_from_fd( const char *keyword, int hidden, int bool )
int i, len;
char *string;
+ if(statusfp!=stdout)
+ fflush(stdout);
+
write_status_text( bool? STATUS_GET_BOOL :
hidden? STATUS_GET_HIDDEN : STATUS_GET_LINE, keyword );