]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
_gnutls_dh_generate_key() will account the q_bits
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 29 Oct 2014 15:17:45 +0000 (16:17 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 29 Oct 2014 15:17:45 +0000 (16:17 +0100)
lib/nettle/pk.c

index 0653fcc24841c236b039791e61e9ddb7bb4a8ac3..66815f043c54f035259e1cf9f775e0c26424d44f 100644 (file)
@@ -929,7 +929,7 @@ int _gnutls_dh_generate_key(gnutls_dh_params_t dh_params,
        priv_key->data = NULL;
        pub_key->data = NULL;
 
-       ret = _gnutls_pk_generate_keys(GNUTLS_PK_DH, 0, &params);
+       ret = _gnutls_pk_generate_keys(GNUTLS_PK_DH, dh_params->q_bits, &params);
        if (ret < 0) {
                return gnutls_assert_val(ret);
        }