summaryrefslogtreecommitdiff
path: root/ext/openssl
AgeCommit message (Collapse)Author
2007-01-03Revert r11453matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-03* io.c (ruby_dup): start GC on ENOMEM as well.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-01* ext/openssl/ossl_ocsp.c: OpenSSL::OCSP::OSCPError should begotoyuzo
subclass of OpenSSL::OpenSSLError. [ruby-dev:29980] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-26* ext/openssl/ossl_pkcs7.c (ossl_pkcs7_verify): should clear error.gotoyuzo
(fix http://bugs.debian.org/394336) * ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-27* ext/openssl/ossl.h: move <ruby.h> inclusion point to shut upmatz
Solaris compiler. [ruby-core:08114] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-25add extconf.h.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-20* ext/openssl/extconf.rb: add check for OBJ_NAME_do_all_sorted.gotoyuzo
* ext/openssl/ossl_cipher.c (ossl_s_ciphers): new method OpenSSL::Cipher.ciphers. it returns all the cipher names. * ext/openssl/lib/openssl/cipher.rb: - add constants AES128, AES192, AES256. [ruby-dev:28610] - reimplement without eval() * ext/openssl/lib/openssl/digest.rb: reimplement without eval(). * test/openssl/test_cipher.rb, test_digest: fix about reimplemented features. * sample/openssl/cipher.rb: rewrite all. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-02* ext/openssl/extconf.rb: use create_header.gotoyuzo
* ext/openssl/ossl.h, ext/openssl/openssl_missing.h: include RUBY_EXTCONF_H. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-23* ext/openssl/lib/openssl/ssl.rbgotoyuzo
(OpenSSL::SSL::SocketForwarder#setsockopt,getsockopt): typo fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-04-29* ext/openssl/ossl_asn1.c (ossl_asn1_decode0): should initializegotoyuzo
flag. [ruby-core:07785] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-17* ext/openssl/ossl_ssl.c, ext/openssl/ossl_nsspki.c: fix typo.gotoyuzo
[ruby-core:07571] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-03-15* ext/openssl/ossl_ssl.c, ext/openssl/ossl_nsspki.c: should usegotoyuzo
"rb_str_new(0, 0)" to make empty string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-19* ext/openssl/ossl.h (OSSL_Debug): should not use __func__.gotoyuzo
[ruby-dev:28339] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-26* ext/openssl/lib/openssl/ssl.rb ↵gotoyuzo
(OpenSSL::SSL::SSLSocket#post_connection_chech): treat wildcard character in commonName. [ruby-dev:28121] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-22* ext/openssl/extconf.rb: check for X509V3_EXT_nconf_nid.gotoyuzo
* ext/openssl/ossl_x509ext.c (MakeX509ExtFactory): should use OPENSSL_malloc to allocate X509V3_CTX. * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): use X509V3_EXT_nconf_nid to avoid SEGV (and to build extensions which values are placed in separate section). * test/openssl/test_x509ext.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-01* ext/openssl/extconf.rb: should check ERR_peek_last_error().gotoyuzo
[ruby-dev:27597] * ext/openssl/ossl.c (ossl_raise): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-30* ext/openssl/ossl_cipher.c (ossl_cipher_update): input data mustgotoyuzo
not be empty. [ruby-talk:161220] * test/openssl/test_cipher.rb: add test for Cipher#update(""). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-12* ext/openssl/ossl.c (Init_openssl): should call OpenSSL_add_ssl_algorithms().gotoyuzo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-24banish a warning.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-18* ext/openssl/ossl_pkey.h, ossl_pkey_rsa.c, ossl_pkey_dsa.c:gotoyuzo
an instance variable "private" is added to OpenSSL::PKey class. this ivar is a flag that shows whether there is a private key in the instance. * ext/openssl/ossl_engine.c: (ossl_engine_load_privkey): set private key flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-13* lib/net/https.rb: backported from trunk, rev 1.3. [ruby-dev:25673] ↵aamine
(again), [ruby-dev:26617] (again), [ruby-dev:27062] * ext/openssl/lib/net/https.rb: removed. * ext/openssl/lib/net/protocols.rb: removed. * lib/net/http.rb: #use_ssl?, #use_ssl are moved from net/https. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-10* ext/openssl/ossl_engine.c (ossl_engine_s_by_id):gotoyuzo
OpenSSL::Engine.by_id calls given block before calling ENGINE_init (block parameter is the return value of this method itself). this functionality is useful to load dynamic shared engines. the following code is a sample of loading a key using OpenSC PKCS #11 module. require "openssl" pkcs11 = OpenSSL::Engine.by_id("dynamic"){|e| e.ctrl_cmd("SO_PATH", "/usr/lib/opensc/engine_pkcs11.so") e.ctrl_cmd("LIST_ADD", "1") e.ctrl_cmd("LOAD") } pkcs11.ctrl_cmd("PIN", "secret") key = pkcs11.load_private_key * ext/openssl/ossl_engine.c (ossl_engine_ctrl_cmd): new method OpenSSL::Engine#ctrl_cmd. it wraps ENGINE_ctrl_cmd_string. * ext/openssl/ossl_engine.c (ossl_engine_get_cmds): new method OpenSSL::Engine#cmds. it returms engine command definitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-10these files were forgotten in last commit.gotoyuzo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-10* ext/openssl/ossl_asn1.c (asn1str_to_str): new function.gotoyuzo
* ext/openssl/ossl_pkcs7.c: new class OpenSSL::PKCS7::RecipientInfo. this class wraps PKCS7_RECIP_INFO struct. * ext/openssl/ossl_pkcs7.c: OpenSSL::PKCS7::Signer is renamed to OpenSSL::PKCS7::SignerInfo. ("Signer" remains as an alias of SignerInfo.) * test/openssl/test_pkcs7.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-10* ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): assume thatgotoyuzo
the argument is a DER string if Base64 decoding failed. * ext/openssl/ossl_ns_pki.c (ossl_spki_to_der): new method. * test/openssl/test_ns_spki.rb: add new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-10* ext/openssl/lib/digest.rb: added SHA224, SHA256, SHA384 and SHA512.gotoyuzo
these features are enabled if this library is compiled with OpenSSL 0.9.8 or later. * test/openssl/test_digest.rb: add test for new digests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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-09-04* ext/openssl/openssl/lib/openssl/buffering.rb (Buffering#do_write):gotoyuzo
should clear data from the buffer which already been output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-26* ext/openssl/openssl_missin.c: include <openssl/engine.h> beforegotoyuzo
<openssl/x509_vfy.h> to avoid compilation error of mswin32. suggested by NAKAMURA Usaku. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-23* ext/openssl/ossl_engine.c (ossl_engine_s_load): should checkgotoyuzo
OPENSSL_NO_STATIC_ENGINE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-19* ext/openssl/openssl_missing.c, ext/openssl/ossl.h,gotoyuzo
ext/openssl/ossl_asn1.c, ext/openssl/ossl_bio.c, ext/openssl/ossl_pkcs12.h, ext/openssl/ossl_x509req.c: avoid compiler warnings. suggested by Mical Rokos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-27* ext/openssl/ossl_x509store.c (ossl_x509stctx_set_time): shouldgotoyuzo
not set internal flag directry. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8532 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-15* ext/openssl/extconf.rb: check for OPENSSL_cleanse.gotoyuzo
* ext/openssl/openssl_missing.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8335 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-31* ext/openssl/ossl_engine.c (ossl_engine_s_load): should returngotoyuzo
value. [ruby-dev:25971] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-30* ext/openssl/ossl_engine.c (ossl_engine_s_load): should not raisegotoyuzo
error even if the specified engine could not be loaded. (Dynamic engines don't have fixed name to load.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8223 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
2005-02-28* exception error messages updated. [ruby-core:04497]matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-14* ext/openssl/lib/openssl/ssl.rbgotoyuzo
(OpenSSL::SSL::SSLSocket#post_connection_check): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-11* ext/openss/ossl_x509store.c (ossl_x509store_set_default_paths):gotoyuzo
new method OpenSSL::X509::Store#set_default_paths. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-22* ext/openssl/ossl_ocsp.c (ossl_ocspreq_to_der): should callgotoyuzo
GetOCSPReq at first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-31* ext/openssl/ossl_ns_spki.c (ossl_spki_set_challenge): should callgotoyuzo
StringValue before GetSPKI. fixed: [ruby-dev:25359]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-27* ext/openssl/ossl_x509name.c (Init_ossl_x509name): should usegotoyuzo
rb_hash_new to get exactly a Hash. fix [ruby-dev:25325]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-21* ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode,gotoyuzo
ossl_asn1_decode_all): temporary value should be marked volatile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-21* ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode):gotoyuzo
use rb_str_new4 to avoid SEGV. fix [ruby-dev:25261] * test/openssl/test_asn1.rb: add tests for OpenSSL::ASN1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-21* ext/openssl/ossl_asn1.c (ossl_asn1_traverse): [ruby-dev:25261]matz
* ext/openssl/ossl_asn1.c (ossl_asn1_decode): ditto. * ext/openssl/ossl_asn1.c (ossl_asn1_decode_all): ditto. * struct.c (make_struct): [ruby-dev:25249] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-20* ext/openssl/lib/net/https.rb,protocols.rb,telnets.rb: deletegotoyuzo
doc and code about SSLContext#{key_file,cert_file}. fixed: [ruby-dev:25243] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-19* ext/openssl/ossl_x509store.cgotoyuzo
(ossl_x509store_set_time): add OpenSSL::X509::Store#time=. (ossl_x509stctx_set_time): add OpenSSL::X509::StoreContext#time=. * test/openssl/ossl_x509store.rb: test certificate validity times. * ext/openssl/ossl_x509name.c (ossl_x509name_to_s): add optional 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. * test/openssl/ossl_x509name.rb: add tests about RFC2253 DN. * text/openssl/ssl_server.rb: try to listen ports from 20443 to 20542 while EADDRINUSE is raised. * all changes in this entry are backport from 1.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e