Forwarding argument is optimized not to packed when no other arguments
and an internal object refers values before it. This size is decided
at called time, calculate the local variable index from the fixed end
point.
Call ossl_pkey_check_public_key() to ensure that
EVP_PKEY_missing_parameters() passes. This check should be cheap.
DSA#{to_der,to_pem,export,to_s} and PKey#{public_to_der,public_to_pem}
cause a segfault if the receiver is an empty DSA instance with no
parameters set.
Fixes <https://github.com/ruby/openssl/issues/845>.
5aeed935e5
The benchmark library is planned to become a bundled gem in Ruby 3.5.
While we can add it in our Gemfile, it is only used in
test_memcmp_timing and the usage can be easily replaced with a few
Process.clock_gettime calls.
9a746ed1a4
The returned Hash from these methods contain 0 in place of a missing
parameter in the key, for example:
pkey = OpenSSL::PKey.read(OpenSSL::PKey::RSA.new(2048).public_to_pem)
pp pkey.params
#=>
# {"n"=>#<OpenSSL::BN 2869346734[...snip]>,
# "e"=>#<OpenSSL::BN 65537>,
# "d"=>#<OpenSSL::BN 0>,
# "p"=>#<OpenSSL::BN 0>,
# "q"=>#<OpenSSL::BN 0>,
# "dmp1"=>#<OpenSSL::BN 0>,
# "dmq1"=>#<OpenSSL::BN 0>,
# "iqmp"=>#<OpenSSL::BN 0>}
Let's use nil instead, which is more appropriate for indicating a
missing value.
f247ec3dec
Commit 3bbf5178a9 made blocking methods on SSLSocket follow the
IO#timeout= value. The commit changed io_wait_readable() to potentially
raise an exception without unlocking the String.
The String is currently locked for the entire duration of a #sysread
method call. This does not seem to be necessary, as SSL_read() does not
require that the same buffer is specified when retrying. Locking the
String during each SSL_read() call should be sufficient.
8f791d73f5
launch
(https://github.com/ruby/irb/pull/1040)
* Quickly show inspect preview even if pretty_print takes too much time
* Show a message "Inspecting..." while generating pretty_print content
* Update inspecting message
Co-authored-by: Stan Lo <stan001212@gmail.com>
* Update rendering test for preparing inspect message
* Don't show preview if pretty_print does not take time
---------
03c36586e6
Co-authored-by: Stan Lo <stan001212@gmail.com>
The list of errors cited in 58bc97628c
is not exhaustive and other errors may be raised by `getgrnam`.
Additionally, these errors are system dependent and may not be listed
on all platforms.
Drop support for OpenSSL 1.1.0. OpenSSL 1.1.0 was a non-LTS release and
it has reached upstream EOL in 2019-12 along with OpenSSL 1.0.2.
Distributions that shipped with OpenSSL 1.1.0 include:
- Debian 9 (EOL 2022-06)
- Ubuntu 18.04 LTS (EOL 2023-04)
ba83abe920
Drop support for OpenSSL 1.0.2. It has reached upstream EOL in 2019-12.
Most distributions that shipped with OpenSSL 1.0.2 have also reached
EOL, or provide a newer version in the package repository:
- RHEL 7 (EOL 2024-06)
- Ubuntu 16.04 LTS (EOL 2021-04)
- Amazon Linux 2 (EOL 2026-06, but OpenSSL 1.1.1 can be installed via
the openssl11{,-devel} package)
38ec6fd50e
And get rid of the Ragel parser.
This is 7% faster on activitypub, 15% after on twitter and 11% faster
on citm_catalog.
There might be some more optimization opportunities, I did a quick
optimization pass to fix a regression in string parsing, but other
than that I haven't dug much in performance.
Due to the x64 emulation of Windows 11 on ARM the environment variable PROCESSOR_ARCHITECTURE is set by the process startup code.
It must therefore be excluded from tests.
Otherwise tests fail like so:
```
[30585/32394] TestProcess#test_execopts_unsetenv_others = 0.10 s
16) Failure:
TestProcess#test_execopts_unsetenv_others [C:/Users/Lars/ruby/test/ruby/test_process.rb:446]:
<""> expected but was
<"PROCESSOR_ARCHITECTURE=ARM64\n">.
[30616/32394] TestProcess#test_execopts_env = 0.16 s
17) Failure:
TestProcess#test_execopts_env [C:/Users/Lars/ruby/test/ruby/test_process.rb:326]:
<"PATH\n"> expected but was
<"PATH\n" + "PROCESSOR_ARCHITECTURE\n">.
```