diff options
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/lib/openssl/ssl.rb | 4 | ||||
-rw-r--r-- | ext/openssl/ossl_ssl.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/ssl.rb b/ext/openssl/lib/openssl/ssl.rb index ef2b3f1c64..1c0cc2fd00 100644 --- a/ext/openssl/lib/openssl/ssl.rb +++ b/ext/openssl/lib/openssl/ssl.rb @@ -128,6 +128,10 @@ module OpenSSL end return params end + + def tmp_dh_callback=(value) + @tmp_dh_callback = value || DEFAULT_TMP_DH_CALLBACK + end end module SocketForwarder diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 3e756eae5f..ca5f43cf0e 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -2122,7 +2122,7 @@ Init_ossl_ssl(void) * The callback must return an OpenSSL::PKey::DH instance of the correct * key length. */ - rb_attr(cSSLContext, rb_intern("tmp_dh_callback"), 1, 1, Qfalse); + rb_attr(cSSLContext, rb_intern("tmp_dh_callback"), 1, 0, Qfalse); /* * Sets the context in which a session can be reused. This allows |