diffie-hellman: Explicitly initialize DH exponent sizes during initialization
authorMartin Willi <martin@revosec.ch>
Wed, 16 Jul 2014 14:44:24 +0000 (16:44 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 25 Aug 2014 07:43:29 +0000 (09:43 +0200)
commit46184b07c1637abcd84629d35aad34d85ffba3d7
tree4a2f61861782652f649633e6dce347e56517359c
parent52ba4f6bf49552e8c1fc23335c3918468a336086
diffie-hellman: Explicitly initialize DH exponent sizes during initialization

To avoid any race conditions when multiple threads call and initialize
diffie_hellman_get_params(), explicitly examine the optimum DH exponent size
during library initialization.

Fixes #655.
src/libstrongswan/crypto/diffie_hellman.c
src/libstrongswan/crypto/diffie_hellman.h
src/libstrongswan/library.c