Guest User

Untitled

a guest
Jun 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. From 0d58bb55985e787364b0235e5e69278d0f0ad4b0 Mon Sep 17 00:00:00 2001
  2. From: emboss <emboss@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
  3. Date: Fri, 5 Jul 2013 22:46:42 +0000
  4. Subject: [PATCH] * ext/openssl/ossl_pkey_ec.c: Ensure compatibility to builds
  5. of OpenSSL with OPENSSL_NO_EC2M defined, but OPENSSL_NO_EC not defined. *
  6. test/openssl/test_pkey_ec.rb: Iterate over built-in curves (and assert
  7. their non-emptiness!) instead of hard-coding them, as this may cause
  8. problems with respect to the different availability of individual curves in
  9. individual OpenSSL builds. [ruby-core:54881] [Bug #8384]
  10.  
  11. Thanks to Vit Ondruch for providing the patch!
  12.  
  13.  
  14. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  15. ---
  16. ext/openssl/ossl_pkey_ec.c | 4 ++++
  17. 1 files changed, 4 insertions(+), 0 deletions(-)
  18.  
  19. diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
  20. index 9d7607ef2f80..5e419bd167bc 100644
  21. --- a/ext/openssl/ossl_pkey_ec.c
  22. +++ b/ext/openssl/ossl_pkey_ec.c
  23. @@ -762,8 +762,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
  24. method = EC_GFp_mont_method();
  25. } else if (id == s_GFp_nist) {
  26. method = EC_GFp_nist_method();
  27. +#if !defined(OPENSSL_NO_EC2M)
  28. } else if (id == s_GF2m_simple) {
  29. method = EC_GF2m_simple_method();
  30. +#endif
  31. }
  32.  
  33. if (method) {
  34. @@ -817,8 +819,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
  35.  
  36. if (id == s_GFp) {
  37. new_curve = EC_GROUP_new_curve_GFp;
  38. +#if !defined(OPENSSL_NO_EC2M)
  39. } else if (id == s_GF2m) {
  40. new_curve = EC_GROUP_new_curve_GF2m;
  41. +#endif
  42. } else {
  43. ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m");
  44. }
Add Comment
Please, Sign In to add comment