second argument to specify the output format (see also
X509_NAME_print_ex).
* ext/openssl/ossl_x509name.c (ossl_x509name_init): new constants:
OpenSSL::X509::Name::COMPAT, OpenSSL::X509::Name::RFC2253,
OpenSSL::X509::ONELINE, OpenSSL::X509::MULTILINE.
* ext/openssl/lib/openssl/x509.rb (OpenSSL::X509::Name::RFC2253DN):
new module to provide the parse for RFC2253 DN format.
* ext/openssl/lib/openssl/x509.rb (OpenSSL::X509::Name.parse_rfc2253):
new method to parse RFC2253 DN format.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 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
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
second argument. it expected to be a Hash not an Integer.
* ext/openssl/ossl_x509name.c (ossl_x509name_add_entry): add new
function for OpenSSL::X509::Name#add_entry.
* ext/openssl/ossl_x509name.c (Init_ossl_x509name): add constants
OpenSSL::X509::Name::DEFAULT_OBJECT_TYPE and OBJECT_TYPE_TEMPLATE.
* ext/openssl/lib/openssl/x509.rb (OpenSSL::X509::Name#initialize):
second argument takes OBJECT_TYPE_TEMPLATE by default.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
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
* 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
* 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
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
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
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