summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_ssl.c
AgeCommit message (Collapse)Author
2015-08-05* ext/openssl/lib/openssl/ssl.rb (module OpenSSL): movetenderlove
OpenSSL::SSL::SSLSocket#initialize to Ruby. * ext/openssl/ossl_ssl.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-05ossl_ssl.c: remove unused variablesnobu
* ext/openssl/ossl_ssl.c (ossl_call_client_cert_cb), (ossl_call_tmp_dh_callback, ossl_call_tmp_ecdh_callback), (ossl_call_session_get_cb, ossl_call_session_new_cb): remove no longer used variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-04* ext/openssl/lib/openssl/ssl.rb (module OpenSSL): extract callbacktenderlove
lookup to private Ruby methods. This means we can keep the default DH callback logic hidden from consumers. Also, since the SSLSocket always has a context, we can remove conditionals about that instance. * ext/openssl/ossl_ssl.c: move callback lookup methods to private Ruby methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-01* ext/openssl/ossl_ssl.c (ossl_sslctx_setup): Implementtenderlove
SSLContext#options and options= using SSL_CTX_set_options and SSL_CTX_get_options. This reduces the number of ivars we need and simplifies `ossl_sslctx_setup`. * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): Default `options` to SSL_OP_ALL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-31* ext/openssl/ossl_ssl.c (Init_ossl_ssl): OpenSSL declares thesetenderlove
constants as longs, so we should follow that and use LONG2NUM. http://git.io/vOqxD git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-31* ext/openssl/ossl_ssl.c (ossl_call_tmp_dh_callback): change callbacktenderlove
to return the Ruby dh (or ecdh) object that the caller cares about instead of doing rb_iv_get / set to communicate. This means we can remove an rb_iv_get call, and only use the set calls for their intended purpose (to prevent the object from being GC'd). * ext/openssl/ossl_ssl.c (ossl_tmp_dh_callback): ditto * ext/openssl/ossl_ssl.c (ossl_call_tmp_ecdh_callback): ditto * ext/openssl/ossl_ssl.c (ossl_tmp_ecdh_callback): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-31* ext/openssl/ossl_ssl.c (ossl_call_tmp_dh_callback): Similarly to thetenderlove
tmp_ecdh_callback, the SSLSocket instance always holds a reference to the SSLContext object (it's always set in `initialize`). The SSLContext holds a reference to the tmp_dh_callback. Ask the context for the callback instead of storing the callback in two places. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-31* ext/openssl/ossl_ssl.c (ossl_call_tmp_dh_callback): create an arraytenderlove
and use `rb_apply` to clean up calls to `rb_protect`. * ext/openssl/ossl_ssl.c (ossl_tmp_dh_callback): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-31* ext/openssl/ossl_ssl.c (ossl_call_tmp_ecdh_callback): The SSL sockettenderlove
always holds a reference to the SSLContext object, which will have the callback object. Ask the context for the callback instead of storing the callback in two places. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-31* ext/openssl/lib/openssl/ssl.rb (module OpenSSL): converttenderlove
`tmp_dh_callback` to Ruby, and call it when setting up an SSL connection. This allows us to move the "default" behavior to the reader method. * ext/openssl/ossl_ssl.c: call the tmp_dh_callback instead of accessing the SSLContext's internals. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-26ossl_ssl.c: fix conditionnobu
* ext/openssl/ossl_ssl.c (ossl_ssl_alpn_protocol): fix condition to compile, needs ALPN to be available. [Feature #9390] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-26* ext/openssl/ossl_ssl.c (ossl_call_servername_cb): set the ssl contexttenderlove
object returned by the servername callback on to the socket as an instance variable. If the callback allocated a new context object and didn't keep a reference to it, it could be GC'd out from under the socket object. * test/openssl/test_ssl.rb (class OpenSSL): test for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-25* ext/openssl/lib/openssl/ssl.rb (module OpenSSL): supporttenderlove
specifically setting the tmp_dh_callback to nil. * ext/openssl/ossl_ssl.c (Init_ossl_ssl): ditto * test/openssl/test_pair.rb (module OpenSSL): add a test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-25* ext/openssl/lib/openssl/ssl.rb (module OpenSSL): move the defaulttenderlove
tmp_dh_callback Ruby code and set it as a default in `initialize`. * ext/openssl/ossl_pkey_dh.c (static unsigned char DEFAULT_DH_512_GEN): move this constant to Ruby. * ext/openssl/ossl_pkey_dh.c (static unsigned char DEFAULT_DH_1024_GEN): ditto * ext/openssl/ossl_pkey_dh.c (Init_ossl_dh): ditto * ext/openssl/ossl_ssl.c (ossl_tmp_dh_callback): ditto * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): tmp_dh_callback should always be set, so we can remove this conditional git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-25* ext/openssl/lib/openssl/ssl.rb (module OpenSSL): movetenderlove
OpenSSL::SSL::SSLContext#initialize implementation to pure Ruby. * ext/openssl/ossl_ssl.c (ossl_sslctx_initialize): ditto * ext/openssl/ossl_ssl.c (Init_ossl_ssl): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-23ossl_ssl.c: suppress warningsnobu
* ext/openssl/ossl_ssl.c (ossl_sslctx_setup): fix argument types to suppress shorten-64-to-32 and shorten-64-to-32 warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22fix tests bu not setting the string instance on the frozen objecttenderlove
OpenSSL [copies the string returned by the pointe](https://github.com/openssl/openssl/blob/9f040d6decca7930e978784c917f731e5c45e8f0/ssl/t1_lib.c#L1800-1809), so it should be safe to just return a pointer to the string object and not set an instance variable on the already frozen object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* ext/openssl/ossl_ssl.c: add ECDH callback support. [Feature #11356]tenderlove
* test/openssl/test_pair.rb: test for ECDH callback support git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22* ext/openssl/ossl_ssl.c: add ALPN support. [Feature #9390]tenderlove
* ext/openssl/extconf.rb: detect ALPN support in OpenSSL * test/openssl/test_ssl.rb: test for ALPN git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02delay `exception: false' checks for minor speedupnormal
Delay hash lookups until we are about to hit an exception. This gives a minor speedup ratio of 2-3% in the new bm_io_nonblock_noex benchmark as well as reducing code. * benchmark/bm_io_nonblock_noex.rb: new benchmark * ext/openssl/ossl_ssl.c (no_exception_p): new function (ossl_start_ssl): adjust for no_exception_p (ossl_ssl_connect): adjust ossl_start_ssl call (ossl_ssl_connect_nonblock): ditto (ossl_ssl_accept): ditto (ossl_ssl_accept_nonblock): ditto (ossl_ssl_read_internal): adjust for no_exception_p (ossl_ssl_write_internal): ditto (ossl_ssl_write): adjust ossl_write_internal call (ossl_ssl_write_nonblock): ditto * ext/stringio/stringio.c (strio_read_nonblock): delay exception check * io.c (no_exception_p): new function (io_getpartial): call no_exception_p (io_readpartial): adjust for io_getpartial (get_kwargs_exception): remove (io_read_nonblock): adjust for io_getpartial, check no_exception_p on EOF (io_write_nonblock): call no_exception_p (rb_io_write_nonblock): do not check `exception: false' (argf_getpartial): adjust for io_getpartial [ruby-core:69778] [Feature #11318] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-24ext/openssl/ossl_ssl.c: raise if kwargs given in blocking modenormal
OpenSSL::SSL::SSLSocket#sysread does not accept kwargs in blocking mode, inform users if they make an error. * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): do not process kwargs in blocking mode * test/openssl/test_ssl.rb: test sysread git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-29openssl: wrapper object before allocnobu
* ext/openssl: make wrapper objects before allocating structs to get rid of potential memory leaks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-20* ext/openssl/*: use license instead of licence.hsbt
[fix GH-876][ci skip] Patch by @davydovanton * lib/net/https.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-19ext: suppress warningsnobu
* ext/{etc,openssl,tk}: Adding parens and comparisons around assignments to get rid of Wparentheses warnings. [Fix GH-875] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12connect_nonblock supports "exception: false"normal
This is for consistency with accept_nonblock arguments and gives a minor speedup from avoiding exceptions. [ruby-core:68838] [Feature #11024] * ext/openssl/ossl_ssl.c (ossl_ssl_connect_nonblock): support `exception: false' * (get_no_exception): move function location * ext/socket/socket.c (sock_connect_nonblock): support `exception: false' * test/openssl/test_pair.rb (test_connect_accept_nonblock_no_exception): test `exception: false' on connect, rename from `test_accept_nonblock_no_exception' * test/socket/test_nonblock.rb (test_connect_nonblock_no_exception): new test Benchmark results: default 0.050000 0.100000 0.150000 ( 0.151307) exception: false 0.030000 0.080000 0.110000 ( 0.108840) ----------------------------8<----------------------- require 'socket' require 'benchmark' require 'io/wait' require 'tmpdir' host = '127.0.0.1' serv = TCPServer.new(host, 0) # UNIX sockets may not hit EINPROGRESS nr = 5000 # few iterations to avoid running out of ports addr = serv.getsockname pid = fork do begin serv.accept.close rescue => e warn "#$$: #{e.message} (#{e.class})" end while true end at_exit { Process.kill(:TERM, pid) } serv.close Benchmark.bmbm do |x| x.report("default") do nr.times do s = Socket.new(:INET, :STREAM) s.setsockopt(:SOL_SOCKET, :SO_REUSEADDR, 1) begin s.connect_nonblock(addr) rescue IO::WaitWritable s.wait_writable end s.close end end x.report("exception: false") do nr.times do s = Socket.new(:INET, :STREAM) s.setsockopt(:SOL_SOCKET, :SO_REUSEADDR, 1) case s.connect_nonblock(addr, exception: false) when :wait_writable s.wait_writable end s.close end end end git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12accept_nonblock: favor rb_hash_lookup2 to avoid Hash#defaultnormal
* ext/socket/init.c (rsock_s_accept_nonblock): use rb_hash_lookup2 * ext/openssl/ossl_ssl.c (get_no_exception): new function (ossl_ssl_accept_nonblock): use get_no_exception (ossl_ssl_read_internal): ditto (ossl_ssl_write_nonblock): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12ext/openssl/ossl_ssl.c: predefine wait_*able symbolsnormal
This leads to a size reduction in openssl.so and reduces the chance of bugs due to typos. text data bss dec hex before: 333022 13164 3312 349498 5553a after: 332790 13164 3232 349186 55402 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-12accept_nonblock supports "exception: false"normal
This is analogous to functionality found in IO#read_nonblock and IO#wait_nonblock. Raising exceptions for common failures on non-blocking servers is expensive and makes $DEBUG too noisy. Benchmark results: user system total real default 2.790000 0.870000 3.660000 ( 3.671597) exception: false 1.120000 0.800000 1.920000 ( 1.922032) exception: false (cached arg) 0.820000 0.770000 1.590000 ( 1.589267) --------------------- benchmark script ------------------------ require 'socket' require 'benchmark' require 'tmpdir' nr = 1000000 Dir.mktmpdir('nb_bench') do |path| sock_path = "#{path}/test.sock" s = UNIXServer.new(sock_path) Benchmark.bmbm do |x| x.report("default") do nr.times do begin s.accept_nonblock rescue IO::WaitReadable end end end x.report("exception: false") do nr.times do begin s.accept_nonblock(exception: false) rescue IO::WaitReadable abort "should not raise" end end end x.report("exception: false (cached arg)") do arg = { exception: false } nr.times do begin s.accept_nonblock(arg) rescue IO::WaitReadable abort "should not raise" end end end end end * ext/socket/init.c (rsock_s_accept_nonblock): support exception: false [ruby-core:66385] [Feature #10532] * ext/socket/init.c (rsock_init_socket_init): define new symbols * ext/socket/rubysocket.h: adjust prototype * ext/socket/socket.c (sock_accept_nonblock): support exception: false * ext/openssl/ossl_ssl.c (ossl_ssl_accept_nonblock): ditto * ext/socket/socket.c (Init_socket): adjust accept_nonblock definition * ext/openssl/ossl_ssl.c (Init_ossl_ssl): ditto * ext/socket/tcpserver.c (rsock_init_tcpserver): ditto * ext/socket/unixserver.c (rsock_init_unixserver): ditto * ext/socket/tcpserver.c (tcp_accept_nonblock): adjust rsock_s_accept_nonblock call * ext/socket/unixserver.c (unix_accept_nonblock): ditto * ext/openssl/ossl_ssl.c (ossl_start_ssl): support no_exception * ext/openssl/ossl_ssl.c (ossl_ssl_connect): adjust ossl_start_ssl call * ext/openssl/ossl_ssl.c (ossl_ssl_connect_nonblock): ditto * ext/openssl/ossl_ssl.c (ossl_ssl_accept): ditto * test/socket/test_nonblock.rb (test_accept_nonblock): test for "exception :false" * test/socket/test_tcp.rb (test_accept_nonblock): new test * test/socket/test_unix.rb (test_accept_nonblock): ditto * test/openssl/test_pair.rb (test_accept_nonblock_no_exception): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12ossl_ssl.c: typed datanobu
* ext/openssl/ossl_ssl.c (ossl_ssl_type): use typed data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12ossl_ssl.c: typed datanobu
* ext/openssl/ossl_ssl.c (ossl_sslctx_type): use typed data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-12ossl_ssl.h: accessor macrosnobu
* ext/openssl/ossl_ssl.c (GetSSLCTX): accessor macro. * ext/openssl/ossl_ssl.h (GetSSL): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30protoize no-arguments functionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-03openssl: constifynobu
* ext/openssl/ossl_asn1.c (ossl_asn1_info): constify. * ext/openssl/ossl_pkcs7.c (ossl_pkcs7_sym2typeid): constify and remove sentinel as the count is used. * ext/openssl/ossl_ssl.c (ossl_ssl_method_tab): constify. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-03ext: prefer RB_TYPE_P over comparison TYPE with constantsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-28* ext/openssl/ossl_ssl.c (ossl_ssl_close): Fix sync_close to workakr
when SSL is not started. This fix the fd leak by test_https_proxy_authentication in test/net/http/test_https_proxy.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-28* ext/openssl/ossl_ssl.c: pass read_nonblock options to underlying IOtenderlove
when SSL session has not been started. * test/openssl/test_ssl.rb: test for change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19* ext/nkf/nkf-utf8/nkf.c: fix typo by @windwiny [fix GH-506]hsbt
* ext/openssl/ossl_ssl.c: ditto * ext/psych/yaml/scanner.c: ditto * ext/socket/init.c: ditto * ext/socket/socket.c: ditto * ext/tk/tcltklib.c: ditto * ext/win32ole/win32ole.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-25ossl_ssl.c: declare OP_MSIE_SSLV2_RSA_PADDING only if definednobu
* ext/openssl/ossl_ssl.c (Init_ossl_ssl): Declare a constant `OP_MSIE_SSLV2_RSA_PADDING` only if the macro is defined. The `SSL_OP_MSIE_SSLV2_RSA_PADDING` has been removed from latest snapshot of OpenSSL 1.0.1. [Fixes GH-488] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12* doc/contributing.rdoc: [DOC] Fix typo in comments by @dvsuresh [Fixes GH-475]a_matsuda
* ext/openssl/ossl_ssl.c: ditto. * test/ruby/test_m17n.rb: ditto. https://github.com/ruby/ruby/pull/475 [ci-skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29ruby/ruby.h: RB_BLOCK_CALL_FUNC_ARGLISTnobu
* include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration argument list of rb_block_call_func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-27* ext/openssl/ossl_ssl.c (ossl_ssl_read): Replace duplicatedrbrain
wait_writable with wait_readable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26* io.c (io_read_nonblock): support non-blocking reads without raisingtenderlove
exceptions. As in: `io.read_nonblock(size, exception: false)` [ruby-core:38666] [Feature #5138] * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): ditto * ext/stringio/stringio.c (strio_sysread): ditto * io.c (rb_io_write_nonblock): support non-blocking writes without raising an exception. * ext/openssl/ossl_ssl.c (ossl_ssl_write_internal): ditto * test/openssl/test_pair.rb (class OpenSSL): tests * test/ruby/test_io.rb (class TestIO): ditto * test/socket/test_nonblock.rb (class TestSocketNonblock): ditto * test/stringio/test_stringio.rb (class TestStringIO): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-31* ext/openssl/ossl_ssl.c: Add missing paren in rdoc [Fix GH-321]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19fix typos. Patch by k_takata.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* ext/openssl/ossl_ssl.c: Disabled OpenSSL::SSL::SSLSocket ifyugui
defined(OPENSSL_NO_SOCK). This fixes a linkage error on platforms which do not have socket. OpenSSL itself is still useful as a set of cryptographic functions even on such platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-16* ext/openssl/*: Document synonymous methods, by windwiny [GH-277]zzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-15* ext/openssl/ossl_ssl.c: Correct shutdown behavior w.r.t GC.emboss
* test/openssl/test_ssl.rb: Add tests to verify correct behavior. [Bug #8240] Patch provided by Shugo Maeda. Thanks! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-11Fix typonaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08Fix #6154 by introducing new EAGAIN/EWOULDBLOCK/EINPROGRESSheadius
subclasses that include WaitReadable or WaitWritable rather than extending them into the exception object each time. * error.c: Capture EGAIN, EWOULDBLOCK, EINPROGRESS exceptions and export them for use in WaitReadable/Writable exceptions. * io.c: Create versions of EAGAIN, EWOULDBLOCK, EINPROGRESS that include WaitReadable and WaitWritable. Add rb_readwrite_sys_fail for nonblocking failures using those exceptions. Use that function in io_getpartial and io_write_nonblock instead of rb_mod_sys_fail * ext/openssl/ossl_ssl.c: Add new SSLError subclasses that include WaitReadable and WaitWritable. Use those classes for write_would_block and read_would_block instead of rb_mod_sys_fail. * ext/socket/ancdata.c: Use rb_readwrite_sys_fail instead of rb_mod_sys_fail in bsock_sendmsg_internal and bsock_recvmsg_internal. * ext/socket/init.c: Use rb_readwrite_sys_fail instead of rb_mod_sys_fail in rsock_s_recvfrom_nonblock and rsock_s_connect_nonblock. * ext/socket/socket.c: Use rb_readwrite_sys_fail instead of rb_mod_sys_fail in sock_connect_nonblock. * include/ruby/ruby.h: Export rb_readwrite_sys_fail for use instead of rb_mod_sys_fail. Introduce new constants RB_IO_WAIT_READABLE and RB_IO_WAIT_WRITABLE for first arg to rb_readwrite_sys_fail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29* ext/openssl/ossl_ssl.c (ssl_npn_encode_protocol_i): fix byte orderngoto
issue on big-endian architecture [ruby-core:50292] [Bug #7463] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e