[前][次][番号順一覧][スレッド一覧]

ruby-changes:42885

From: nobu <ko1@a...>
Date: Mon, 9 May 2016 08:08:58 +0900 (JST)
Subject: [ruby-changes:42885] nobu:r54959 (trunk): openssl/extconf.rb: NO SSL macros first

nobu	2016-05-09 09:05:33 +0900 (Mon, 09 May 2016)

  New Revision: 54959

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54959

  Log:
    openssl/extconf.rb: NO SSL macros first
    
    * ext/openssl/extconf.rb: check OPENSSL_NO_SSL{2,3} macros before
      checking related functions.

  Modified files:
    trunk/ext/openssl/extconf.rb
Index: ext/openssl/extconf.rb
===================================================================
--- ext/openssl/extconf.rb	(revision 54958)
+++ ext/openssl/extconf.rb	(revision 54959)
@@ -97,12 +97,16 @@ have_func("OBJ_NAME_do_all_sorted") https://github.com/ruby/ruby/blob/trunk/ext/openssl/extconf.rb#L97
 have_func("SSL_SESSION_get_id")
 have_func("SSL_SESSION_cmp")
 have_func("OPENSSL_cleanse")
-have_func("SSLv2_method")
-have_func("SSLv2_server_method")
-have_func("SSLv2_client_method")
-have_func("SSLv3_method")
-have_func("SSLv3_server_method")
-have_func("SSLv3_client_method")
+unless have_macro("OPENSSL_NO_SSL2","openssl/opensslconf.h")
+  have_func("SSLv2_method")
+  have_func("SSLv2_server_method")
+  have_func("SSLv2_client_method")
+end
+unless have_macro("OPENSSL_NO_SSL3_METHOD","openssl/opensslconf.h")
+  have_func("SSLv3_method")
+  have_func("SSLv3_server_method")
+  have_func("SSLv3_client_method")
+end
 have_func("TLSv1_1_method")
 have_func("TLSv1_1_server_method")
 have_func("TLSv1_1_client_method")
@@ -152,8 +156,6 @@ have_struct_member("EVP_CIPHER_CTX", "en https://github.com/ruby/ruby/blob/trunk/ext/openssl/extconf.rb#L156
 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"
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]