diff --git a/ChangeLog b/ChangeLog index bdd22e8c9d..38d265cf47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri May 25 22:19:40 2012 Martin Bosslet + + * ext/openssl/ossl_ssl.c: Revert r35583 + * test/openssl/test_ssl.rb: Handle ECONNRESET in code instead to avoid + the test failing in Ruby CI [1] + + [1] http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz#test-all + Fri May 25 19:51:36 2012 Koichi Sasada * vm_eval.c (rb_f_caller): caller() method accepts second optional diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index d285e58a82..d375b0ff67 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -1158,6 +1158,7 @@ ossl_start_ssl(VALUE self, int (*func)(), const char *funcname, int nonblock) rb_io_wait_readable(FPTR_TO_FD(fptr)); continue; case SSL_ERROR_SYSCALL: + if (errno) rb_sys_fail(funcname); ossl_raise(eSSLError, "%s SYSCALL returned=%d errno=%d state=%s", funcname, ret2, errno, SSL_state_string_long(ssl)); default: ossl_raise(eSSLError, "%s returned=%d errno=%d state=%s", funcname, ret2, errno, SSL_state_string_long(ssl)); diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index 5fff78fe3e..f3f3c9c365 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -516,6 +516,8 @@ end ssl.sync_close = true ssl.connect yield ssl + rescue Errno::ECONNRESET => e + raise OpenSSL::SSL::SSLError.new(e.message) ensure ssl.close end