diff options
author | nobu <nobu@ruby-lang.org> | 2016-05-09 00:05:33 +0000 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-05-31 11:31:27 +0900 |
commit | 270124999f884807223eb3943c0ebfe7fcafcab3 (patch) | |
tree | eb2371f5fee26b5ba2697ef00bbf033daf12ee08 /ext | |
parent | dcbdb09b34c32864e87f09308b91d53aa2c13ed6 (diff) | |
download | ruby-openssl-270124999f884807223eb3943c0ebfe7fcafcab3.tar.gz |
openssl/extconf.rb: NO SSL macros first
* ext/openssl/extconf.rb: check OPENSSL_NO_SSL{2,3} macros before
checking related functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/extconf.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index e293b730..9b3bdef0 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -97,12 +97,16 @@ have_func("OBJ_NAME_do_all_sorted") 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", "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" |