aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-08 12:10:22 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-08 12:10:22 +0000
commit93767f7a86eeff5af82e1650e2ea8fb02e2c0a11 (patch)
tree0076d9e4fcfd5f8d87fab7610005f2bdf187cbf1
parent6cd2c9057ad06957d19ca2b455faf3d2ea1f6a0c (diff)
downloadruby-93767f7a86eeff5af82e1650e2ea8fb02e2c0a11.tar.gz
* ext/openssl/extconf.rb: asume it doesn't have SSLv2 related
functions when OPENSSL_NO_SSL2 is defined. Usually openssl's header and the library (libssl) have the same set of functions, but on some environment the library has functions whose headers doesn't declare. (openssl/opensslconf.h and libsso.so aren't be synchronized) To detect such case explicitly check feature macro and remove related functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog11
-rw-r--r--ext/openssl/extconf.rb2
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 32e7cdfa80..550d2a794b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Sun May 8 21:01:14 2016 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/openssl/extconf.rb: asume it doesn't have SSLv2 related
+ functions when OPENSSL_NO_SSL2 is defined.
+ Usually openssl's header and the library (libssl) have the same
+ set of functions, but on some environment the library has functions
+ whose headers doesn't declare. (openssl/opensslconf.h and libsso.so
+ aren't be synchronized)
+ To detect such case explicitly check feature macro and remove
+ related functions.
+
Sun May 8 18:51:33 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (rb_home_dir_of): return the default home path if the
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index c36a7021e4..e293b730df 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -152,6 +152,8 @@ have_struct_member("EVP_CIPHER_CTX", "engine", "openssl/evp.h")
have_struct_member("X509_ATTRIBUTE", "single", "openssl/x509.h")
have_macro("OPENSSL_FIPS", ['openssl/opensslconf.h']) && $defs.push("-DHAVE_OPENSSL_FIPS")
have_macro("EVP_CTRL_GCM_GET_TAG", ['openssl/evp.h']) && $defs.push("-DHAVE_AUTHENTICATED_ENCRYPTION")
+have_macro("OPENSSL_NO_SSL2","openssl/opensslconf.h") && $defs.reject!{|x|/HAVE_SSLV2_/===x}
+have_macro("OPENSSL_NO_SSL3_METHOD","openssl/opensslconf.h") && $defs.reject!{|x|/HAVE_SSLV3_/===x}
Logging::message "=== Checking done. ===\n"