gnupg/g10 (ChangeLog keygen.c)

cvs user dshaw cvs at cvs.gnupg.org
Thu May 5 23:00:23 CEST 2005


    Date: Thursday, May 5, 2005 @ 23:18:47
  Author: dshaw
    Path: /cvs/gnupg/gnupg/g10

Modified: ChangeLog keygen.c

* keygen.c (keygen_set_std_prefs): Add SHA256 and BZip2 to default
preferences.


-----------+
 ChangeLog |    3 +++
 keygen.c  |   22 +++++++++++++++++++---
 2 files changed, 22 insertions(+), 3 deletions(-)


Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.728 gnupg/g10/ChangeLog:1.729
--- gnupg/g10/ChangeLog:1.728	Thu May  5 21:21:40 2005
+++ gnupg/g10/ChangeLog	Thu May  5 23:18:47 2005
@@ -1,5 +1,8 @@
 2005-05-05  David Shaw  <dshaw at jabberwocky.com>
 
+	* keygen.c (keygen_set_std_prefs): Add SHA256 and BZip2 to default
+	preferences.
+
 	* options.h, g10.c (main): Add new --default-sig-expire and
 	--default-cert-expire options.  Suggested by Florian Weimer.
 
Index: gnupg/g10/keygen.c
diff -u gnupg/g10/keygen.c:1.149 gnupg/g10/keygen.c:1.150
--- gnupg/g10/keygen.c:1.149	Thu May  5 21:21:40 2005
+++ gnupg/g10/keygen.c	Thu May  5 23:18:47 2005
@@ -348,7 +348,8 @@
             */
 
 	    /* Make sure we do not add more than 15 items here, as we
-	       could overflow the size of dummy_string. */
+	       could overflow the size of dummy_string.  We currently
+	       have at most 12. */
 	    if(!check_cipher_algo(CIPHER_ALGO_AES256))
 	      strcat(dummy_string,"S9 ");
 	    if(!check_cipher_algo(CIPHER_ALGO_AES192))
@@ -368,8 +369,23 @@
 	    if(!check_cipher_algo(CIPHER_ALGO_IDEA))
 	      strcat(dummy_string,"S1 ");
 
-	    /* SHA-1, RIPEMD160, ZLIB, ZIP */
-	    strcat(dummy_string,"H2 H3 Z2 Z1");
+	    /* SHA-1 */
+	    strcat(dummy_string,"H2 ");
+
+	    if(!check_digest_algo(DIGEST_ALGO_SHA256))
+	      strcat(dummy_string,"H8 ");
+
+	    /* RIPEMD160 */
+	    strcat(dummy_string,"H3 ");
+
+	    /* ZLIB */
+	    strcat(dummy_string,"Z2 ");
+
+	    if(!check_compress_algo(COMPRESS_ALGO_BZIP2))
+	      strcat(dummy_string,"Z3 ");
+
+	    /* ZIP */
+	    strcat(dummy_string,"Z1");
 
 	    string=dummy_string;
 	  }




More information about the Gnupg-commits mailing list