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

27 commits

Author SHA1 Message Date
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
nobu
c7b5c0489b * ext/openssl/extconf.rb (HAVE_VA_ARGS_MACRO): need to compile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-17 14:40:00 +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
nobu
8695612caf * marshal.c (w_symbol, w_object): get rid of warnings.
* re.c (rb_memsearch): ditto.

* time.c (time_dump): ditto.

* ext/extmk.rb (extmake): not continue making when extconf.rb
  failed.

* ext/openssl/extconf.rb: check __VA_ARGS__ macro more precisely.

* ext/openssl/ossl.h: remove version.h dependency.

* ext/openssl/ruby_missing.h: ditto.

* lib/mkmf.rb (pkg_config): use --libs output except with
  only-L for other options.  [ruby-list:38099]

* lib/mkmf.rb (create_makefile): separate rule for static
  library from shared object.

* win32/Makefile.sub, bcc32/Makefile.sub, wince/Makefile.sub:
  define exec_prefix and libdir.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-16 14:58:34 +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
nobu
63f5a7164b * lib/mkmf.rb (pkg_config): get configuration by pkg-config. [new]
* ext/openssl/extconf.rb: use pkg_config.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-02 05:54:00 +00:00
nobu
a222ce3000 *** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01 08:20:20 +00:00
nobu
2c2e81ff98 * ext/openssl/extconf.rb: should replace literally.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01 08:13:29 +00:00
gotoyuzo
00dfd7d7cc * ext/openssl/extconf.rb: move gmake specific features
into GNUmakefile.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-31 05:22:06 +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
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
eban
906ab8e25d * ext/openssl/extconf.rb: check again after pkg-config for MinGW on
Cygwin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-28 09:55:12 +00:00
eban
39bc97b078 * ext/openssl/extconf.rb: better support MinGW. add
dir_config("kerberos") and with_config("pkg-config).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-27 12:19:18 +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
gotoyuzo
0a39c57489 * ext/openssl/ossl.h: fix comment.
* ext/openssl/ossl.c (ossl_debug): should enable if no va-args
  macro supplied.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25 20:40:57 +00:00
gotoyuzo
d89358aba3 * ext/openssl/extconf.rb: refine va-args macro detection.
[ruby-talk:76983]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25 19:16:19 +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
nahi
ec75bfe364 * Added samples.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25 15:19:51 +00:00
nahi
ccdc8d302a * ext/openssl/sample: Add samples.
- cert2text.rb: Dump certificate file as text.
  - crlstore.rb: CRL store implementation.  Fetch CRL via HTTP when
    http-access2 is installed.
  - certstore.rb: Certificate store implementation.
  - cert_store_view.rb: Certificate store viewer with FXRuby.  Uses
    c_rehash.rb, crlstore.rb and certstore.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25 15:12:26 +00:00
gotoyuzo
b35031495a * ext/openssl/extconf.rb: add check for BN_rand_range() and
BN_pseudo_rand_range().

* ext/openssl/ossl_bn.c (ossl_bn_s_rand_range): should raise
  NotImplementedError if BN_rand_range() wan not defined.

* ext/openssl/ossl_bn.c (ossl_bn_s_pseudo_rand_range): should raise
  NotImplementedError if BN_pseudo_rand_range() wan not defined.

* ext/openssl/ossl_pkcs7.c (ossl_pkcs7_s_encrypt): avoid compiler
  warning for OpenSSL-0.9.6.

* ext/openssl/ossl_pkcs7.c (ossl_pkcs7si_initialize): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25 06:50:55 +00:00
gotoyuzo
c9aad4c098 * ext/openssl/extconf.rb: add check for libsocket and libnsl.
* ext/openssl/extconf.rb: use pkg-config to build CFLAGS and LDFLAGS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24 17:58:56 +00:00
gotoyuzo
c1008ab51b * ext/openssl/extconf.rb: add check for win32 OpenSSL libraries.
* ext/openssl/extconf.rb: add check for __VA_AEGS__.

* ext/openssl/ossl.h: avoid non C99 compiler errors.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24 06:56:02 +00:00
eban
3150436c85 * ext/openssl/extconf.rb: revert use of dir_config.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24 02:10:04 +00:00
gotoyuzo
f00c14ca25 * ext/openssl/ssl.h: undef X509_NAME and PKCS7_SIGNER_INFO to
avoid name confliction on mswin32.

* ext/openssl/ssl.c (ossl_protect_obj2bio): avoid VC++ warnings
  in function prototype.

* ext/openssl/ssl.c (ossl_protect_membio2str): ditto.

* ext/openssl/ssl.c (ossl_protect_x509_ary2sk): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23 19:08:35 +00:00
michal
3f71dcc79b Cut check for OpenSSL version
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23 18:48:07 +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