We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e582de1 commit f966eceCopy full SHA for f966ece
src/wp_dh_kmgmt.c
@@ -40,6 +40,12 @@
40
/** Maximum size of the group name string. */
41
#define WP_MAX_DH_GROUP_NAME_SZ 10
42
43
+/* Min accepted bitlen for keygen */
44
+#ifdef HAVE_FIPS
45
+#define WP_DH_MIN_BITS 2048
46
+#else
47
+#define WP_DH_MIN_BITS 1024
48
+#endif
49
50
/**
51
* DH key.
@@ -1776,7 +1782,7 @@ static int wp_dh_params_validate(wp_Dh* dh)
1776
1782
if (ok) {
1777
1783
/* Ensure p is a minimum size. */
1778
1784
sz = mp_count_bits(&dh->key.p);
1779
- if (sz < 1024) {
1785
+ if (sz < WP_DH_MIN_BITS) {
1780
1786
ok = 0;
1781
1787
}
1788
0 commit comments