diff options
author | Martin Willi <martin@revosec.ch> | 2015-03-23 14:32:11 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2015-03-23 17:54:03 +0100 |
commit | 0356089d0f94ab86dd82fd686703560988833e3c (patch) | |
tree | 43201d2caf56388bcddc82795962b95504a07482 /src/libstrongswan/plugins/gcrypt/gcrypt_dh.c | |
parent | a777155ffed7fc6382a2e344ebd748f70b1c61c2 (diff) | |
download | strongswan-0356089d0f94ab86dd82fd686703560988833e3c.tar.bz2 strongswan-0356089d0f94ab86dd82fd686703560988833e3c.tar.xz |
diffie-hellman: Verify public DH values in backends
Diffstat (limited to 'src/libstrongswan/plugins/gcrypt/gcrypt_dh.c')
-rw-r--r-- | src/libstrongswan/plugins/gcrypt/gcrypt_dh.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/gcrypt/gcrypt_dh.c b/src/libstrongswan/plugins/gcrypt/gcrypt_dh.c index 80bd85d87..744ec0bbf 100644 --- a/src/libstrongswan/plugins/gcrypt/gcrypt_dh.c +++ b/src/libstrongswan/plugins/gcrypt/gcrypt_dh.c @@ -79,6 +79,11 @@ METHOD(diffie_hellman_t, set_other_public_value, bool, gcry_mpi_t p_min_1; gcry_error_t err; + if (!diffie_hellman_verify_value(this->group, value)) + { + return FALSE; + } + if (this->yb) { gcry_mpi_release(this->yb); |