Actions
Bug #12630
closedadd gem sources errors on Ruby 2.4.0-preview1
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.0preview1 (2016-06-20 trunk 55466) [x86_64-linux]
Description
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)
Updated by nobu (Nobuyoshi Nakada) almost 9 years ago
- Status changed from Open to Assigned
- Assignee set to 7150
Updated by rhenium (Kazuki Yamaguchi) almost 9 years ago
- 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:
--- 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
Updated by blackanger (blackanger z) almost 9 years ago
vagrant:~$ ruby -v
ruby 2.4.0preview1 (2016-06-20 trunk 55466) [x86_64-linux]
vagrant:~$ which ruby
/home/vagrant/.rubies/ruby-2.4.0-preview1/bin/ruby
vagrant:~$ cd /home/vagrant/.rubies/ruby-2.4.0-preview1
vagrant:~/.rubies/ruby-2.4.0-preview1$ ls
bin include lib share
vagrant:~/.rubies/ruby-2.4.0-preview1$ cd lib/ruby/2.4.0/x86_64-linux/
vagrant:~/.rubies/ruby-2.4.0-preview1/lib/ruby/2.4.0/x86_64-linux$ ls
bigdecimal.so coverage.so digest etc.so fiddle.so json objspace.so psych.so rbconfig ripper.so stringio.so zlib.so
cgi date_core.so digest.so fcntl.so gdbm.so mathn openssl.so pty.so rbconfig.rb sdbm.so strscan.so
continuation.so dbm.so enc fiber.so io nkf.so pathname.so racc readline.so socket.so syslog.so
vagrant:~/.rubies/ruby-2.4.0-preview1/lib/ruby/2.4.0/x86_64-linux$ ldd openssl.so
linux-vdso.so.1 => (0x00007ffd4b9f9000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f601e79e000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f601e3c2000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f601e1a4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f601dddf000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f601dbdb000)
/lib64/ld-linux-x86-64.so.2 (0x00007f601ec59000)
vagrant:~/.rubies/ruby-2.4.0-preview1/lib/ruby/2.4.0/x86_64-linux$ 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>
vagrant:~/.rubies/ruby-2.4.0-preview1/lib/ruby/2.4.0/x86_64-linux$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Updated by rhenium (Kazuki Yamaguchi) almost 9 years ago
That's weird... OpenSSL 1.0.1 doesn't have SSL_CTX_set_ecdh_auto() so it shouldn't happen. Apparently you have another installation of OpenSSL 1.0.2, and ext/openssl was compiled with its headers but linked against the system OpenSSL. Please try reinstalling libssl-dev package and recompiling Ruby.
If ext/openssl is properly built with the system OpenSSL, it should print like this (OPENSSL_VERSION is the version number in the header and OPENSSL_LIBRARY_VERSION is the version number in the library itself):
$ ruby -ropenssl -e'puts OpenSSL::OPENSSL_VERSION, OpenSSL::OPENSSL_LIBRARY_VERSION'
OpenSSL 1.0.1f 6 Jan 2014
OpenSSL 1.0.1f 6 Jan 2014
Updated by blackanger (blackanger z) almost 9 years ago
you're right.
$ ruby -ropenssl -e'puts OpenSSL::OPENSSL_VERSION, OpenSSL::OPENSSL_LIBRARY_VERSION'
OpenSSL 1.0.2g 1 Mar 2016
OpenSSL 1.0.1f 6 Jan 2014
Updated by rhenium (Kazuki Yamaguchi) over 7 years ago
- Status changed from Feedback to Rejected
Actions
Like0
Like0Like0Like0Like0Like0Like0