@@ -104,7 +104,7 @@ index 3bf480f8f0c77d440324cf8847f4a214521f8162..40b6e311a14f5e824f8f0aff3121221e
104104 if (!Set(env->context(),
105105 obj,
106106diff --git a/src/crypto/crypto_dh.cc b/src/crypto/crypto_dh.cc
107- index dd69323b80076d7333b80453c9cc9ef5b680ce27..33331ddf8586df69508f62d3bd8e80d3a04acbe0 100644
107+ index dd69323b80076d7333b80453c9cc9ef5b680ce27..6431b768c83fa27b2287588e936f93ae00169ad5 100644
108108--- a/src/crypto/crypto_dh.cc
109109+++ b/src/crypto/crypto_dh.cc
110110@@ -154,13 +154,11 @@ bool DiffieHellman::Init(BignumPointer&& bn_p, int g) {
@@ -148,7 +148,18 @@ index dd69323b80076d7333b80453c9cc9ef5b680ce27..33331ddf8586df69508f62d3bd8e80d3
148148 return false;
149149 }
150150 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) {
152163 return EVPKeyCtxPointer();
153164 }
154165
@@ -169,7 +180,7 @@ index dd69323b80076d7333b80453c9cc9ef5b680ce27..33331ddf8586df69508f62d3bd8e80d3
169180 if (!param_ctx ||
170181 EVP_PKEY_paramgen_init(param_ctx.get()) <= 0 ||
171182 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) {
173184 }
174185
175186 key_params = EVPKeyPointer(raw_params);
0 commit comments