Skip to content

Instantly share code, notes, and snippets.

@MicahElliott
Last active August 29, 2015 13:56
Show Gist options
  • Save MicahElliott/8908123 to your computer and use it in GitHub Desktop.
Save MicahElliott/8908123 to your computer and use it in GitHub Desktop.
Patch to compile ruby 1.8.7-p374 on CentOS 6.5 (ruby-install -p 'https://gist.github.com/MicahElliott/8908123/raw/e87d4d553dac05da02a186263e0a7bb69d24ff39/ruby-ossl_pkey_ec.c.diff.diff' ruby 1.8.7)
--- ruby-1.8.7-p374/ext/openssl/ossl_pkey_ec.c 2010-06-21 05:18:59.000000000 -0400
+++ ruby-1.8.7-p374/ext/openssl/ossl_pkey_ec.c.new 2014-02-09 19:21:24.635060547 -0500
@@ -757,8 +757,10 @@
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 @@
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");
}
@ferrela
Copy link

ferrela commented Oct 3, 2014

Please how to use this patch ?

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