nobu
bcd0bcc390
* test/openssl/test_ec.rb: added test_dsa_sign_asn1_FIPS186_3. dgst is
...
truncated with ec_key.group.order.size after openssl 0.9.8m for
FIPS 186-3 compliance.
WARNING: ruby-openssl aims to wrap an OpenSSL so when you're using
openssl 0.9.8l or earlier version, EC.dsa_sign_asn1 raises
OpenSSL::PKey::ECError as before and EC.dsa_verify_asn1 just returns
false when you pass dgst longer than expected (no truncation
performed).
* ext/openssl/ossl_pkey_ec.c: rdoc typo fixed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-06 10:13:46 +00:00
usa
eaaef6af40
* ext/openssl/ossl_ssl_session.c (SSL_SESSION_cmp): remove static for
...
loopy version of openssl (0.9.8l?).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-23 15:16:02 +00:00
akr
5c67d206a7
* ext/openssl/ossl_config.c: fix compilation failure with
...
OpenSSL 0.9.8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-23 14:28:56 +00:00
usa
6f7b5ffe6f
* ext/openssl/ossl_config.c: OpenSSL 1.0.0 support.
...
* ext/openssl/extconf.rb: check some functions added/removed at
OpenSSL 1.0.0.
* ext/openssl/ossl_engine.c (ossl_engine_s_load): use engines which
exists.
* ext/openssl/ossl_ssl_session (SSL_SESSION_cmp): removed at 1.0.0,
so implement compatible fuction here.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-23 08:37:55 +00:00
nobu
d0e5a34ac7
* ext/**/*.[ch]: removed trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 08:21:01 +00:00
nobu
3e8d63059d
* ext/**/*.[ch]: removed trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 08:16:09 +00:00
nobu
977267c2e0
* ext/**/*.[ch]: removed trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 08:04:13 +00:00
mame
ce2b574017
* ext/openssl/ossl_ssl.c (Init_ossl_ssl): add SSLContext#ssl_timeout=,
...
which allows net/https to specify timeout. [ruby-core:24812]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-10 04:16:19 +00:00
mame
1ab5d3947c
* ext/openssl/ossl_x509store.c (ossl_x509store_initialize): initialize
...
store->ex_data.sk. [ruby-core:28907] [ruby-core:23971]
[ruby-core:18121]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-26 14:01:24 +00:00
naruse
48e861ddfb
* openssl/ossl.c (OSSL_IMPL_SK2ARY): for OpenSSL 1.0.
...
patched by Jeroen van Meeuwen at [ruby-core:25210]
fixed by Nobuyoshi Nakada [ruby-core:25238],
Hongli Lai [ruby-core:27417],
and Motohiro KOSAKI [ruby-core:28063]
* ext/openssl/ossl_ssl.c (ossl_ssl_method_tab),
(ossl_ssl_cipher_to_ary): constified.
* ext/openssl/ossl_pkcs7.c (pkcs7_get_certs, pkcs7_get_crls):
split pkcs7_get_certs_or_crls.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-28 02:56:26 +00:00
knu
d223734555
Back out the series of changes pending a due discussion.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-23 17:33:39 +00:00
knu
497a5f8d08
* ext/openssl/lib/openssl/digest.rb (OpenSSL::Digest::hexdigest):
...
No need to define hexdigest() here because the super method is
properly defined to use digest() passing through arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-23 15:56:45 +00:00
knu
55a7a836dd
* ext/openssl/ossl_hmac.c (Init_ossl_hmac): Make OpenSSL::HMAC a
...
subclass of Digest::Class so it can take advantage of all those
utility methods such as base64digest.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-23 15:52:19 +00:00
knu
eb845bea4c
* ext/openssl/ossl_digest.c (GetDigestPtr): Allow to pass the
...
OpenSSL::Digest class in place of where either an instance of
the class or the algorithm name was demanded. For example,
OpenSSL::HMAC.digest(OpenSSL::Digest::SHA1, key, data) is now
accepted as well as the usual
OpenSSL::HMAC.digest(OpenSSL::Digest::SHA1.new, key, data) and
OpenSSL::HMAC.digest("SHA1", key, data).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-23 15:51:01 +00:00
nahi
46e086910e
* ext/openssl/ossl_ssl.c: initialize @hostname of SSLSocket to avoid
...
warning at SSLSocket#connect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-02 14:54:50 +00:00
marcandre
ae86e15230
* ossl_ocsp.c (ossl_ocspres_to_der): Bug fix in Response#to_def. Patch by Chris Chandler [ruby-core:18411]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21 16:13:35 +00:00
marcandre
cf69eeab9c
* ossl_config.c (ossl_config_add_value_m, ossl_config_set_section): Check if frozen (or untrusted for $SECURE >= 4) [ruby-core:18377]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21 16:12:46 +00:00
nobu
a4fbd748e2
* configure.in (GCC): subst for GCC depending extension libraries.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12 08:31:44 +00:00
nobu
19b24f499b
* include/ruby/ruby.h (rb_check_safe_str): deprecated.
...
* ext/openssl/ossl_x509store.c (ossl_x509store_add_{file,path}):
replaced deprecated funtion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-14 11:03:22 +00:00
akr
05a278b4cd
* ext/readline/readline.c: use rb_f_notimplement for methods not
...
implemented.
* ext/openssl/ossl_engine.c: ditto.
* ext/openssl/ossl_config.c: ditto.
* ext/openssl/ossl_cipher.c: ditto.
* ext/openssl/ossl_pkcs5.c: ditto.
* ext/openssl/ossl_x509ext.c: ditto.
* ext/socket/socket.c: ditto.
* ext/socket/basicsocket.c: ditto.
* ext/socket/ancdata.c: ditto.
* ext/socket/unixsocket.c: ditto.
* ext/iconv/iconv.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-18 14:10:06 +00:00
akr
5bdeb55a02
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-21 08:08:52 +00:00
akr
7fd155cf0f
* ext/openssl/ossl_ssl.c (write_would_block): defined.
...
(read_would_block): defined.
(ossl_start_ssl): add nonblock argument.
(ossl_ssl_connect): follow ossl_start_ssl change.
(ossl_ssl_connect_nonblock): new method.
(ossl_ssl_accept): follow ossl_start_ssl change.
(ossl_ssl_accept_nonblock): new method.
(ossl_ssl_read_internal): use write_would_block and
read_would_block.
(ossl_ssl_write_internal): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-21 06:56:33 +00:00
akr
17a085ea8c
* ext/openssl/lib/openssl/buffering.rb
...
(OpenSSL::Buffering#write_nonblock): new method.
* ext/openssl/ossl_ssl.c (ossl_ssl_write_nonblock): new method.
(ossl_ssl_write_internal): defined.
(ossl_ssl_write): use ossl_ssl_write_internal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-20 17:39:44 +00:00
akr
2208c990e1
update rdoc and NEWS.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19 15:31:24 +00:00
akr
c4049f4cb6
* io.c (rb_mWaitReadable): defined.
...
(rb_mWaitWritable): defined.
(io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN.
(rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and
EAGAIN.
* error.c (make_errno_exc): extracted from rb_sys_fail.
(rb_mod_sys_fail): new function.
* include/ruby/ruby.h (rb_mod_sys_fail): declared.
(rb_mWaitReadable): declared.
(rb_mWaitWritable): declared.
* ext/socket/init.c (rsock_s_recvfrom_nonblock): extend
IO::WaitReadable on EWOULDBLOCK and EAGAIN.
(rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK,
EAGAIN, ECONNABORTED and EPROTO.
* ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable
on EINPROGRESS.
* ext/socket/ancdata.c (bsock_sendmsg_internal): extend
IO::WaitWritable on EWOULDBLOCK and EAGAIN.
(bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and
EAGAIN.
* ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError
extended by IO::WaitReadable/IO::WaitWritable on
SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE.
* ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise.
(ossl_exc_new): new function.
* ext/openssl/ossl.h (ossl_exc_new): declared.
* lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and
IO::WaitWritable.
[ruby-core:22539], [ruby-dev:38140]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19 11:40:38 +00:00
nobu
1f46af14e4
* ext/openssl/openssl_missing.h (i2d_of_void): cast for callbacks.
...
[ruby-core:22860]
* ext/openssl/ossl_engine.c (ossl_engine_s_by_id): suppress a
warning.
* ext/openssl/ossl_ssl.c (ossl_sslctx_flush_sessions): time_t may
be larger than long.
* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_get_time),
(ossl_ssl_session_get_timeout): use TIMET2NUM() to convert
time_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13 07:45:35 +00:00
nobu
9300355bec
* ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): should use
...
OPENSSL_free instead of free. a patch from Charlie Savage at
[ruby-core:22858].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13 06:10:45 +00:00
nobu
e9b98f413e
* configure.in (AC_HEADER_DIRENT): added.
...
* include/ruby/ruby.h (NUM2INT, rb_special_const_p): returns true
and false instead of Qtrue and Qfalse for platforms where VALUE
is bigger than int.
* gc.c (gc_stress_set), ext/openssl/ossl_asn1.c (decode_bool): got
rid of variables named `bool'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13 01:42:21 +00:00
akr
2412162959
* ext/openssl: suppress warnings.
...
* ext/openssl/ossl.h (OSSL_Debug): don't use gcc extention for
variadic macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12 13:44:37 +00:00
akr
a69f46bc2b
* ext/openssl/ossl_ssl.c (ossl_ssl_def_const): use INT2NUM because
...
OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG doesn't fit into Fixnum.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12 13:16:19 +00:00
nobu
287a34ae0d
* {ext,lib,test}/**/*.rb: removed trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
akr
a7d581fa2f
* ext/openssl/lib/openssl/buffering.rb: define Buffering module under
...
OpenSSL. [ruby-dev:37906]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-27 13:15:35 +00:00
nobu
3e1394f36f
* ext/openssl/ossl_ocsp.c (ossl_ocspbres_verify): OCSP_basic_verify
...
returns positive value on success, not non-zero. [ruby-core:21762]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-19 06:39:52 +00:00
akr
e1f9891eeb
forgot to add.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 22:02:22 +00:00
akr
0b058a1c2a
forgot to modify.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 16:17:03 +00:00
akr
e14c9923b4
* ext/openssl: avoid cyclic require.
...
* ext/openssl/lib/openssl/ssl-internal.rb: renamed from ssl.rb
* ext/openssl/lib/openssl/x509-internal.rb: renamed from x509.rb.
* lib/net/imap.rb: require openssl, instead of openssl/ssl.
* lib/net/pop.rb: require openssl, instead of openssl/ssl.
[ruby-dev:38018]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-17 16:09:44 +00:00
nobu
641bdd84ef
* ext/openssl/ossl_cipher.c (add_cipher_name_to_ary): used
...
conditionally.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 15:29:39 +00:00
technorama
7361a2ecb3
* ext/openssl/ossl_ssl.c: Server Name Indication support.
...
new methods SSLContext#server_name_cb=, SSLSocket#hostname=.
* test/openssl/test_ssl.rb: Tests for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-24 21:45:42 +00:00
akr
3d829c8697
* gc.c (negative_size_allocation_error_with_gvl): abolish a warning.
...
(negative_size_allocation_error): ditto.
* ext/openssl/ossl.c (ossl_raise): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14 13:39:17 +00:00
akr
021aaa70d6
* ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): show openssl error
...
code in EWOULDBLOCK error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31 08:18:12 +00:00
akr
ef2ff2776b
* ext/openssl/ossl_digest.c (GetDigestPtr): use StringValueCStr
...
instead of STR2CSTR.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize): ditto.
(ossl_ec_group_initialize): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31 05:55:25 +00:00
akr
cb4d7b1a7f
* ext/openssl/lib/openssl/buffering.rb (Buffering#read_nonblock):
...
implemented.
* ext/openssl/ossl_ssl.c (rb_sys_fail_path): removed.
(fcntl.h): don't include.
(ossl_ssl_read_internal): defined.
(ossl_ssl_read): use ossl_ssl_read_internal.
(ossl_ssl_read_nonblock): use ossl_ssl_read_internal.
(Init_ossl_ssl): define sysread_nonblock, instead of read_nonblock.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31 04:52:18 +00:00
matz
57f7d8c2cd
* ext/openssl/ossl_ssl.c (ossl_ssl_read_nonblock):
...
OpenSSL::SSL::SSLSocket should implement read_nonblock. a patch
from Aaron Patterson in [ruby-core:20277]. fix : #814 [ruby-core:20241]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 07:21:10 +00:00
matz
edebd815b0
* ext/curses/curses.c: should include <ruby/io.h>.
...
* ext/io/wait/wait.c: ditto.
* ext/openssl/ossl.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-26 03:05:47 +00:00
mame
f0c8c9d832
* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_to_string): comment out
...
fragments of unused code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18 13:56:51 +00:00
ko1
204929af9d
* include/ruby/signal.h: removed.
...
* common.mk, class.c, eval.c, eval_intern.h, file.c, gc.c, hash.c,
io.c, process.c, signal.c: vm_core.h: ditto.
Some unused external global variables are also removed.
(rb_prohibit_interrupt, rb_trap_immediate, rb_trap_pending,
rb_thread_critical)
* ext/openssl/ossl_ssl.c, ext/openssl/ossl_x509store.c,
ext/readline/readline.c, ext/socket/depend,
ext/socket/socket.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03 08:00:05 +00:00
nobu
1105b5ded7
* ext/openssl/ossl_ocsp.c (ossl_ocspres_initialize): fix for
...
initialization of r18168.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 04:45:44 +00:00
nobu
422d6b3d67
* ext/openssl/ossl_config.c (Init_ossl_config): removed C99ism.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 03:36:09 +00:00
matz
6ada14922f
* ext/openssl/ossl_config.c (Init_ossl_config): memory leak fixed.
...
a patch <shinichiro.hamaji at gmail.com> in [ruby-dev:35880].
* ext/openssl/ossl_x509ext.c (ossl_x509ext_set_value): ditto.
* ext/strscan/strscan.c (strscan_do_scan): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30 06:54:25 +00:00
nobu
34e157478b
* ext/openssl/ossl_x509ext.c (ossl_x509ext_initialize): fix for
...
initialization of r18168.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-30 05:58:38 +00:00