[#57574] [ruby-trunk - Feature #8976][Open] file-scope freeze_string directive — "akr (Akira Tanaka)" <akr@...>

70 messages 2013/10/02

[#57579] [ruby-trunk - Feature #8977][Open] String#frozen that takes advantage of the deduping — "sam.saffron (Sam Saffron)" <sam.saffron@...>

25 messages 2013/10/02

[#57679] [ruby-trunk - Feature #8987][Open] map/collect extension which handles arguments — "sowieso (So Wieso)" <sowieso@...>

16 messages 2013/10/05

[#57705] [ruby-trunk - Feature #8992][Open] Use String#freeze and compiler tricks to replace "str"f suffix — "headius (Charles Nutter)" <headius@...>

43 messages 2013/10/07

[#57727] [ruby-trunk - Feature #8998][Open] string keys for hash literals should use fstrings — "normalperson (Eric Wong)" <normalperson@...>

17 messages 2013/10/08

[#57771] [ruby-trunk - Bug #9008][Open] TestProcess#test_clock_getres_constants and TestProcess#test_clock_gettime_constants fails on ARM — "vo.x (Vit Ondruch)" <v.ondruch@...>

15 messages 2013/10/09

[#57888] [ruby-trunk - Feature #9025][Open] Clarify the error message when calling a method with the wrong number of arguments — Nerian (Gonzalo Rodríguez) <siotopo@...>

11 messages 2013/10/15

[#57993] [ruby-trunk - Feature #9047][Open] Alternate hash key syntax for symbols — "jamonholmgren (Jamon Holmgren)" <jamon@...>

13 messages 2013/10/23

[#58007] [ruby-trunk - Feature #9049][Open] Shorthands (a:b, *) for inclusive indexing — "mohawkjohn (John Woods)" <john.o.woods@...>

25 messages 2013/10/24

[#58033] [ruby-trunk - Bug #9053][Open] SSL Issue with Ruby 2.0.0 — "tisba (Sebastian Cohnen)" <ruby-lang@...>

16 messages 2013/10/25

[#58080] [ruby-trunk - Feature #9064][Open] Add support for packages, like in Java — "rosenfeld (Rodrigo Rosenfeld Rosas)" <rr.rosas@...>

23 messages 2013/10/30

[ruby-core:58110] [ruby-trunk - Bug #8384] Cannot build ruby against OpenSSL build with "no-ec2m"

From: "vo.x (Vit Ondruch)" <v.ondruch@...>
Date: 2013-10-31 17:28:32 UTC
List: ruby-core #58110
Issue #8384 has been updated by vo.x (Vit Ondruch).


Thank you!
----------------------------------------
Bug #8384: Cannot build ruby against OpenSSL build with "no-ec2m"
https://bugs.ruby-lang.org/issues/8384#change-42699

Author: vo.x (Vit Ondruch)
Status: Assigned
Priority: Normal
Assignee: usa (Usaku NAKAMURA)
Category: 
Target version: 
ruby -v: ruby -v: ruby 2.0.0p0 (2013-02-24) [x86_64-linux]
Backport: 1.9.3: DONE, 2.0.0: DONE


=begin
Due to recent changes in OpenSSL configuration options for Red Hat Enterprise Linux, I cannot build Ruby anymore.

These are the relevant changes in OpenSSL configuration:

 @@ -227,7 +234,7 @@ sslarch=linux-ppc64
  ./Configure \
         --prefix=/usr --openssldir=%{_sysconfdir}/pki/tls ${sslflags} \
         zlib enable-camellia enable-seed enable-tlsext enable-rfc3779 \
 -       enable-cms enable-md2 no-mdc2 no-rc5 no-ec no-ec2m no-ecdh no-ecdsa no-srp \
 +       enable-cms enable-md2 no-mdc2 no-rc5 no-ec2m no-srp \
         --with-krb5-flavor=MIT --enginesdir=%{_libdir}/openssl/engines \
         --with-krb5-dir=/usr shared ${sslarch} %{?!nofips:fips}
 
I see that the "no-ec" was removed. So if I understand it correctly, the "OPENSSL_NO_EC" used to be defined, while it is not anymore and hence the whole ossl_pkey_ec.c file used to be ignored, while it is not anymore, Therefore, I observe following error:

 ossl_pkey_ec.c:821:29: error: 'EC_GROUP_new_curve_GF2m' undeclared (first use in this function)
                  new_curve = EC_GROUP_new_curve_GF2m;

I was suggested by our OpenSSL maintainer to just #ifndef OPENSSL_NO_EC2M all the calls that contain GF2m. So I went ahead with this naive patch:

 diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
 index 8e6d88f..29e28ca 100644
 --- a/ext/openssl/ossl_pkey_ec.c
 +++ b/ext/openssl/ossl_pkey_ec.c
 @@ -762,8 +762,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
                  method = EC_GFp_mont_method();
              } else if (id == s_GFp_nist) {
                  method = EC_GFp_nist_method();
 +#if !defined(OPENSSL_NO_EC2M)
              } else if (id == s_GF2m_simple) {
                  method = EC_GF2m_simple_method();
 +#endif
              }
  
              if (method) {
 @@ -817,8 +819,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
  
              if (id == s_GFp) {
                  new_curve = EC_GROUP_new_curve_GFp;
 +#if !defined(OPENSSL_NO_EC2M)
              } else if (id == s_GF2m) {
                  new_curve = EC_GROUP_new_curve_GF2m;
 +#endif
              } else {
                  ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m");
              }

which fixes the build issues, but the leaves the test suite failing:

   7) Error:
 test_read_private_key_pem_pw(OpenSSL::TestEC):
 OpenSSL::PKey::EC::Group::Error: unable to create curve (secp112r1): unknown group
     /builddir/build/BUILD/ruby-2.0.0-p0/test/openssl/test_pkey_ec.rb:10:in `initialize'
     /builddir/build/BUILD/ruby-2.0.0-p0/test/openssl/test_pkey_ec.rb:10:in `new'
     /builddir/build/BUILD/ruby-2.0.0-p0/test/openssl/test_pkey_ec.rb:10:in `setup'

and there are remaining references to :GF2m in exception messages, etc. Is there any chance to support this set of OpenSSL configuration options properly, i.e. make the OpenSSL work better with such fine grained configuration options?

Thanks
=end



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

In This Thread