Граф коммитов

8182 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA 847eeafd65 [ruby/etc] Bump up etc version to 1.3.0
https://github.com/ruby/etc/commit/85ca541d0b
2021-10-19 20:55:33 +09:00
Hiroshi SHIBATA b482a516d2 [ruby/zlib] Bump up zlib version to 2.1.1
https://github.com/ruby/zlib/commit/82e9a636a6
2021-10-19 20:28:57 +09:00
Nobuyoshi Nakada ae25313e80
[ruby/etc] Remove unnecessary declaration
Fix https://github.com/ruby/etc/pull/12

https://github.com/ruby/etc/commit/7cbf03d22d
2021-10-19 17:25:40 +09:00
Kazuki Yamaguchi cc8ff8b50d [ruby/openssl] require Ruby 2.6 or later
Drop support for Ruby 2.3, 2.4, and 2.5.

As of 2021-10, Ruby 2.6 is the oldest version that still receives
security fixes from the Ruby core team, so it doesn't make much sense
to keep code for those ancient versions.

https://github.com/ruby/openssl/commit/3436bd040d
2021-10-16 19:39:13 +09:00
Kazuki Yamaguchi 4991dabdd0 [ruby/openssl] bump version number to 3.0.0.pre
https://github.com/ruby/openssl/commit/baa83a8a57
2021-10-16 18:57:57 +09:00
Kazuki Yamaguchi cea3c55d58 [ruby/openssl] Ruby/OpenSSL 2.2.1
https://github.com/ruby/openssl/commit/65e7207a07
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi 75e72baba1 [ruby/openssl] Ruby/OpenSSL 2.1.3
https://github.com/ruby/openssl/commit/e8ee01b22c
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi c1147f7f71 [ruby/openssl] ssl: avoid directly storing String object in NPN callback
On the server side, the serialized list of protocols is stored in
SSL_CTX as a String object reference. We utilize a hidden instance
variable to prevent it from being GC'ed, but this is not enough because
it can also be relocated by GC.compact.

https://github.com/ruby/openssl/commit/5eb68ba778
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi f6612203fa [ruby/openssl] x509store: explicitly call rb_gc_mark() against Store/StoreContext
We store the reverse reference to the Ruby object in the OpenSSL
struct for use from OpenSSL callback functions. To prevent the Ruby
object from being relocated by GC.compact, we must "pin" it by calling
rb_gc_mark().

https://github.com/ruby/openssl/commit/a6ba9f894f
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi ca28545b51 [ruby/openssl] ssl: explicitly call rb_gc_mark() against SSLContext/SSLSocket objects
We store the reverse reference to the Ruby object in the OpenSSL
struct for use from OpenSSL callback functions. To prevent the Ruby
object from being relocated by GC.compact, we must "pin" it by calling
rb_gc_mark().

https://github.com/ruby/openssl/commit/022b7ceada
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi c6c2190c4c [ruby/openssl] digest: load digest library using Kernel#require
The digest library is a default gem now, too. Therefore we can't simply
use rb_require() to load it, but we should use Kernel#require instead.

This change is based on the suggestion by David Rodríguez in
16172612d5 (commitcomment-57778397)

https://github.com/ruby/openssl/commit/157f80794b
2021-10-16 18:34:35 +09:00
Nobuhiro IMAI f88401f38e [ruby/openssl] fix segv in Timestamp::{Request,Response,TokenInfo}.new
prevent `ossl_ts_*_free()` from calling when `d2i_TS_*_bio()` failed.

https://github.com/ruby/openssl/commit/b29e215786
2021-10-16 18:34:35 +09:00
David Carlier 6dcc74155f [ruby/openssl] ts: libressl build fix warning
TS_time_cb on libressl expects an long long/time_t 64 bits long instead.

https://github.com/ruby/openssl/commit/4c99f577b2
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi daeb914a52 [ruby/openssl] ssl: temporary lock string buffer while reading
Similarly to SSLSocket#syswrite, the blocking SSLSocket#sysread allows
context switches. We must prevent other threads from modifying the
string buffer.

We can use rb_str_locktmp() and rb_str_unlocktmp() to temporarily
prohibit modification of the string.

https://github.com/ruby/openssl/commit/d38274949f
2021-10-16 18:34:35 +09:00
Kazuki Yamaguchi 5828807626 [ruby/openssl] ssl: create a temporary frozen string buffer when writing
Since a blocking SSLSocket#syswrite call allows context switches while
waiting for the underlying socket to be ready, we must freeze the string
buffer to prevent other threads from modifying it.

Reference: https://github.com/ruby/openssl/issues/452

https://github.com/ruby/openssl/commit/aea874bc6e
2021-10-16 18:25:28 +09:00
Kazuki Yamaguchi 6105ef7629 [ruby/openssl] ssl: add SSLContext#tmp_dh=
Provide a wrapper of SSL_set0_tmp_dh_pkey()/SSL_CTX_set_tmp_dh(), which
sets the DH parameters used for ephemeral DH key exchange.

SSLContext#tmp_dh_callback= already exists for this purpose, as a
wrapper around SSL_CTX_set_tmp_dh_callback(), but it is considered
obsolete and the OpenSSL API is deprecated for future removal. There is
no practical use case where an application needs to use different DH
parameters nowadays. This was originally introduced to support export
grade ciphers.

RDoc for #tmp_dh_callback= is updated to recommend the new #tmp_dh=.

Note that current versions of OpenSSL support automatic ECDHE curve
selection which is enabled by default. SSLContext#tmp_dh= should only be
necessary if you must allow ancient clients which don't support ECDHE.

https://github.com/ruby/openssl/commit/aa43da4f04
2021-10-16 18:19:52 +09:00
Kazuki Yamaguchi 49217086ad [ruby/openssl] ssl: remove private method SSLSocket#tmp_ecdh_callback
Commit ee037e146037 ("ssl: remove SSL::SSLContext#tmp_ecdh_callback",
2020-08-12) forgot to remove the method.

https://github.com/ruby/openssl/commit/bef9ea84e4
2021-10-16 18:19:51 +09:00
Sutou Kouhei 027a3379d6 [ruby/zlib] Fix a bug that GZipReader#gets may return incomplete line
See also: https://github.com/ruby/csv/issues/117#issuecomment-933289373

How to reproduce with x.csv.gz in the issue comment:

    Zlib::GzipReader.open("x.csv.gz") do |rio|
      rio.gets(nil, 1024)
      while line = rio.gets(nil, 8192)
        raise line unless line.valid_encoding?
      end
    end

Reported by Dimitrij Denissenko. Thanks!!!

https://github.com/ruby/zlib/commit/b1f182e98f
2021-10-15 15:31:15 +09:00
Nobuyoshi Nakada e057b9eea9
Prefer the reentrant versions of gmtime and localtime 2021-10-14 23:44:15 +09:00
Hiroshi SHIBATA 2fa0d51ac9 [ruby/date] Bump up date version to 3.2.0
https://github.com/ruby/date/commit/e0a4cbc8f6
2021-10-14 21:15:57 +09:00
Hiroshi SHIBATA b7f557178d [ruby/pathname] Bump up pathname version to 0.2.0
https://github.com/ruby/pathname/commit/e6b3b3ed25
2021-10-14 21:08:03 +09:00
Hiroshi SHIBATA f88628014a [ruby/nkf] Bump up nkf version to 0.1.1
https://github.com/ruby/nkf/commit/9aa7c6b841
2021-10-14 20:29:27 +09:00
Nobuyoshi Nakada d210950196
[ruby/etc] Get rid of alloca in the loop
https://github.com/ruby/etc/commit/c989bacc4c
2021-10-14 18:44:27 +09:00
Hiroshi SHIBATA 1220556f33
[ruby/fcntl] Bump up fcntl version to 1.0.1
https://github.com/ruby/fcntl/commit/0bcc0c4518
2021-10-14 17:18:21 +09:00
Hiroshi SHIBATA 91c2069dcf [flori/json] Bump up json version to 2.6.0
https://github.com/flori/json/commit/1942689b67
2021-10-14 17:04:37 +09:00
Hiroshi SHIBATA 6b13448040 [ruby/zlib] Bump up zlib version to 2.1.0
https://github.com/ruby/zlib/commit/dd593acaee
2021-10-14 16:18:41 +09:00
Hiroshi SHIBATA db500f05c2 [ruby/zlib] Bump version to v2.0.0
https://github.com/ruby/zlib/commit/434eba55ae
2021-10-14 16:18:36 +09:00
Hiroshi SHIBATA 9e86a60306
Removed redundant digest namespace 2021-10-14 14:07:50 +09:00
Hiroshi SHIBATA 3265af2f9e
separate pure ruby location under the digest/* extensions 2021-10-14 13:31:45 +09:00
Hiroshi SHIBATA 13772caee2
Move pure ruby files under the ext/gemname/lib directory. 2021-10-14 13:23:45 +09:00
Nobuyoshi Nakada 013bac15b0
Fix libraries under digest 2021-10-12 22:32:42 +09:00
Akinori MUSHA 01dc55ffad
[ruby/digest] Bump version to 3.1.0.pre2
https://github.com/ruby/digest/commit/5184207611
2021-10-12 20:53:18 +09:00
Akinori MUSHA ab787c493b
[ruby/digest] Bump version to 3.1.0.pre1
https://github.com/ruby/digest/commit/56679008cf
2021-10-12 20:53:18 +09:00
Pavel Rosický 10a0fac7e4
[ruby/digest] include jars
https://github.com/ruby/digest/commit/c15cbcd978
2021-10-12 20:53:17 +09:00
Akinori MUSHA e94bcda025
[ruby/digest] Bump version to 3.1.0.pre0
https://github.com/ruby/digest/commit/594cc4d548
2021-10-12 20:53:17 +09:00
Akinori MUSHA b245b67d9e
[ruby/digest] Place common parts in lib and engine specific parts under ext/**/lib
https://github.com/ruby/digest/commit/8d7496c3be
2021-10-12 20:53:16 +09:00
Pavel Rosický 5e1d2c5c97
[ruby/digest] relicence under the Ruby license and the BSD 2-clause
https://github.com/ruby/digest/commit/154d461e91
2021-10-12 20:46:16 +09:00
Pavel Rosický 94882df3a2
[ruby/digest] jruby support
https://github.com/ruby/digest/commit/2e9dc14693
2021-10-12 20:46:13 +09:00
Nobuyoshi Nakada ff1f696d30
[ruby/digest] Move digest.rb back under ext as the extension bundled library
https://github.com/ruby/digest/commit/026ba7f361
2021-10-12 20:44:14 +09:00
Kazuhiro NISHIYAMA 8dd6d58543 Add more socket constants
from http://manpages.ubuntu.com/manpages/focal/en/man2/socket.2.html
2021-10-12 16:45:22 +09:00
卜部昌平 5c167a9778 ruby tool/update-deps --fix 2021-10-05 14:18:23 +09:00
Rei Odaira ceeae31901 Avoid using the altzone variable in AIX
In AIX, altzone exists in the standard library but is not declared
in time.h.  By 524513be39, have_var
and try_var in mkmf recognizes a variable that exists in a library
even when it is not declared.  As a result, in AIX, HAVE_ALTZONE
is defined, but compile fails due to the lack of the declaration.
2021-10-02 21:23:34 -05:00
Jeremy Evans f9f7f3a75e [ruby/date] Make %v strftime flag use uppercase month
%v is supposed to be the VMS date, and VMS date format uses an
uppercase month.

Ruby 1.8 used an uppercase month for %v, but the behavior was
changed without explanation in r31672.

Time#strftime still uses an uppercase month for %v, so this change
makes Date#strftime consistent with Time#strftime.

Fixes [Bug #13810]

https://github.com/ruby/date/commit/56c489fd7e
2021-09-28 17:34:26 +09:00
Kazuhiro NISHIYAMA e0c6e8c64a
[DOC] Use `unpack1` instead of `unpack(template)[0]` [ci skip] 2021-09-23 09:20:00 +09:00
Nobuyoshi Nakada 289f3a79b5 [ruby/openssl] Add fallthrough comments
https://github.com/ruby/openssl/commit/258e30b640
2021-09-12 22:49:07 +09:00
Nobuyoshi Nakada 6920f3dc96 [ruby/openssl] Suppress cast-function-type warnings
https://github.com/ruby/openssl/commit/0f91e2a6ee
2021-09-12 22:49:05 +09:00
Nobuyoshi Nakada 598d66f6b2 [ruby/openssl] Separate formatting from ossl_make_error
Just append OpenSSL error reason to the given message string
object, which would be alreadly formatted.
Suppress -Wformat-security warning in `ossl_tsfac_create_ts`.

https://github.com/ruby/openssl/commit/11b1d8a6b8
2021-09-12 22:49:03 +09:00
Nobuyoshi Nakada c7dce12eb9 [ruby/openssl] Suppress printf format warnings
* Add `printf` format attribute to `ossl_raise`.
* Fix a format specifier in `config_load_bio`.
* Use `ASSUME` for the unreachable condition.

https://github.com/ruby/openssl/commit/41da2955db
2021-09-12 22:49:01 +09:00
Nobuyoshi Nakada 2bd6c5dc16 [ruby/date] Ignore warned variables
To suppress warnings at the compilation time.

https://github.com/ruby/date/commit/ff21132203
2021-09-09 13:56:13 +09:00
Hiroshi SHIBATA 8f752c95d2
[ruby/fiddle] Use test-unit gem (https://github.com/ruby/fiddle/pull/69)
https://github.com/ruby/fiddle/commit/e08c4c635e

Co-authored-by: Sutou Kouhei <kou@clear-code.com>
2021-09-05 17:43:48 +09:00