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

32 commits

Author SHA1 Message Date
nahi
7b8c142696 * test/openssl/test_pkcs7.rb: reverted the previous patch. it should
be as it was to check interface compatibility.  sorry for bothering
          with this.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-14 03:46:37 +00:00
nahi
2ab2a56f12 * test/openssl/test_pkcs7.rb: follow the library change. applied a
patch from <zn at mbf.nifty.com> [ruby-dev:31214].
          NOTE: r12496 imports the latest openssl libs from trunk to ruby_1_8  
          though its's not ChangeLog-ed.  maintainer should aware that.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-14 03:29:30 +00:00
technorama
7137a314b3 * ext/openssl/{extconf.rb,ossl_ssl_session.c}:
Fix ruby-Bugs-11513.

* ext/openssl/ossl_pkey_ec.c
  New methods EC::Point.[eql,make_affine!,invert!,on_curve?,infinity?]
  By default output the same key form as the openssl command.

* ext/openssl/ossl_rand.c
  New method Random.status?

* test/openssl/test_ec.rb
  New tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-18 09:03:15 +00:00
technorama
18342ff8e0 import OpenSSL from trunk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-08 15:02:04 +00:00
gotoyuzo
75823801a2 *** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-20 11:22:27 +00:00
gotoyuzo
128eaaad11 * ext/openssl/extconf.rb: add check for OBJ_NAME_do_all_sorted.
* 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-20 11:18:16 +00:00
gotoyuzo
f58c42d357 * test/openssl/test_ssl.rb (test_parallel): call GC.start to close
unused files. [ruby-dev:27981]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-12 06:56:08 +00:00
gotoyuzo
b54ab5610b * ext/openssl/extconf.rb: check for X509V3_EXT_nconf_nid.
* 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-22 22:29:13 +00:00
gotoyuzo
787d0e3254 * ext/openssl/ossl_cipher.c (ossl_cipher_update): input data must
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-30 20:50:48 +00:00
gotoyuzo
9098be4970 * ext/openssl/ossl_pkey.h, ossl_pkey_rsa.c, ossl_pkey_dsa.c:
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-18 22:56:11 +00:00
gotoyuzo
19dbb4c3c1 * test/openssl/test_pkcs7.rb (test_enveloped): skip this test
to avoid a bug of PKCS7_enctypt() (only if ext/openssl is
  compiled with OpenSSL-0.9.7d or earlier versions).
  http://www.mail-archive.com/openssl-dev@openssl.org/msg17376.html


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-12 11:55:25 +00:00
(no author)
a4164e5949 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-10 01:08:21 +00:00
gotoyuzo
580d8dca40 * ext/openssl/lib/digest.rb: added SHA224, SHA256, SHA384 and SHA512.
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 00:57:20 +00:00
gotoyuzo
2ec654a1a0 * ext/openssl/ossl.c (ossl_raise): should use ERR_peek_last_error
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-10 00:54:31 +00:00
gotoyuzo
6794f52b80 * test/openssl/test_x509store.rb: add test for expired CRL
and refine some assertions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-28 07:41:36 +00:00
gotoyuzo
0c25a62834 * ext/openssl/ossl_ssl.c: add callbacks to OpenSSL::SSL::SSLContexts.
- 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-04-08 09:26:54 +00:00
gotoyuzo
279c5947d1 * ext/openssl/ossl_ssl.c (ossl_start_ssl, ossl_ssl_write): call
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-09 11:26:49 +00:00
(no author)
64eaecb8a8 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-07 12:10:03 +00:00
gotoyuzo
fa480f489c * ext/openssl/lib/openssl/ssl.rb
(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-14 04:14:39 +00:00
(no author)
3ded769c39 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-21 05:40:23 +00:00
gotoyuzo
049c3927ff * ext/openssl/ossl_x509store.c
(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
2004-12-19 08:28:33 +00:00
(no author)
f497034013 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-05 16:43:26 +00:00
gotoyuzo
a061fdf407 * test/openssl/test_ssl.rb: add workaround for Cygwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-18 14:40:04 +00:00
gotoyuzo
5fb266b5c0 * test/openssl/ssl_server.rb, test/openssl/test_ssl.rb: workaround to
terminate child process.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-16 05:56:44 +00:00
gotoyuzo
03fc2ae03e * ext/openssl/ossl_asn1.c (ossl_asn1cons_to_der): fix type of
argument. [ruby-dev:23891]

* test/openssl/test_x509store.rb: prune tests for CRL checking
  unless X509::V_FLAG_CRL_CHECK is defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-14 09:09:36 +00:00
(no author)
1d4a4d11cd This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-01 03:01:07 +00:00
gotoyuzo
907911feda * ext/openssl/ossl_ssl.c (ossl_ssl_read): take optional second argument
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
2004-06-30 18:21:39 +00:00
(no author)
d26fe5ce2e This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-27 03:23:29 +00:00
(no author)
048163f622 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-21 18:25:26 +00:00
gotoyuzo
f9eebc635c * test_x509crl.rb (test_basic): add test for CRL issuer.
* test_x509store.rb: test for OpenSSL::X509::Store
* utils.rb (issue_crl): should set issuer's subject.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-21 18:25:25 +00:00
gotoyuzo
72042f956f * rescue LoadError. [ruby-dev:23539]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-19 18:30:52 +00:00
(no author)
d88b373dc9 This commit was manufactured by cvs2svn to create branch 'ruby_1_8'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-18 04:02:24 +00:00