mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/openssl] ssl: use TLS_method() instead of SSLv23_method() for LibreSSL
LibreSSL 2.2.2 introduced TLS_method(), but with different semantics from OpenSSL: TLS_method() enabled TLS >= 1.0 while SSLv23_method() enabled all available versions, which included SSL 3.0 in addition. However, LibreSSL 2.3.0 removed SSL 3.0 support completely and now TLS_method() and SSLv23_method() are equivalent. https://github.com/ruby/openssl/commit/3b7d7045b8
This commit is contained in:
parent
50332c4071
commit
88d64418dd
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ ossl_sslctx_s_alloc(VALUE klass)
|
|||
VALUE obj;
|
||||
|
||||
obj = TypedData_Wrap_Struct(klass, &ossl_sslctx_type, 0);
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
|
||||
ctx = SSL_CTX_new(TLS_method());
|
||||
#else
|
||||
ctx = SSL_CTX_new(SSLv23_method());
|
||||
|
|
Loading…
Reference in a new issue