Skip to content

Instantly share code, notes, and snippets.

@eric1234
Forked from thescouser89/1.8.7-rbenv.patch
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eric1234/7035f3669bf880b8c71e to your computer and use it in GitHub Desktop.
Save eric1234/7035f3669bf880b8c71e to your computer and use it in GitHub Desktop.
Like the original 1.8.7 patch but for 1.9.2-p320
--- ext/openssl/ossl_pkey_ec.c
+++ ext/openssl/ossl_pkey_ec.c
@@ -761,8 +761,10 @@ static VALUE ossl_ec_group_initialize(in
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) {
@@ -815,8 +817,10 @@ static VALUE ossl_ec_group_initialize(in
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");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment