@@ -104,7 +104,7 @@ index 3bf480f8f0c77d440324cf8847f4a214521f8162..40b6e311a14f5e824f8f0aff3121221e
104
104
if (!Set(env->context(),
105
105
obj,
106
106
diff --git a/src/crypto/crypto_dh.cc b/src/crypto/crypto_dh.cc
107
- index dd69323b80076d7333b80453c9cc9ef5b680ce27..33331ddf8586df69508f62d3bd8e80d3a04acbe0 100644
107
+ index dd69323b80076d7333b80453c9cc9ef5b680ce27..6431b768c83fa27b2287588e936f93ae00169ad5 100644
108
108
--- a/src/crypto/crypto_dh.cc
109
109
+++ b/src/crypto/crypto_dh.cc
110
110
@@ -154,13 +154,11 @@ bool DiffieHellman::Init(BignumPointer&& bn_p, int g) {
@@ -148,7 +148,18 @@ index dd69323b80076d7333b80453c9cc9ef5b680ce27..33331ddf8586df69508f62d3bd8e80d3
148
148
return false;
149
149
}
150
150
BIGNUM* bn_p =
151
- @@ -559,15 +554,20 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
151
+ @@ -219,8 +214,10 @@ typedef BignumPointer (*StandardizedGroupInstantiator)();
152
+ inline StandardizedGroupInstantiator FindDiffieHellmanGroup(const char* name) {
153
+ #define V(n, p) \
154
+ if (StringEqualNoCase(name, n)) return InstantiateStandardizedGroup<p>
155
+ + #ifndef OPENSSL_IS_BORINGSSL
156
+ V("modp1", BN_get_rfc2409_prime_768);
157
+ V("modp2", BN_get_rfc2409_prime_1024);
158
+ + #endif
159
+ V("modp5", BN_get_rfc3526_prime_1536);
160
+ V("modp14", BN_get_rfc3526_prime_2048);
161
+ V("modp15", BN_get_rfc3526_prime_3072);
162
+ @@ -559,15 +556,20 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
152
163
return EVPKeyCtxPointer();
153
164
}
154
165
@@ -169,7 +180,7 @@ index dd69323b80076d7333b80453c9cc9ef5b680ce27..33331ddf8586df69508f62d3bd8e80d3
169
180
if (!param_ctx ||
170
181
EVP_PKEY_paramgen_init(param_ctx.get()) <= 0 ||
171
182
EVP_PKEY_CTX_set_dh_paramgen_prime_len(
172
- @@ -581,6 +581 ,9 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
183
+ @@ -581,6 +583 ,9 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
173
184
}
174
185
175
186
key_params = EVPKeyPointer(raw_params);
0 commit comments