Skip to content

Instantly share code, notes, and snippets.

@thescouser89
Created December 23, 2013 18:46
Show Gist options
  • Save thescouser89/8102408 to your computer and use it in GitHub Desktop.
Save thescouser89/8102408 to your computer and use it in GitHub Desktop.
rbenv patch to be applied when installing ruby 1.8.7-p375 Patch adapted from https://github.com/sstephenson/ruby-build/wiki#make-error-for-200-p247-and-lower-on-fedorared-hat
--- ext/openssl/ossl_pkey_ec.c
+++ ext/openssl/ossl_pkey_ec.c
@@ -757,8 +757,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) {
@@ -811,8 +813,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 {
rb_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m");
}
@enatividad
Copy link

enatividad commented Jun 3, 2017

the 1.9.2-p320 patch also works with 1.9.2-p330

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment