diff options
author | Martin Willi <martin@strongswan.org> | 2008-09-17 09:02:30 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2008-09-17 09:02:30 +0000 |
commit | cdaf57ec34e1ebed97f465d2db2eab166131bf7c (patch) | |
tree | c26fda4c21a549d67f6bdf405fdb0340413fb756 /src | |
parent | 73f6886a509cd08c61ed0498deebae24a170a8a5 (diff) | |
download | strongswan-cdaf57ec34e1ebed97f465d2db2eab166131bf7c.tar.bz2 strongswan-cdaf57ec34e1ebed97f465d2db2eab166131bf7c.tar.xz |
fixed DH value range testing
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c b/src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c index 1d885d1c7..4c5ffc6aa 100644 --- a/src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c +++ b/src/libstrongswan/plugins/gmp/gmp_diffie_hellman.c @@ -395,7 +395,7 @@ static void set_other_public_value(private_gmp_diffie_hellman_t *this, chunk_t v /* check public value: * 1. 0 or 1 is invalid as 0^a = 0 and 1^a = 1 * 2. a public value larger or equal the modulus is invalid */ - if (mpz_cmp_ui(this->yb, 1) > 0 || + if (mpz_cmp_ui(this->yb, 1) > 0 && mpz_cmp(this->yb, p_min_1) < 0) { #ifdef EXTENDED_DH_TEST |