diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-08 05:48:44 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-08 05:48:44 +0000 |
commit | e3f049d250d69acd3f254367d496d07984947aba (patch) | |
tree | fdff2432a37100143838d3cd0a6c1a6fbae6e9ff | |
parent | 087b9f941782eaee566197d61b8d7f471a3d9a64 (diff) | |
download | ruby-e3f049d250d69acd3f254367d496d07984947aba.tar.gz |
merge revision(s) 31346,31528:
* ext/openssl/extconf.rb: Should check SSLv2_*method.
openssl compiled with "no-ssl2" the extconf don't fail
when running `make' having this compilation errors.
Patched by Laurent Arnoud. fixes #4562, #4556
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@34483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | ext/openssl/extconf.rb | 6 | ||||
-rw-r--r-- | ext/openssl/ossl_ssl.c | 3 |
3 files changed, 22 insertions, 0 deletions
@@ -1,3 +1,16 @@ +Sun Jun 26 17:52:32 2011 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> + + * ext/openssl/ossl_ssl.c: By trunk@31346, function check of SSLv2 is executed. + However, the problem is not revised in this. + This adds the control of using function of SSLv2 in made macro by function check. + +Sun Jun 26 17:52:32 2011 Nobuhiro Iwamatsu <iwamatsu@nigauri.org> + + * ext/openssl/extconf.rb: Should check SSLv2_*method. + ssl compiled with "no-ssl2" the extconf don't fail + running `make' having this compilation errors. + hed by Laurent Arnoud. fixes #4562, #4556 + Thu Jan 26 16:08:43 2012 URABE Shyouhei <shyouhei@ruby-lang.org> * string.c (rb_str_hash): randomize hash to avoid algorithmic diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index a5c1595869..51c25d467d 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -103,6 +103,12 @@ end if try_compile("#define FOO(...) foo(__VA_ARGS__)\n int x(){FOO(1);FOO(1,2);FOO(1,2,3);}\n") $defs.push("-DHAVE_VA_ARGS_MACRO") end +have_func("SSLv2_method") +have_func("SSLv2_server_method") +have_func("SSLv2_client_method") +unless have_func("SSL_set_tlsext_host_name", ['openssl/ssl.h']) + have_macro("SSL_set_tlsext_host_name", ['openssl/ssl.h']) && $defs.push("-DHAVE_SSL_SET_TLSEXT_HOST_NAME") +end if have_header("openssl/engine.h") have_func("ENGINE_add") have_func("ENGINE_load_builtin_engines") diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index facf6ca59b..138b405a13 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -109,9 +109,12 @@ struct { OSSL_SSL_METHOD_ENTRY(TLSv1), OSSL_SSL_METHOD_ENTRY(TLSv1_server), OSSL_SSL_METHOD_ENTRY(TLSv1_client), +#if defined(HAVE_SSLV2_METHOD) && defined(HAVE_SSLV2_SERVER_METHOD) && \ + defined(HAVE_SSLV2_CLIENT_METHOD) OSSL_SSL_METHOD_ENTRY(SSLv2), OSSL_SSL_METHOD_ENTRY(SSLv2_server), OSSL_SSL_METHOD_ENTRY(SSLv2_client), +#endif OSSL_SSL_METHOD_ENTRY(SSLv3), OSSL_SSL_METHOD_ENTRY(SSLv3_server), OSSL_SSL_METHOD_ENTRY(SSLv3_client), |