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

11 commits

Author SHA1 Message Date
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
80549d5f17 * ext/openssl/ossl_x509name.c (ossl_x509name_initialize): add
optional argument to specify the DirectoryString type
  (ASN1::UTF8STRING by default). RFC3280 deprecates PrintableString
  for DirectoryString, and strongly requires to use UTF8String for
  all certificates issued after December, 31 2003.

* ext/openssl/lib/openssl/x509.rb (X509::Name::parse): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-09 16:20:22 +00:00
gotoyuzo
30103702c3 * ext/openssl: all files are reviewed to simplify and avoid memory leak.
* ext/openssl/extconf.rb: add check for assert.h.

* ext/openssl/ossl.c (ossl_buf2str): new function to convert
  C buffer to String and free buffer.

* ext/openssl/ossl.c (ossl_x509_ary2sk): new function to convert
  Array of OpenSSL::X509 to STACK_OF(X509) with exception safe.

* ext/openssl/ossl.c (ossl_to_der, ossl_to_der_if_possible): new
  functions to convert object to DER string.

* ext/openssl/ossl.h: ditto.

* ext/openssl/ossl_bio.c (ossl_membio2str): new function to convert
  BIO to String object and free BIO.

* ext/openssl/ossl_bio.h: ditto.

* ext/openssl/ossl_pkcs7.c (ossl_pkcs7_to_der): add for "to_der".

* ext/openssl/ossl_x509name.c (ossl_x509name_to_der): ditto.

* ext/openssl/ossl_x509ext.c (ossl_x509ext_to_der): ditto.

* ext/openssl/ossl_x509ext.c (create_ext_from_array): removed
  and reimplement in openssl/x509.rb.

* ext/openssl/ossl_x509attr.c: reimplemented and disable some
  method temporarily. this class doesn't work fine without ASN.1
  data support;-) I'll rewrite in near future.

* ext/openssl/lib/openssl/x509.c (X509::Attribute): get rid off
  unused code.

* ext/openssl/lib/openssl/x509.c (X509::ExtensionFactory): refine all.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-17 09:05:02 +00:00
gotoyuzo
d9f38cbee8 * ext/openssl/lib/openssl/x509.rb: new method X509::Name::parse.
* ext/openssl/ossl_digest.c: add ossl_digest_new().

* ext/openssl/ossl_digest.h: ditto.

* ext/openssl/ossl_cipher.c: add ossl_cipher_new().

* ext/openssl/ossl_cipher.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 09:08:40 +00:00
gotoyuzo
28e962d92c * ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): warning
for skipping server verification.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-02 11:41:33 +00:00
gotoyuzo
65652ecdb5 * lib/webrick/ssl.rb: new file; SSL/TLS enhancement for GenericServer.
* lib/webrick/https.rb: SSLSocket handling is moved to webrick/ssl.rb.

* lib/webrick/compat.rb (File::fnmatch): remove old migration code.

* lib/webrick/httpserver.rb (HTTPServer#run): ditto.

* lib/webrick/server.rb (GenericServer#listen): the body of this
  method is pull out as Utils::create_lisnteners.

* lib/webrick/utils.rb (Utils::create_lisnteners): new method.

* lib/webrick/server.rb (GenericServer#start): should not
  through unknown errors. and refine comments.

* ext/openssl/lib/openssl/ssl.rb (SSLServer#accept): should close
  socket if SSLSocket raises error.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-19 06:00:36 +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
39c4886fe7 * ext/openssl/lib/openssl/ssl.rb (SSLSocket#sync_close=): add a
method to specify if the underlying IO will be closed in
  SSLSocket#close.

* ext/openssl/lib/openssl/buffering.rb: add forwarders to
  setsockopt, getsockopt and fcntl.

* ext/openssl/lib/net/protocols.rb: enable sync for SSLSocket.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-17 08:22:45 +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
ea837fc6fe * ext/openssl/lib/net/https.rb (use_ssl=): raise ProtocolError if
connection is set up already.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-28 19:06:31 +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