[#75687] [Ruby trunk Bug#12416] struct rb_id_table lacks mark function — shyouhei@...
Issue #12416 has been reported by Shyouhei Urabe.
3 messages
2016/05/23
[#75763] [Ruby trunk Feature#12435] Using connect_nonblock to open TCP connections in Net::HTTP#connect — mohamed.m.m.hafez@...
Issue #12435 has been reported by Mohamed Hafez.
3 messages
2016/05/28
[#75774] Errno::EAGAIN thrown by OpenSSL::SSL::SSLSocket#connect_nonblock — Mohamed Hafez <mohamed.m.m.hafez@...>
Hi all, every now and then in my production server, I'm
4 messages
2016/05/30
[#75775] Re: Errno::EAGAIN thrown by OpenSSL::SSL::SSLSocket#connect_nonblock
— Mohamed Hafez <mohamed.m.m.hafez@...>
2016/05/30
Or does MRI's OpenSSL::SSL::SSLSocket#connect_nonblock just return
[#75782] Important: Somewhat backwards-incompatible change (Fwd: [ruby-cvs:62388] duerst:r55225 (trunk): * string.c: Activate full Unicode case mapping for UTF-8) — Martin J. Dürst <duerst@...>
With the change below, I have activated full Unicode case mapping for
4 messages
2016/05/31
[ruby-core:75352] [Ruby trunk Bug#12348] PKey::EC.public_key returns EC::Point
From:
mcr@...
Date:
2016-05-04 21:51:43 UTC
List:
ruby-core #75352
Issue #12348 has been reported by Michael Richardson.
----------------------------------------
Bug #12348: PKey::EC.public_key returns EC::Point
https://bugs.ruby-lang.org/issues/12348
* Author: Michael Richardson
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.4.0dev (2016-04-27 openssl-110-v1 54798) [x86_64-linux]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
It appears that the EC subclass returns something isn't recognized as a public key (not a subclass of OpenSSL::PKey::PKey) when asked for its' public_key:
<pre>
ext-ruby-2.4-ssl :040 > key = OpenSSL::PKey::EC.new('X25519')
=> #<OpenSSL::PKey::EC:0x000000041cd988 @group=nil>
ext-ruby-2.4-ssl :041 > key.generate_key
=> #<OpenSSL::PKey::EC:0x000000041cd988 @group=nil>
ext-ruby-2.4-ssl :042 > key.public_key
=> #<OpenSSL::PKey::EC::Point:0x000000041c7f88 @group=#<OpenSSL::PKey::EC::Group:0x000000041c7fb0 @key=#<OpenSSL::PKey::EC:0x000000041cd988 @group=#<OpenSSL::PKey::EC::Group:0x000000041c7fb0 ...>>>>
</pre>
The result can not be assigned as a certificate public key:
<pre>
ext-ruby-2.4-ssl :043 > root_ca = OpenSSL::X509::Certificate.new
=> #<OpenSSL::X509::Certificate: subject=#<OpenSSL::X509::Name:0x000000041c2bc8>, issuer=#<OpenSSL::X509::Name:0x000000041c2bf0>, serial=#<OpenSSL::BN:0x000000041c2c18>, not_before=nil, not_after=nil>
ext-ruby-2.4-ssl :044 > root_ca.public_key = key.public_key
TypeError: wrong argument (OpenSSL::PKey::EC::Point)! (Expected kind of OpenSSL::PKey::PKey)
</pre>
which is how I understand the RSA and DSA objects work (see: https://github.com/augustl/ruby-openssl-cheat-sheet/blob/master/certificate_authority.rb )
Assigning:
<pre>
ext-ruby-2.4-ssl :045 > root_ca.public_key = key
=> #<OpenSSL::PKey::EC:0x000000041cd988 @group=#<OpenSSL::PKey::EC::Group:0x000000041c7fb0 @key=#<OpenSSL::PKey::EC:0x000000041cd988 ...>>>
</pre>
is just fine. However, later on, one runs into that:
NoMethodError: undefined method `private?' for #<OpenSSL::PKey::EC:0x0000000453e388>
which is more likely a bug in OpenSSL::X509::Certificate.
See #12324 for branch being used, also tested with 2.3.0, and using secp112r1 curve:
<pre>
2.3.0 :026 > root_ca.sign(root_key, OpenSSL::Digest::SHA256.new)
NoMethodError: undefined method `private?' for #<OpenSSL::PKey::EC:0x0000000463f368>
</pre>
a simple monkey patch solved this issue, but reveals issues deeper in EVP which are unique to X25519.
--
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>