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

60289 Коммитов

Автор SHA1 Сообщение Дата
Kazuki Yamaguchi 8f91dc712a [ruby/openssl] test/openssl/test_ssl: skip test_fallback_scsv if necessary
Run the test case only when the OpenSSL supports both TLS 1.1 and TLS
1.2. Note that the fallback SCSV mechanism is for TLS 1.2 or older and
not for 1.3.

Fixes: https://github.com/ruby/openssl/issues/336

https://github.com/ruby/openssl/commit/6f2e6d7cf7
2020-02-17 20:51:27 +09:00
Kazuki Yamaguchi 99b191d83f [ruby/openssl] ts: simplify OpenSSL::Timestamp::Request#algorithm
Stop the special treatment of invalid hashAlgorithm of the message
imprint. Those invalid values can only appear after the object is
instantiated, before the user sets an actual message digest algorithm.

OpenSSL::Timestamp::TokenInfo#algorithm already does the same.

Also, remove the test case "test_create_request" since it does not make
much sense. Those fields are to be set by the user after creation of
the object and checking the initial value is pointless.

Fixes: https://github.com/ruby/openssl/issues/335

https://github.com/ruby/openssl/commit/890a6476fa
2020-02-17 20:50:47 +09:00
Yusuke Endoh 3fbcdac3e4 test/openssl/test_ssl.rb: skip OpenSSL::TestSSL#test_fallback_scsv
on OpenSSL 1.1.1d or later.

https://github.com/ruby/openssl/issues/336
2020-02-17 13:20:51 +09:00
Nobuyoshi Nakada dec802d8b5 [ruby/io-console] [DOC] Improved about `intr:`
https://github.com/ruby/io-console/commit/82b630cd79
2020-02-17 12:05:09 +09:00
git 21ab483614 * 2020-02-17 [ci skip] 2020-02-17 05:06:59 +09:00
Marcus Stollsteimer a9e10d3b8e NEWS.md: add missing ticket links 2020-02-16 21:00:49 +01:00
Marcus Stollsteimer 6ca0a62d21 NEWS.md: improve language; markup as list item 2020-02-16 21:00:41 +01:00
Marcus Stollsteimer 1126f58c62 NEWS.md: remove leading whitespace 2020-02-16 21:00:34 +01:00
Marcus Stollsteimer 3281f70d7c NEWS.md: fix method references; remove surplus brackets 2020-02-16 21:00:27 +01:00
Yusuke Endoh 331755c5e9 Revert "test/openssl/test_ts.rb: tentatively skip a failing test on CentOS 6.9"
This reverts commit a6d007c70b.

Unfortunately, the test fails on armv7l
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20200216T091708Z.fail.html.gz
2020-02-16 22:16:22 +09:00
Yusuke Endoh a6d007c70b test/openssl/test_ts.rb: tentatively skip a failing test on CentOS 6.9
CentOS 6.9 will be EOL at Nov.  Ruby 3.0 (or 2.8) release version will
not support CentOS 6.9, so I'll remove the environment after it become
green.
2020-02-16 21:20:09 +09:00
Yusuke Endoh e37e0bfa98 test/openssl/test_ssl.rb: skip a test on OpenSSL 1.1.d or later
It fails due to "error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee
key too small".  This is a tentative measurement to avoid the failure.

https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20200216T093010Z.fail.html.gz

test/openssl/fixture/chain/server.key should be longer.
It should be documented how to create the files.
BTW, it would be a good idea to dynamically create a key during test
instead of fixed files.
2020-02-16 20:48:40 +09:00
Yusuke Endoh 01138f5853 Make OpenSSL::OSSL#test_memcmp_timing robust
The test was too fragile.  Actually, it fails on one of our CIs
immediately after it was merged to ruby/ruby.

https://gist.github.com/ko1/7ea4a5826641f79e2f9e041d83e45dba#file-brlog-trunk_clang_40-20200216-101730-L532-L535
https://gist.github.com/ko1/1c657746092b871359d8bf9e0ad28921#file-brlog-trunk-test4-20200216-104518-L473-L476

* Two measurements, a-b and a-c, must be interative instead of
  sequential; the execution time will be easily affected by disturbance
  (say, cron job or some external process invoked during measurement)

* The comparison of the two results must be relative instead of
  absolute; slow machine may take several tens of seconds for each
  execution, and one delta second is too small.  The test cases of a, b,
  and c are very extreme, so if the target method has a bug, the two
  execution times would be very different.  So I think it is enough to
  check if the difference is less than 10 times.

This change is the same as https://github.com/ruby/openssl/pull/332
2020-02-16 19:55:19 +09:00
Yusuke Endoh 0b55f8a14f ext/openssl/extconf.rb: avoid -Werror=deprecated-declarations
It fails to build on Solaris:

https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11-gcc/ruby-master/log/20200216T090008Z.log.html.gz
```
ossl_cipher.c: 関数 ‘ossl_cipher_init’ 内:
ossl_cipher.c:228:2: エラー: ‘EVP_md5’ is deprecated [-Werror=deprecated-declarations]
  228 |  EVP_BytesToKey(EVP_CIPHER_CTX_cipher(ctx), EVP_md5(), iv,
      |  ^~~~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:73,
                 from /usr/include/openssl/x509v3.h:63,
                 from ossl.h:23,
                 from ossl_cipher.c:10:
/usr/include/openssl/evp.h:732:26: 備考: ここで宣言されています
  732 | DEPRECATED const EVP_MD *EVP_md5(void);
      |                          ^~~~~~~
```
2020-02-16 19:14:23 +09:00
Hiroshi SHIBATA 3014574800
Guard for OpenSSL::PKey::EC::Group::Error with unsupported platforms 2020-02-16 16:08:43 +09:00
Hiroshi SHIBATA b99775b163
Import openssl-2.2.0 (#2693)
Import the master branch of ruby/openssl for preparing to release openssl-2.2.0
2020-02-16 15:21:29 +09:00
Nobuyoshi Nakada 0bfa479c52
Split the optimizable range item conditions 2020-02-16 13:47:18 +09:00
git 07179c5c0f * 2020-02-16 [ci skip] 2020-02-16 02:37:34 +09:00
Masataka Pocke Kuwabara 5278294230 Reduce begin-less/end-less range allocation
```
$ cat test.yaml
prelude: |
    def endless
      1..
    end

    def beginless
      ..1
    end

    def endless_substr(str)
      str[1..]
    end

benchmark:
    endless: endless
    beginless: beginless
    endless_substr: "endless_substr('foo')"

$ RBENV_VERSION=trunk ruby -v
ruby 2.8.0dev (2020-02-15T12:52:03Z master 961630126b) [x86_64-linux]
$ RBENV_VERSION=patched ruby -v
ruby 2.8.0dev (2020-02-15T12:52:03Z origin/master 961630126b) [x86_64-linux]

$ benchmark-driver test.yaml --rbenv 'patched;trunk'
Warming up --------------------------------------
             endless    45.948M i/s -     46.076M times in 1.002782s (21.76ns/i, 26clocks/i)
           beginless    49.986M i/s -     50.237M times in 1.005037s (20.01ns/i, 24clocks/i)
      endless_substr     8.067M i/s -      8.187M times in 1.014936s (123.96ns/i, 148clocks/i)
Calculating -------------------------------------
                        patched       trunk
             endless   115.679M     21.500M i/s -    137.843M times in 1.191597s 6.411398s
           beginless   112.599M     22.060M i/s -    149.957M times in 1.331778s 6.797768s
      endless_substr     8.888M      6.760M i/s -     24.201M times in 2.722995s 3.580038s

Comparison:
                          endless
             patched: 115679391.9 i/s
               trunk:  21499711.2 i/s - 5.38x  slower

                        beginless
             patched: 112598731.5 i/s
               trunk:  22059673.0 i/s - 5.10x  slower

                   endless_substr
             patched:   8887513.1 i/s
               trunk:   6759886.2 i/s - 1.31x  slower
```
2020-02-16 02:37:12 +09:00
Nobuhiro IMAI 961630126b [ruby/irb] fix reserved words and completion for them
https://github.com/ruby/irb/commit/6184b227ad
2020-02-15 21:52:03 +09:00
Nick Lewis 38f1e84c37 [ruby/irb] Include easter-egg.rb in gemspec
`irb` doesn't run because this file isn't included in the gem.
https://github.com/ruby/irb/commit/73cda56d25
2020-02-15 21:52:03 +09:00
aycabta 8749a678ab [ruby/irb] Version 1.2.2
https://github.com/ruby/irb/commit/a71753f15a
2020-02-15 21:52:03 +09:00
aycabta 12ae7b3369 [ruby/reline] Version 0.1.3
https://github.com/ruby/reline/commit/ea2b182466
2020-02-15 21:52:03 +09:00
Hiroshi SHIBATA 05485868cb Workaround for bison provided by scoop on mswin environment 2020-02-15 21:20:25 +09:00
Nobuyoshi Nakada 125bcdb5cb
[DOC] use local variable like names [ci skip]
Use local variable like name as return value which is an instance
of that class but not constant itself.
2020-02-15 17:32:58 +09:00
Yusuke Endoh fb472ca7ad lib/drb/drb.rb: Use ruby2_keywords for keyword separation
[Bug #16634]
2020-02-15 16:27:03 +09:00
git 2bcfdad006 * 2020-02-15 [ci skip] 2020-02-15 12:14:33 +09:00
Kazuhiro NISHIYAMA 79ad50d219
Fix call-seq of Pathname#{,l}ch{mod,own} [ci skip] 2020-02-15 12:14:12 +09:00
aycabta 2efb38e766 [ruby/reline] Use IO#write instead of IO#print
IO#print always adds a string of $\ automatically.

https://github.com/ruby/reline/commit/a93119c847
2020-02-14 22:47:27 +09:00
Nobuyoshi Nakada 78282d4655
[ruby/io-console] Prefer keyword arguments
https://github.com/ruby/io-console/commit/5facbfc4c8
2020-02-14 20:30:34 +09:00
Hiroshi SHIBATA 1df2c8cefb
Revert "MinGW - rename OpenSSL dll's in system32 directory"
This reverts commit 95c58d33cc.
2020-02-14 19:57:07 +09:00
MSP-Greg 95c58d33cc MinGW - rename OpenSSL dll's in system32 directory 2020-02-14 19:39:30 +09:00
Nobuyoshi Nakada 9bc815aa5f
Hoisted out `rb_scan_args_result` 2020-02-14 15:56:37 +09:00
Nobuyoshi Nakada 0742585e7e
Consitified `rb_scan_args_set` 2020-02-14 15:56:37 +09:00
Kazuhiro NISHIYAMA 36b7e95744
Fix typos and add a space [ci skip] 2020-02-14 14:26:19 +09:00
Burdette Lamar b9129dac21
Enhanced doc for ENV
* More on ENV examples
2020-02-14 14:18:48 +09:00
git c0ebf64ae7 * 2020-02-14 [ci skip] 2020-02-14 00:08:12 +09:00
Yusuke Endoh fad98c6c61 test/irb/test_completion.rb: suppress a warning: unused literal ignored 2020-02-14 00:07:28 +09:00
Yusuke Endoh 6bfc576271 spec/ruby/library/socket/constants/constants_spec.rb: skip on Android
IP_MAX_MEMBERSHIPS seems not to be defined on Android
2020-02-13 23:16:10 +09:00
Yusuke Endoh bbc6799334 spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb: skip on Android
FreeBSD's GETNAMEINFO(3) says:

> If a link-layer address or UNIX-domain address is passed to
> getnameinfo(), its ASCII representation will be stored in host.  The
> string pointed to by serv will be set to the empty string if non-NULL;
> flags will always be ignored.

Android seems to behave like FreeBSD.
2020-02-13 23:13:17 +09:00
Yusuke Endoh 09a042ae04 spec/ruby/library/etc/: skip the specs related to group on Android
User/group system on Android seems different from normal Linux.
2020-02-13 23:11:28 +09:00
Yusuke Endoh db8c8c0916 spec/ruby/library/socket/addrinfo: skip the specs that uses SOCK_SEQPACKET on Android
SOCK_SEQPACKET seems not to be supported on Android
2020-02-13 23:10:03 +09:00
Yusuke Endoh 89bfad17d5 spec/ruby/library/syslog: skip the specs that use LOG_PERROR on Android
LOG_PERROR is defined on Android, but not implemented yet.
See also f3c4e620ac.
2020-02-13 23:08:31 +09:00
Yusuke Endoh c6ebbbd38b spec/ruby: skip the specs that use /etc/passwd on Android
There is no /etc/passwd on Android
2020-02-13 23:06:33 +09:00
Yusuke Endoh ca53ab581b spec/ruby/library/etc/confstr_spec.rb: skip on Android
There seems to be no _CS_PATH on Android.
2020-02-13 23:04:15 +09:00
Yusuke Endoh 02233e171c spec/ruby/core/process/spawn_spec.rb: Use / instead of /tmp
because there is no /tmp on Android.
2020-02-13 23:03:07 +09:00
Yusuke Endoh ed549f80b6 spec/ruby/core/process/clock_getres_spec.rb: skip on Android
in the same way as FreeBSD and OpenBSD.
I guess that the spec makes too strong assumption.
2020-02-13 23:00:30 +09:00
Yusuke Endoh 022268ae00 spec/ruby/core/encoding/locale_charmap_spec.rb: locale_charmap is UTF-8 on Android
nl_langinfo(CODESET) always returns UTF-8 on Android, regardless to
LC_ALL=C.
2020-02-13 23:00:03 +09:00
Yusuke Endoh a11fa7d8cd spec/ruby/core/dir/home_spec.rb: exclude Android
I couldn't find a robust way to get the home path except ENV["HOME"] on
Android Termux.
2020-02-13 22:56:42 +09:00
Hiroshi SHIBATA 4a2b99795a
Move the English entries to the default gems at docs 2020-02-13 20:36:44 +09:00