]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
corrected DH generation check.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 9 Apr 2012 11:40:54 +0000 (13:40 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 9 Apr 2012 11:40:58 +0000 (13:40 +0200)
lib/nettle/mpi.c

index 1e61275ab53682cb5f2326a87fdf0fc056b68d7a..d4612b837acbbb84abb7db38dab7bd9f9bf9c585 100644 (file)
@@ -427,7 +427,7 @@ gen_group (mpz_t * prime, mpz_t * generator, unsigned int nbits, unsigned int *q
   q_bytes = _gnutls_pk_bits_to_subgroup_bits (nbits);
   q_bytes /= 8;
 
-  if (q_bytes == 0 || q_bytes <= p_bytes)
+  if (q_bytes == 0 || q_bytes >= p_bytes)
     {
       gnutls_assert ();
       return GNUTLS_E_INVALID_REQUEST;