summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-18[ruby/openssl] pkey/dh: use high level EVP interface to generate parameters ↵Kazuki Yamaguchi
and keys Implement PKey::DH.new(size, gen), PKey::DH.generate(size, gen), and PKey::DH#generate_key! using PKey.generate_parameters and .generate_key instead of the low level DH functions. Note that the EVP interface can enforce additional restrictions - for example, DH key shorter than 2048 bits is no longer accepted by default in OpenSSL 3.0. The test code is updated accordingly. https://github.com/ruby/openssl/commit/c2e9b16f0b
2021-07-18[ruby/openssl] pkey: fix interrupt handling in OpenSSL::PKey.generate_keyKazuki Yamaguchi
rb_thread_call_without_gvl() can be interrupted, but it may be able to resume the operation. Call rb_thread_check_ints() to see if it raises an exception or not. https://github.com/ruby/openssl/commit/88b90fb856
2021-07-18[ruby/openssl] pkey: allow setting algorithm-specific options in #sign and ↵Kazuki Yamaguchi
#verify Similarly to OpenSSL::PKey.generate_key and .generate_parameters, let OpenSSL::PKey::PKey#sign and #verify take an optional parameter for specifying control strings for EVP_PKEY_CTX_ctrl_str(). https://github.com/ruby/openssl/commit/faf85d7c1d
2021-07-18[ruby/openssl] pkey: prepare pkey_ctx_apply_options() for usage by other ↵Kazuki Yamaguchi
operations The routine to apply Hash to EVP_PKEY_CTX_ctrl_str() is currently used by key generation, but it is useful for other operations too. Let's change it to a slightly more generic name. https://github.com/ruby/openssl/commit/b2b77527fd
2021-07-18[ruby/openssl] pkey: fix potential memory leak in PKey#signKazuki Yamaguchi
Fix potential leak of EVP_MD_CTX object in an error path. This path is normally unreachable, since the size of a signature generated by any supported algorithms would not be larger than LONG_MAX. https://github.com/ruby/openssl/commit/99e8630518
2021-07-18[ruby/openssl] ossl.c: do not set locking callbacks on LibreSSLKazuki Yamaguchi
Similarly to OpenSSL >= 1.1.0, LibreSSL 2.9.0 ensures thread safety without requiring applications to set locking callbacks and made related functions no-op. https://github.com/ruby/openssl/commit/7276233e1a
2021-07-18[ruby/openssl] ssl: use TLS_method() instead of SSLv23_method() for LibreSSLKazuki Yamaguchi
LibreSSL 2.2.2 introduced TLS_method(), but with different semantics from OpenSSL: TLS_method() enabled TLS >= 1.0 while SSLv23_method() enabled all available versions, which included SSL 3.0 in addition. However, LibreSSL 2.3.0 removed SSL 3.0 support completely and now TLS_method() and SSLv23_method() are equivalent. https://github.com/ruby/openssl/commit/3b7d7045b8
2021-07-18[ruby/openssl] ssl: call SSL_CTX_set_ecdh_auto() on OpenSSL 1.0.2 onlyKazuki Yamaguchi
SSL_CTX_set_ecdh_auto() exists in OpenSSL 1.1.0 and LibreSSL 2.6.1, but it is made no-op and the automatic curve selection cannot be disabled. Wrap it with ifdef to make it clear that it is safe to remove it completely when we drop support for OpenSSL 1.0.2. https://github.com/ruby/openssl/commit/2ae8f21234
2021-07-18[ruby/openssl] require OpenSSL >= 1.0.2 and LibreSSL >= 3.1Kazuki Yamaguchi
Clean up old version guards in preparation for the upcoming OpenSSL 3.0 support. OpenSSL 1.0.1 reached its EOL on 2016-12-31. At that time, we decided to keep 1.0.1 support because many major Linux distributions were still shipped with 1.0.1. Now, nearly 4 years later, most Linux distributions are reaching their EOL and it should be safe to assume nobody uses them anymore. Major ones that were using 1.0.1: - Ubuntu 14.04 is EOL since 2019-04-30 - RHEL 6 will reach EOL on 2020-11-30 LibreSSL 3.0 and older versions are no longer supported by the LibreSSL team as of October 2020. Note that OpenSSL 1.0.2 also reached EOL on 2019-12-31 and 1.1.0 also did on 2018-08-31. https://github.com/ruby/openssl/commit/c055938f4b
2021-07-18[ruby/openssl] bn: update documentation of OpenSSL::BN#initialize and #to_sKazuki Yamaguchi
Clarify that BN.new(str, 2) and bn.to_s(2) handles binary string in big-endian, and the sign of the bignum is ignored. Reference: https://github.com/ruby/openssl/issues/431 https://github.com/ruby/openssl/commit/6fae2bd612
2021-07-18[ruby/openssl] BN.abs and BN uplusRick Mark
Adds standard math abs fuction and revises uplus to return a duplicated object due to BN mutability https://github.com/ruby/openssl/commit/0321b1e945
2021-07-18* 2021-07-18 [ci skip]git
2021-07-18Use rb_block_call() instead of the deprecated rb_iterate()Nobuyoshi Nakada
2021-07-17cont.c: fix formatting of RDoc for Fiber classKazuki Yamaguchi
2021-07-17Disable spec of `pattern matching is experimental` since 3.1Kazuhiro NISHIYAMA
2021-07-17Fix a spec failureKazuhiro NISHIYAMA
``` 1) Warning.[]= :experimental emits and suppresses warnings for :experimental FAILED Expected "" =~ /is experimental/ to be truthy but was nil ```
2021-07-17Fix a spec failureKazuhiro NISHIYAMA
``` 1) The -W command line option with :no-experimental suppresses experimental warnings FAILED Expected "" =~ /is experimental/ to be truthy but was nil ```
2021-07-17* 2021-07-17 [ci skip]git
2021-07-17One-line pattern matching is no longer experimentalKazuki Tsujimoto
https://github.com/ruby/dev-meeting-log/blob/master/DevelopersMeeting20210715Japan.md#feature-17724-make-the-pin-operator-support-instanceclassglobal-variables-jeremyevans0
2021-07-16Emit deprecatation warnings for rb_iterate()Benoit Daloze
* It is obsolete since 1.9, see https://github.com/ruby/ruby/blob/master/doc/extension.rdoc#label-Control+Structure and [Misc #18025] Notes: Merged: https://github.com/ruby/ruby/pull/4629
2021-07-16Add Integer.try_convert [Feature #15211]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4654
2021-07-16io.c: Clarify the behavior of `IO.read` when called as `File.read`Yusuke Endoh
Ditto to `IO.binread`, `IO.write`, `IO.binwrite`, `IO.foreach`, and `IO.readlines`. Notes: Merged: https://github.com/ruby/ruby/pull/4579
2021-07-16[rubygems/rubygems] Add missing `require 'fileutils'` in `Gem::ConfigFile`Masafumi Koba
https://github.com/rubygems/rubygems/commit/c4004fadd9
2021-07-16[rubygems/rubygems] Fix `bundle plugin install --help` showing `bundle ↵David Rodríguez
install`'s help https://github.com/rubygems/rubygems/commit/b7b7d16aa8
2021-07-16[rubygems/rubygems] fix dangling empty hooksAndre Arko
it turns out that running `bundle plugin uninstall some-plugin` would remove that plugin from the list of hooks, but if the list of hooks for an event was now empty, we would serialize the empty array into yaml as an empty single bullet item. which would then get unserialized as a plugin with the name empty string. which we would then try to load and explode. 😬 https://github.com/rubygems/rubygems/commit/545ebba9a5
2021-07-16[rubygems/rubygems] test loading bad plugins with nil/empty namesAndre Arko
https://github.com/rubygems/rubygems/commit/e64b1f3497
2021-07-16[rubygems/rubygems] remove focusAndre Arko
https://github.com/rubygems/rubygems/commit/584a393812
2021-07-16[rubygems/rubygems] lock for development on macosAndre Arko
https://github.com/rubygems/rubygems/commit/60469e4cac
2021-07-16[rubygems/rubygems] Fix development gem unintentionally removed on an edge caseDavid Rodríguez
When a development dependency was duplicated inside the gemspec and Gemfile with the same requirements, we went from printing a warning to removing the gem altogether. This change makes it not print a warning, but don't remove the gem either. https://github.com/rubygems/rubygems/commit/8bb2488131
2021-07-16[rubygems/rubygems] Fix contradictory message about deletion of default gemJared Beck
[Fixes #4733] https://github.com/rubygems/rubygems/commit/fce7f3eb7d
2021-07-16[ruby/error_highlight] Fix leaked tempfilesNobuyoshi Nakada
https://github.com/ruby/error_highlight/commit/8b353a10a7
2021-07-16Add debug assertion in `rb_funcall*` that the current thread has the gvl.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4657
2021-07-16Adjust the release version of ruby2_keywordsHiroshi SHIBATA
2021-07-16Added code fence to the example in [Feature #17724] [ci skip]Nobuyoshi Nakada
2021-07-15Copy hash compare_by_identity setting in more casesJeremy Evans
This makes the compare_by_identity setting always copied for the following methods: * except * merge * reject * select * slice * transform_values Some of these methods did not copy the setting, or only copied the setting if the receiver was not empty. Fixes [Bug #17757] Co-authored-by: Kenichi Kamiya <kachick1@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/4616 Merged-By: jeremyevans <code@jeremyevans.net>
2021-07-15Add pattern matching pin support for instance/class/global variablesJeremy Evans
Pin matching for local variables and constants is already supported, and it is fairly simple to add support for these variable types. Note that pin matching for method calls is still not supported without wrapping in parentheses (pin expressions). I think that's for the best as method calls are far more complex (arguments/blocks). Implements [Feature #17724] Notes: Merged: https://github.com/ruby/ruby/pull/4502
2021-07-16[ruby/irb] Show code page by irb_info on Windowsaycabta
https://github.com/ruby/irb/commit/6160d74199
2021-07-16[ruby/irb] Escape space in free-spacing modeaycabta
https://github.com/ruby/irb/commit/085ac42947
2021-07-16* 2021-07-16 [ci skip]git
2021-07-15[Bug #18014] Add assertion to verify freelistPeter Zhu
This commit adds an assertion has been added after `gc_page_sweep` to verify that the freelist length is equal to the number of free slots in the page. Notes: Merged: https://github.com/ruby/ruby/pull/4613
2021-07-15[Bug #18014] Fix memory leak in GC when using RactorsPeter Zhu
When a Ractor is removed, the freelist in the Ractor cache is not returned to the GC, leaving the freelist permanently lost. This commit recycles the freelist when the Ractor is destroyed, preventing a memory leak from occurring. Notes: Merged: https://github.com/ruby/ruby/pull/4613
2021-07-15[Bug #18014] Fix rb_gc_force_recycle unmark before sweepPeter Zhu
If we force recycle an object before the page is swept, we should clear it in the mark bitmap. If we don't clear it in the bitmap, then during sweeping we won't account for this free slot so the `free_slots` count of the page will be incorrect. Notes: Merged: https://github.com/ruby/ruby/pull/4613
2021-07-15Make Struct#keyword_init? return nil by default [Feature #18008]Nobuyoshi Nakada
2021-07-15Regularize keyword_init values not to hold the argument objectNobuyoshi Nakada
2021-07-15Add tests and NEWS [Feature #18008]NARUSE, Yui
2021-07-15struct.c: Add keyword_init? singleton method for StructClass (#4609)hkdnet
Fixes [Feature #18008] Notes: Merged-By: nurse <naruse@airemix.jp>
2021-07-15rb_interned_id_p: does not exist卜部昌平
This declaration was added at commit 0ee5a49dd4ffbbb285c25fa6cba88370ce9 without its implementation. Must be a mistake. Note also that we ended up having this exct same functionality implemented under a name of rb_check_id().
2021-07-15rb_enc_casefold: does not exist卜部昌平
This declaration was added at commit 0ee5a49dd4ffbbb285c25fa6cba88370ce9 without its implementation. Must be a mistake.
2021-07-15process.c: Call rb_thread_atfork in rb_fork_rubyYusuke Endoh
All occurrences of rb_fork_ruby are followed by a call rb_thread_fork in the created child process. This is refactoring and a potential preparation for [Feature #17795]. (rb_fork_ruby may be wrapped by Process._fork_.)
2021-07-15Fix typo in flag in NEWS.mdPatrik Ragnarsson
Notes: Merged: https://github.com/ruby/ruby/pull/4653