]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
setting the DH prime bits to zero shouldn't print a warning as it is the same as...
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 2 Nov 2013 07:39:04 +0000 (08:39 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 2 Nov 2013 07:39:08 +0000 (08:39 +0100)
lib/gnutls_ui.c

index 26335c8d993a2253e0a079a55362e984a2d97deb..6132eeb9d1ef8c9ae73d4163a032f17b3ee0db81 100644 (file)
@@ -102,7 +102,7 @@ int gnutls_random_art (gnutls_random_art_t type,
 void
 gnutls_dh_set_prime_bits (gnutls_session_t session, unsigned int bits)
 {
-  if (bits <= 512) _gnutls_audit_log(session, "Note that the security level of the Diffie-Hellman key exchange has been lowered to %u bits and this may allow decryption of the session data\n", bits);
+  if (bits <= 512 && bits != 0) _gnutls_audit_log(session, "Note that the security level of the Diffie-Hellman key exchange has been lowered to %u bits and this may allow decryption of the session data\n", bits);
   session->internals.priorities.dh_prime_bits = bits;
 }