summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_ssl.c
AgeCommit message (Collapse)Author
2005-09-10* ext/openssl/ossl.c (ossl_raise): should use ERR_peek_last_errorgotoyuzo
to get last error on the current thread. And should report errors are on the stack while OpenSSL.debug is true. * ext/openssl/ossl.c (ossl_get_errors): new method for debugging this library. * ext/openssl/ossl_ssl.c (ossl_sslctx_set_ciphers): fix error message. * ext/openssl/ossl_x509req.c (ossl_x509req_set_attributes): get rid of unused variable. * ext/openssl/ossl_x509store.c (ossl_x509store_initialize): should set @time to avoid warning. * ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths, X509_STORE_add_cert, X509_STORE_add_crl): should raise error if wrapped functions failed. * test/openssl/test_x509store.rb: add test for errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-22* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLServer#intialize):gotoyuzo
should initialize session id context. [ruby-core:4663] * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): add session id support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-08* ext/openssl/ossl_ssl.c: add callbacks to OpenSSL::SSL::SSLContexts.gotoyuzo
- SSLContext#client_cert_cb=(aProc). it is called when a client certificate is requested by a server and no certificate was not set for the SSLContext. it must return an Array which includes OpenSSL::X509::Certificate and OpenSSL::PKey::RSA/DSA objects. - SSLContext#tmp_dh_callback=(aProc). it is called in key exchange with DH algorithm. it must return an OpenSSL::PKey::DH object. * ext/openssl/ossl_ssl.c (ossl_sslctx_set_ciphers): ignore the argument if it's nil. * ext/openssl/ossl_pkey.c (GetPrivPKeyPtr, ossl_pkey_sign): should call rb_funcall first. (DupPrivPKeyPtr): new function. * ext/openssl/ossl_pkey_dh.c: add default DH parameters. * ext/openssl/ossl_pkey.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-09* ext/openssl/ossl_ssl.c (ossl_start_ssl, ossl_ssl_write): callgotoyuzo
rb_sys_fail if errno isn't 0. [ruby-dev:25831] * ext/openssl/lib/openssl/cipher.rb: fix typo. [ruby-dev:24285] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-07* ext/openssl/ossl_ssl.c (ossl_start_ssl, ossl_ssl_read,gotoyuzo
ossl_ssl_write): - need to set errno on Win32 platform. - should call rb_sys_fail instead of rasing SSLError if SSL_ERROR_SYSCALL occured. - should wait for that the underlying IO become readable or writable if the error was SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. [ruby-dev:25795] * ext/openssl/lib/openssl/buffering.rb (Buffering#initialize): should set @eof and @rbuffer. (Buffering#fill_rbuff): should rescue Errno::EAGAIN. (Buffering#consume_rbuf): pointless eof flag resetting is deleted. (Buffering#read): should return an empty string if the specified size is zero. (Buffering#readpartial): new method. (Buffering#readline): fix typo. (Buffering#getc): return the first character of string correctly. (Buffering#each): fix typo. suggested by Brian Ollenberger. (Buffering#readchar): fix typo. (Buffering#eof?): should read again it the input buffer is empty. (Buffering#do_write): should rescue Errno::EAGAIN. (Buffering#puts): use "\n" as the output field separator. * ext/openssl/lib/openssl/ssl.rb: set non-blocking flag to the underlying IO. * ext/openssl/extconf.rb: get rid of GNUmakefile generation. * text/openssl/test_pair.rb: test for IO like methods. * test/ruby/ut_eof.rb: test about empty file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-15* ext/openssl/ossl_digest.c (ossl_digest_initialize): [ruby-dev:25198]matz
* lib/cgi/session.rb (CGI::Session::initialize): generate new session if given session_id does not exist. [ruby-list:40368] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-23* ext/openssl/ossl_ssl.c (ossl_ssl_read):gotoyuzo
- 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/branches/ruby_1_8@6809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-30* ext/openssl/ossl_ssl.c (ossl_ssl_read): take optional second argumentgotoyuzo
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/branches/ruby_1_8@6550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-24* ext/openssl/ossl_ssl.c (ossl_ssl_read): should check for errorgotoyuzo
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-06no need to care SSL_ERROR_NONE and SSL_ERROR_WANT_X509_LOOKUP.gotoyuzo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-06* ext/openssl/ossl_ssl.c (ossl_start_ssl): new function to wrapgotoyuzo
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-11-04* lib/webrick/https.rb (HTTPRequest#parse): set @client_cert_chain.gotoyuzo
* 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-01* ext/openssl/ossl_ssl.c (ossl_ssl_peer_cert_chain): add new methodgotoyuzo
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-10-29* ext/openssl/lib/openssl/buffering.rb (Buffering#initialize):gotoyuzo
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-09-06* ext/openssl/ruby_missing.c: rid of unnecessary backwardgotoyuzo
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-08-18* ext/openssl/ossl_ssl.c: sync_close is moved to SSLSocket asgotoyuzo
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-10* ext/openssl/lib/openssl/buffering.rb: increase BLOCK_SIZEgotoyuzo
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-07-30* ext/openssl/ossl_ssl.c (ossl_sslctx_initialize): should initializegotoyuzo
instance variables. [ruby-talk:77362] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-26* io.c (rb_fdopen): set errno if it's zero on win32 platforms.usa
* 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-25* ext/openssl/ossl_ssl.c (ossl_ssl_setup): need to pass the realusa
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-23* ext/openssl: imported.gotoyuzo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e