ruby-changes:42876
From: naruse <ko1@a...>
Date: Sun, 8 May 2016 20:13:45 +0900 (JST)
Subject: [ruby-changes:42876] naruse:r54950 (trunk): * ext/openssl/extconf.rb: asume it doesn't have SSLv2 related
naruse 2016-05-08 21:10:22 +0900 (Sun, 08 May 2016) New Revision: 54950 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54950 Log: * 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. Modified files: trunk/ChangeLog trunk/ext/openssl/extconf.rb Index: ext/openssl/extconf.rb =================================================================== --- ext/openssl/extconf.rb (revision 54949) +++ ext/openssl/extconf.rb (revision 54950) @@ -152,6 +152,8 @@ have_struct_member("EVP_CIPHER_CTX", "en https://github.com/ruby/ruby/blob/trunk/ext/openssl/extconf.rb#L152 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" Index: ChangeLog =================================================================== --- ChangeLog (revision 54949) +++ ChangeLog (revision 54950) @@ -1,3 +1,14 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun May 8 21:01:14 2016 NARUSE, Yui <naruse@r...> + + * 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@r...> * file.c (rb_home_dir_of): return the default home path if the -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/