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.
This commit is contained in:
Martin Willi
2014-08-25 09:43:29 +02:00
parent 52ba4f6bf4
commit 46184b07c1
3 changed files with 38 additions and 8 deletions
+2
View File
@@ -351,5 +351,7 @@ bool library_init(char *settings, const char *namespace)
#endif /* INTEGRITY_TEST */
}
diffie_hellman_init();
return !this->integrity_failed;
}