From: Nikos Mavrogiannopoulos Date: Sat, 2 Nov 2013 07:39:04 +0000 (+0100) Subject: setting the DH prime bits to zero shouldn't print a warning as it is the same as... X-Git-Tag: gnutls_3_2_7~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9396adaaaa1c763bda1043fbc98c9a6212e081b;p=thirdparty%2Fgnutls.git setting the DH prime bits to zero shouldn't print a warning as it is the same as not setting it. Reported by Daniel Kahn Gillmor. --- diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c index 26335c8d99..6132eeb9d1 100644 --- a/lib/gnutls_ui.c +++ b/lib/gnutls_ui.c @@ -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; }