gnupg/g10 (ChangeLog misc.c)

cvs user dshaw cvs at cvs.gnupg.org
Wed Nov 3 21:30:47 CET 2004


    Date: Wednesday, November 3, 2004 @ 21:35:28
  Author: dshaw
    Path: /cvs/gnupg/gnupg/g10

Modified: ChangeLog misc.c

* misc.c (print_digest_algo_note): The latest 2440bis drafts deprecates
MD5, so give a warning. (print_pubkey_algo_note, print_cipher_algo_note,
print_digest_algo_note): Give the algorithm name in the experimental algo
warning.


-----------+
 ChangeLog |    8 +++++++
 misc.c    |   66 ++++++++++++++++++++++++++++--------------------------------
 2 files changed, 39 insertions(+), 35 deletions(-)


Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.636 gnupg/g10/ChangeLog:1.637
--- gnupg/g10/ChangeLog:1.636	Wed Nov  3 21:03:46 2004
+++ gnupg/g10/ChangeLog	Wed Nov  3 21:35:28 2004
@@ -1,3 +1,11 @@
+2004-11-03  David Shaw  <dshaw at jabberwocky.com>
+
+	* misc.c (print_digest_algo_note): The latest 2440bis drafts
+	deprecates MD5, so give a warning.
+	(print_pubkey_algo_note, print_cipher_algo_note,
+	print_digest_algo_note): Give the algorithm name in the
+	experimental algo warning.
+
 2004-11-03  Timo Schulz  <twoaday at g10code.com>
 
         * passphrase.c (readn, writen): Use w32_strerror instead
Index: gnupg/g10/misc.c
diff -u gnupg/g10/misc.c:1.62 gnupg/g10/misc.c:1.63
--- gnupg/g10/misc.c:1.62	Wed Nov  3 21:03:46 2004
+++ gnupg/g10/misc.c	Wed Nov  3 21:35:28 2004
@@ -287,46 +287,32 @@
     return a;
 }
 
-
-static void
-no_exp_algo(void)
-{
-    static int did_note = 0;
-
-    if( !did_note ) {
-	did_note = 1;
-	log_info(_("Experimental algorithms should not be used!\n"));
-    }
-}
-
 void
 print_pubkey_algo_note( int algo )
 {
-    if( algo >= 100 && algo <= 110 )
-	no_exp_algo();
+  if(algo >= 100 && algo <= 110)
+    {
+      static int warn=0;
+      if(!warn)
+	{
+	  warn=1;
+	  log_info(_("WARNING: using experimental public key algorithm %s\n"),
+		   pubkey_algo_to_string(algo));
+	}
+    }
 }
 
 void
 print_cipher_algo_note( int algo )
 {
-    if( algo >= 100 && algo <= 110 )
-	no_exp_algo();
-    else if(	algo == CIPHER_ALGO_3DES
-	     || algo == CIPHER_ALGO_CAST5
-	     || algo == CIPHER_ALGO_BLOWFISH
-	     || algo == CIPHER_ALGO_TWOFISH
-	     || algo == CIPHER_ALGO_AES
-	     || algo == CIPHER_ALGO_AES192
-	     || algo == CIPHER_ALGO_AES256
-	   )
-	;
-    else {
-	static int did_note = 0;
-
-	if( !did_note ) {
-	    did_note = 1;
-	    log_info(_("this cipher algorithm is deprecated; "
-		       "please use a more standard one!\n"));
+  if(algo >= 100 && algo <= 110)
+    {
+      static int warn=0;
+      if(!warn)
+	{
+	  warn=1;
+	  log_info(_("WARNING: using experimental cipher algorithm %s\n"),
+		   cipher_algo_to_string(algo));
 	}
     }
 }
@@ -334,11 +320,21 @@
 void
 print_digest_algo_note( int algo )
 {
-    if( algo >= 100 && algo <= 110 )
-	no_exp_algo();
+  if(algo >= 100 && algo <= 110)
+    {
+      static int warn=0;
+      if(!warn)
+	{
+	  warn=1;
+	  log_info(_("WARNING: using experimental digest algorithm %s\n"),
+		   digest_algo_to_string(algo));
+	}
+    }
+  else if(algo==DIGEST_ALGO_MD5)
+    log_info(_("WARNING: digest algorithm %s is deprecated\n"),
+	     digest_algo_to_string(algo));
 }
 
-
 /* Return a string which is used as a kind of process ID */
 const byte *
 get_session_marker( size_t *rlen )




More information about the Gnupg-commits mailing list