Skip to content

Instantly share code, notes, and snippets.

@mingt
Forked from eric1234/2.0.0-p0-rbenv.patch
Last active August 29, 2015 14:13
Show Gist options
  • Select an option

  • Save mingt/6568a3a6cc2a0ba1d625 to your computer and use it in GitHub Desktop.

Select an option

Save mingt/6568a3a6cc2a0ba1d625 to your computer and use it in GitHub Desktop.
Like the original 2.0.0-p0 patch but for 1.9.3-p0. It should be the same, but now is renamed just for possibly less confusion.
--- ext/openssl/ossl_pkey_ec.c
+++ ext/openssl/ossl_pkey_ec.c
@@ -762,8 +762,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) {
@@ -817,8 +819,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 {
ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m");
}
@mingt
Copy link
Author

mingt commented Jan 10, 2015

Usage:

curl https://gist.github.com/mingt/6568a3a6cc2a0ba1d625/raw/7859c4b08c9ae7c0cebc69d42cce2b553838dcf0/1.9.3-p0-rbenv.patch | rbenv install --patch 1.9.3-p0

Against the error:

[root@localhost ~]# rbenv install 1.9.3-p0
Downloading yaml-0.1.6.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /root/.rbenv/versions/1.9.3-p0

Downloading ruby-1.9.3-p0.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/3b910042e3561f4296fd95d96bf30322e53eecf083992e5042a7680698cfa34e
Installing ruby-1.9.3-p0...

BUILD FAILED (CentOS release 6.5 (Final) using ruby-build 20141225-9-g73988db)

Inspect or clean up the working tree at /tmp/ruby-build.20150110035437.13752
Results logged to /tmp/ruby-build.20150110035437.13752.log

Last 10 log lines:
ossl_pkey_ec.c:761: warning: implicit declaration of function 鈥楨C_GF2m_simple_method鈥
ossl_pkey_ec.c:761: warning: assignment makes pointer from integer without a cast
ossl_pkey_ec.c:816: error: 鈥楨C_GROUP_new_curve_GF2m鈥undeclared (first use in this function)
ossl_pkey_ec.c:816: error: (Each undeclared identifier is reported only once
ossl_pkey_ec.c:816: error: for each function it appears in.)
make[2]: *** [ossl_pkey_ec.o] Error 1
make[2]: Leaving directory `/tmp/ruby-build.20150110035437.13752/ruby-1.9.3-p0/ext/openssl'
make[1]: *** [ext/openssl/all] Error 2
make[1]: Leaving directory `/tmp/ruby-build.20150110035437.13752/ruby-1.9.3-p0'
make: *** [build-ext] Error 2

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