1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

16 commits

Author SHA1 Message Date
matz
018837b84f * node.h (NODE_TYPESHIFT): allow 4 more bits for line numbers.
[ruby-talk:117841]

* ruby.h (FL_ABLE): nodes are not subject for flag operations.

* io.c (ARGF_FORWARD): should have specified argv explicitly,
  since we no longer have frame->argv saved.  [ruby-dev:24602]

* string.c (RESIZE_CAPA): check string attribute before modifying
  capacity member of string structure.  [ruby-dev:24594]

* ext/zlib/zlib.c (gzreader_gets): use memchr() to to gain
  performance.  [ruby-talk:117701]

* sprintf.c (rb_f_sprintf): raise ArgumentError for extra
  arguments, unless (digit)$ style used.

* io.c (rb_io_fptr_finalize): leave stdin/stdout/stderr open in
  interpreter termination.  [ruby-dev:24579]

* eval.c (frame_free): Guy Decoux solved the leak problem.
  Thanks.  [ruby-core:03549]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-27 09:29:26 +00:00
gotoyuzo
7b505316a4 * ext/openssl/ossl_ssl.c (ossl_ssl_read):
- should return an empty string if specified length to read is 0.
  - should check for pending data and wait for fd before reading.
  - call underlying IO's sysread if SSL session is not started.
  [ruby-dev:24072], [ruby-dev:24075]

* ext/openssl/ossl_ssl.c (ossl_ssl_write):
  - call underlying IO's syswrite if SSL session is not started.

* ext/openssl/ossl_ssl.c (ossl_ssl_pending): new method
  OpenSSL::SSL#pending.

* ext/openssl/lib/openssl/buffering.rb: should not use select.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-22 07:28:45 +00:00
gotoyuzo
fde5c3ff92 * ext/openssl/ossl_ssl.c (ossl_ssl_read): take optional second argument
to specify a string to be written.

* ext/openssl/lib/openssl/buffering.rb (OpenSSL::Buffering#read):
  take optional second argument to specify a string to be written.

* ext/openssl/lib/openssl/buffering.rb (OpenSSL::Buffering#gets):
  refine regexp for end-of-line.

* ext/opnessl/lib/openssl/ssl.rb
  (OpenSSL::SSL::SocketForwarder#listen): fix typo.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-26 18:11:29 +00:00
gotoyuzo
932075e82e * ext/openssl/ossl_ssl.c (ossl_ssl_read): should check for error
status by SSL_get_error().

* ext/openssl/ossl_ssl.c (ossl_ssl_write): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-24 07:29:40 +00:00
gotoyuzo
7cc4f065fa no need to care SSL_ERROR_NONE and SSL_ERROR_WANT_X509_LOOKUP.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-06 14:33:52 +00:00
gotoyuzo
70daacc533 * ext/openssl/ossl_ssl.c (ossl_start_ssl): new function to wrap
SSL_connect and SSL_accept; if SSL_connect (or SSL_accept) returned
  but not finished the handshake process, we should retry it.

* ext/openssl/ossl_ssl.c (ossl_ssl_connect): call ossl_start_ssl.

* ext/openssl/ossl_ssl.c (ossl_ssl_accept): ditto.

* ext/openssl/ossl_ssl.c (ossl_ssl_read): allow signal traps.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-06 13:59:31 +00:00
gotoyuzo
d193b90d54 * lib/webrick/https.rb (HTTPRequest#parse): set @client_cert_chain.
* lib/webrick/https.rb (HTTPRequest#meta_vars): create
  SSL_CLIENT_CERT_CHAIN_n from @client_cert_chain.

* ext/openssl/ossl_ssl.c (ossl_ssl_get_peer_cert_chain): return nil
  if no cert-chain was given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-04 23:48:13 +00:00
gotoyuzo
fc133b8997 * ext/openssl/ossl_ssl.c (ossl_ssl_peer_cert_chain): add new method
SSLSocket#peer_cert_chain.

* ext/openssl/ossl_x509req.c (GetX509ReqPtr): new function
  which returns underlying X509_REQ.

* ext/openssl/ossl_x509ext.c (ossl_x509extfactory_set_issuer_cert,
  ossl_x509extfactory_set_subject_cert, ossl_x509extfactory_set_crl,
  ossl_x509extfactory_set_subject_req, ossl_x509extfactory_set_config):
  use underlying C struct without duplication not to leak momory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-01 09:24:55 +00:00
gotoyuzo
2e0b6e28ad * ext/openssl/lib/openssl/buffering.rb (Buffering#initialize):
add new method to inherit @sync from @io.sync.

* ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): no need to
  set sync flag explicitly.

* ext/openssl/ossl_ssl.c (ossl_sslctx_initialize): call super.

* ext/openssl/ossl_ssl.c (ossl_sslctx_setup): set extra chain
  certificates in @extra_chain_cert.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-29 17:27:59 +00:00
gotoyuzo
256d273e69 * ext/openssl/ruby_missing.c: rid of unnecessary backward
compatibility stuff. and remove DEFINE_ALLOC_WRAPPER from
  all sources.

* ext/openssl/ossl_x509ext.c (X509::Extension.new): new method.

* ext/openssl/ossl_x509ext.c (X509::Extension#oid=): new method.

* ext/openssl/ossl_x509ext.c (X509::Extension#value=): new method.

* ext/openssl/ossl_x509ext.c (X509::Extension#critical=): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-06 08:56:09 +00:00
gotoyuzo
ba64282cdc * ext/openssl/ossl_ssl.c: sync_close is moved to SSLSocket as
a builtin.

* ext/openssl/lib/openssl/buffering.rb (Buffering#close): ditto.

* ext/openssl/lib/openssl/buffering.rb (Buffering#puts): should
  add a return to the tails of each line.

* ext/openssl/lib/openssl/ssl.rb: new class OpenSSL::SSL::SSLServer.

* ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): use sync_close.

* ext/openssl/sample/echo_svr.rb: use SSLServer.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-18 22:49:48 +00:00
gotoyuzo
923044bba2 * ext/openssl/lib/openssl/buffering.rb: increase BLOCK_SIZE
from 1k to 16k bytes. [ruby-talk:78603]

* ext/openssl/ossl_ssl.c (ossl_sslctx_s_alloc): enable
  partial write to allow interruption in SSLSocket#sysread.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-10 01:54:05 +00:00
gotoyuzo
c9b177327d * ext/openssl/ossl_ssl.c (ossl_sslctx_initialize): should initialize
instance variables. [ruby-talk:77362]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-30 06:58:43 +00:00
usa
b431230396 * io.c (rb_fdopen): set errno if it's zero on win32 platforms.
* ext/openssl/ossl_ssl.c (TO_SOCKET): define special version when
  _WIN32 is defined. this is ruby's problem, not OpenSSL.

* win32/win32.c: remove some old comments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-26 12:27:04 +00:00
usa
2b15bd05d3 * ext/openssl/ossl_ssl.c (ossl_ssl_setup): need to pass the real
socket to SSL_get_fd on native win32 platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25 16:40:26 +00:00
gotoyuzo
231247c010 * ext/openssl: imported.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23 16:12:24 +00:00