Issue #12630 has been updated by Kazuki Yamaguchi.

Status changed from Assigned to Feedback

I can't reproduce on my Ubuntu 14.04 box. Do you use a custom OpenSSL build? If so, could you provide the configure options?

~~~
ubuntu@ubuntu1404:~/ruby-2.4.0-preview1$ ./target/bin/ruby -v
ruby 2.4.0preview1 (2016-06-20 trunk 55466) [x86_64-linux]
ubuntu@ubuntu1404:~/ruby-2.4.0-preview1$ ldd ./target/lib/ruby/2.4.0/x86_64-linux/openssl.so 
	linux-vdso.so.1 =>  (0x00007ffebc3c8000)
	libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f6f408f3000)
	libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f6f40517000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6f402f8000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6f3ff33000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6f3fd2f000)
	/lib64/ld-linux-x86-64.so.2 (0x00005598adbb4000)
ubuntu@ubuntu1404:~/ruby-2.4.0-preview1$ dpkg -s libssl1.0.0
Package: libssl1.0.0
Status: install ok installed
Priority: important
Section: libs
Installed-Size: 2944
Maintainer: Ubuntu Developers <ubuntu-devel-discuss / lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: openssl
Version: 1.0.1f-1ubuntu2.19
Depends: libc6 (>= 2.14), debconf (>= 0.5) | debconf-2.0
Pre-Depends: multiarch-support
Description: Secure Sockets Layer toolkit - shared libraries
 This package is part of the OpenSSL project's implementation of the SSL
 and TLS cryptographic protocols for secure communication over the
 Internet.
 .
 It provides the libssl and libcrypto shared libraries.
Original-Maintainer: Debian OpenSSL Team <pkg-openssl-devel / lists.alioth.debian.org>
ubuntu@ubuntu1404:~/ruby-2.4.0-preview1$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.4 LTS
Release:	14.04
Codename:	trusty
~~~

Maybe this works for you:

~~~diff
--- ext/openssl/ossl_ssl.c.orig	2016-07-27 11:41:08.456357000 +0900
+++ ext/openssl/ossl_ssl.c	2016-07-27 11:42:21.576357000 +0900
@@ -163,7 +163,8 @@
     RTYPEDDATA_DATA(obj) = ctx;
     SSL_CTX_set_ex_data(ctx, ossl_ssl_ex_ptr_idx, (void*)obj);
 
-#if !defined(OPENSSL_NO_EC) && defined(HAVE_SSL_CTX_SET_ECDH_AUTO)
+#if !defined(OPENSSL_NO_EC) && !defined(OPENSSL_NO_ECDH) && \
+    defined(HAVE_SSL_CTX_SET_ECDH_AUTO)
     /* We use SSL_CTX_set1_curves_list() to specify the curve used in ECDH. It
      * allows to specify multiple curve names and OpenSSL will select
      * automatically from them. In OpenSSL 1.0.2, the automatic selection has to
~~~

----------------------------------------
Bug #12630: add gem sources errors on Ruby 2.4.0-preview1
https://bugs.ruby-lang.org/issues/12630#change-59805

* Author: blackanger z
* Status: Feedback
* Priority: Normal
* Assignee: openssl
* ruby -v: ruby 2.4.0preview1 (2016-06-20 trunk 55466) [x86_64-linux]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
~~~
vagrant:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.3 LTS
Release:	14.04
Codename:	trusty

vagrant:~$ ruby -v
ruby 2.4.0preview1 (2016-06-20 trunk 55466) [x86_64-linux]

vagrant:~$ gem sources 
*** CURRENT SOURCES ***

vagrant:~$ gem sources -a https://mirrors.ustc.edu.cn/rubygems/
Error fetching https://mirrors.ustc.edu.cn/rubygems/:
	SSL_CTX_set_ecdh_auto (https://mirrors.ustc.edu.cn/rubygems/specs.4.8.gz)

vagrant:~$ gem source -a https://gems.ruby-china.org
Error fetching https://gems.ruby-china.org:
	SSL_CTX_set_ecdh_auto (https://gems.ruby-china.org/specs.4.8.gz)

vagrant:~$ gem source -a https://rubygems.org/ 
Error fetching https://rubygems.org/:
	SSL_CTX_set_ecdh_auto (https://api.rubygems.org/specs.4.8.gz)

~~~





-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>