diff options
-rw-r--r-- | lib/gnutls_dh.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gnutls_dh.c b/lib/gnutls_dh.c index 001e68b354..5871e2c959 100644 --- a/lib/gnutls_dh.c +++ b/lib/gnutls_dh.c @@ -101,5 +101,8 @@ MPI gnutls_calc_dh_key(MPI f, MPI x, MPI prime) */ int _gnutls_dh_get_bits(GNUTLS_STATE state) { - return state->gnutls_internals.dh_bits; + if (state->gnutls_internals.dh_bits>=MIN_BITS) + return state->gnutls_internals.dh_bits; + else + return MIN_BITS; } |