Commit graph

20692 commits

Author SHA1 Message Date
Nobuyoshi Nakada
cdf36d6bfd [ruby/optparse] Allow non-string enum list #79
Command line arguments are strings, convert enum list elements to
strings to match.

c5ec052efc
2025-03-09 14:32:17 +00:00
Nobuyoshi Nakada
213c27825a [ruby/optparse] Add test for enum arguments
0a0e977b7c
2025-03-09 14:32:17 +00:00
ydah
eae0fe37c0 Implement CLASS NODE locations
The following Location information has been added This is the information required for parse.y to be a universal parser:

```
❯ ruby --parser=prism --dump=parsetree -e "class A < B; end"
@ ProgramNode (location: (1,0)-(1,16))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,16))
    +-- body: (length: 1)
        +-- @ ClassNode (location: (1,0)-(1,16))
            +-- locals: []
            +-- class_keyword_loc: (1,0)-(1,5) = "class"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            +-- constant_path:
            |   @ ConstantReadNode (location: (1,6)-(1,7))
            |   +-- name: :A
            +-- inheritance_operator_loc: (1,8)-(1,9) = "<"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            +-- superclass:
            |   @ ConstantReadNode (location: (1,10)-(1,11))
            |   +-- name: :B
            +-- body: nil
            +-- end_keyword_loc: (1,13)-(1,16) = "end"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            +-- name: :A
```
2025-03-08 18:26:40 +09:00
Nobuyoshi Nakada
cbe3156f82
[Bug #21174] [Bug #21175] Fix Range#max on beginless integer range 2025-03-07 17:23:33 +09:00
Nobuyoshi Nakada
8841f885bd
[Bug #21163] Fix hexadecimal float conversion 2025-03-07 12:14:48 +09:00
Rahim Packir Saibo
e20f1f76f4 [ruby/json] Fix JSON::GeneratorError#detailed_message with Ruby < 3.2
2e015ff839
2025-03-06 18:29:27 +09:00
Jean Boussier
ca4325f6c9 Harden TestObjSpace#test_memsize_of_root_shared_string
This test occasionally fail because it runs into a String instance
that had its `==` method removed.

I couldn't identify where this String comes from, but in general
when using `each_object` it's best to not assume returned objectd
are functional.

By just inverting the operands of `==` we ensure it's always
`String#==` that is called.

```
  1) Error:
TestObjSpace#test_memsize_of_root_shared_string:
NoMethodError: undefined method '==' for #<String:0x00007f9b50e8c978>
    /tmp/ruby/src/trunk-random1/test/objspace/test_objspace.rb:35:in 'block in TestObjSpace#test_memsize_of_root_shared_string'
    /tmp/ruby/src/trunk-random1/test/objspace/test_objspace.rb:35:in 'ObjectSpace.each_object'
    /tmp/ruby/src/trunk-random1/test/objspace/test_objspace.rb:35:in 'TestObjSpace#test_memsize_of_root_shared_string'
```
2025-03-06 08:42:01 +01:00
Naoto Ono
309076ff91
Fix flaky failure in TestSetTraceFunc#test_tracepoint_disable (#12854)
TestSetTraceFunc#test_tracepoint_disable is a flaky and failing intermittently. Here is an example of failure logs.

```
   1) Failure:
  TestSetTraceFunc#test_tracepoint_disable [/home/runner/work/ruby/ruby/src/test/ruby/test_settracefunc.rb:857]:
  <[:foo, :disable, :foo, :disable]> expected but was
  <[:call, :call, :foo, :disable, :foo, :disable]>.
```
3806620854 (step):12:875

I printed values of TracePoint objects as follows, and checked the values when failing intermittently.

7f9a6fc582/test/ruby/test_settracefunc.rb (L848)

Here is the log when the TestSetTraceFunc#test_tracepoint_disable failed intermittently.

`2025-03-05T09:08:37.4075411Z e: call, f: /home/runner/work/ruby/ruby/src/lib/tempfile.rb, l: 386, i: call, d: Tempfile::FinalizerManager` is an unexpected events. Thus, I modified test code so that we can filter out unexpected trace events.

```
2025-03-05T09:08:37.4075411Z e: call, f: /home/runner/work/ruby/ruby/src/lib/tempfile.rb, l: 386, i: call, d: Tempfile::FinalizerManager
2025-03-05T09:08:37.4085009Z e: call, f: /home/runner/work/ruby/ruby/src/test/ruby/test_settracefunc.rb, l: 808, i: foo, d: TestSetTraceFunc
2025-03-05T09:08:37.4086042Z e: call, f: <internal:trace_point>, l: 295, i: disable, d: TracePoint
2025-03-05T09:08:37.4115693Z e: call, f: /home/runner/work/ruby/ruby/src/test/ruby/test_settracefunc.rb, l: 808, i: foo, d: TestSetTraceFunc
2025-03-05T09:08:37.4116734Z e: call, f: <internal:trace_point>, l: 295, i: disable, d: TracePoint
```
2025-03-06 12:18:54 +09:00
John Hawthorn
443e2ec27d Replace tombstone when converting AR to ST hash
[Bug #21170]

st_table reserves -1 as a special hash value to indicate that an entry
has been deleted. So that that's a valid value to be returned from the
hash function, do_hash replaces -1 with 0 so that it is not mistaken for
the sentinel.

Previously, when upgrading an AR table to an ST table,
rb_st_add_direct_with_hash was used which did not perform the same
conversion, this could lead to a hash in a broken state where one if its
entries which was supposed to exist being marked as a tombstone.

The hash could then become further corrupted when the ST table required
resizing as the falsely tombstoned entry would be skipped but it would
be counted in num entries, leading to an uninitialized entry at index
15.

In most cases this will be really rare, unless using a very poorly
implemented custom hash function.

This also adds two debug assertions, one that st_add_direct_with_hash
does not receive the reserved hash value, and a second in
rebuild_table_with, which ensures that after we rebuild/compact a table
it contains the expected number of elements.

Co-authored-by: Alan Wu <alanwu@ruby-lang.org>
2025-03-05 14:05:24 -08:00
ydah
36ee0c1acb Add tests for alias locations with special variables $`, $', and $+ 2025-03-05 18:21:21 +09:00
Koichi Sasada
1ce10f3fbb do not reset EnvUtil.timeout_scale
Even if `setup` is omitted, but `teardown` is called and
`EnvUtil.timeout_scale` was reset with `nil`.
2025-03-05 05:45:54 +09:00
Koichi Sasada
46f3d82f40 Revert "try to show timeout sec"
This reverts commit ce66eea167.
2025-03-05 05:45:54 +09:00
Jean Boussier
15ee450801 Move in-place interning spec to Ruby's tests
Fix: https://github.com/ruby/spec/issues/1249

JRuby and TruffleRuby can't implement this behavior.
While quite a lot of code out there relies on it, if it's
not implemented it will simply result in sligthly less efficient
code, so not the end of the world.
2025-03-04 15:23:38 +01:00
Koichi Sasada
ce66eea167 try to show timeout sec
http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sp2-noble-docker/5632508
```
  1) Error:
TestEval#test_outer_local_variable_under_gc_compact_stress:
Test::Unit::ProxyError: execution of Test::Unit::CoreAssertions#assert_separately expired timeout (10 sec)
pid 1339179 killed by SIGABRT (signal 6) (core dumped)
```

seems that timeout scale doesn't work even though `RUBY_TEST_TIMEOUT_SCALE`
is specified.

This patch tries to print the timeout with scale information.
2025-03-04 19:39:16 +09:00
annichai-stripe
5085ec3ed9
Allow YJIT mem-size and call-threshold to be set at runtime via YJIT.enable() (#12505)
* first commit

* yjit.rb change

* revert formatting

* rename mem-size to exec-mem-size for correctness

* wip, move setting into rb_yjit_enable directly

* remove unused helper functions

* add in call threshold

* input validation with extensive eprintln

* delete test script

* exec-mem-size -> mem-size

* handle input validation with asserts

* add test cases related to input validation

* modify test cases

* move validation out of rs, into rb

* add comments

* remove trailing spaces

* remove logging

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>

* remove helper fn

* Update test/ruby/test_yjit.rb

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>

* trailing white space

---------

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2025-03-03 15:45:39 -05:00
Jun Aruga
9ccba88160 [ruby/openssl] test_pkey_dh.rb: Merge 2 test_new_break tests to one test.
Merge 2 test_new_break tests to one test because it's easy to maintain the test.

446ff3e11f
2025-03-03 15:27:56 +00:00
dependabot[bot]
7b3a0c65b9 [rubygems/rubygems] Bump the rb-sys group across 2 directories with 1 update
Bumps the rb-sys group with 1 update in the /test/rubygems/test_gem_ext_cargo_builder/custom_name/ext/custom_name_lib directory: [rb-sys](https://github.com/oxidize-rb/rb-sys).
Bumps the rb-sys group with 1 update in the /test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example directory: [rb-sys](https://github.com/oxidize-rb/rb-sys).

Updates `rb-sys` from 0.9.110 to 0.9.111
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.110...v0.9.111)

Updates `rb-sys` from 0.9.110 to 0.9.111
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.110...v0.9.111)

---
updated-dependencies:
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rb-sys
- dependency-name: rb-sys
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rb-sys
...

Signed-off-by: dependabot[bot] <support@github.com>

6452a6d6cd
2025-03-03 15:52:35 +09:00
ydah
a47e686cb6 Implement POSTEXE NODE locations
The following Location information has been added This is the information required for parse.y to be a universal parser:

```
❯ ruby --parser=prism --dump=parsetree -e "END {  }"
@ ProgramNode (location: (1,0)-(1,8))
+-- locals: []
+-- statements:
    @ StatementsNode (location: (1,0)-(1,8))
    +-- body: (length: 1)
        +-- @ PostExecutionNode (location: (1,0)-(1,8))
            +-- statements: nil
            +-- keyword_loc: (1,0)-(1,3) = "END"
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            +-- opening_loc: (1,4)-(1,5) = "{"
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            +-- closing_loc: (1,7)-(1,8) = "}"
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
2025-03-03 11:17:14 +09:00
Naoto Ono
db4ea95219
[Bug #20682] Add sleep 0.1 to stabilize flaky failures on macOS (#12829)
[Bug #20682] Add `sleep 0.1` to stabilize flaky failures on macOS
2025-02-28 09:32:36 +00:00
Kazuki Yamaguchi
a6da77c9e9 [ruby/openssl] ssl: fix tests using TLS 1.1 or older
Commit aa7f03e18f broke test_minmax_version and test_fallback_scsv
on systems using OpenSSL 1.1.1 with a system-wide configuration file
that specifies MinProtocol=TLSv1.2.

20250228T003003Z.fail.html.gz
20250228T003003Z.fail.html.gz

These test cases were already broken before the commit, but they were
being skipped because check_supported_protocol_versions failed to detect
TLS 1.1 support. To avoid affected by the configuration file, explicitly
reset SSLContext#min_version when TLS 1.1 or older is required.

The test cases are also broken with OpenSSL 3.0 or later, but this is
not currently visible because it still fails to detect TLS 1.1 support.
This is caused by the default SSLContext#security_level value, as
OpenSSL 3.0 changed TLS 1.1 to be disabled at level 1.

6d0ea81b5e
2025-02-28 04:33:43 +00:00
Maciek Rząsa
223f37c002 Improve tests for small UTF regex with case fold.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2025-02-28 12:34:38 +09:00
Maciej Rzasa
a50fbc56a3 Use mbuf instead of bitset for character class for small UTF. Fixes #16145 2025-02-28 12:34:38 +09:00
Kazuki Yamaguchi
d4b8da66ca [ruby/openssl] ssl: refactor check_supported_protocol_versions
As reported in <https://github.com/ruby/ruby/pull/12823>,
check_supported_protocol_versions is unstable and occasionally fails
with Errno::ECONNABORTED during SSLSocket#connect on Windows.

When the server-side SSLContext specifies an unsupported SSL/TLS
protocol version, start_server accepts a TCP connection but closes it
without reading ClientHello, as SSLSocket#accept immediately raises an
exception. With Winsock, this can cause the client-side
SSLSocket#connect to raise Errno::ECONNABORTED.

While the simplest fix is to add rescue Errno::ECONNABORTED, this method
can be simplified. Instead, let's set up a server that accepts all
protocol versions and test client connections with different settings.

aa7f03e18f
2025-02-27 17:18:02 +00:00
Kazuki Yamaguchi
c0f3dcf795 [ruby/openssl] digest: correct assert_equal usage in test_sha3
assert_equal accepts an expected value as the first argument.

8faa1d89de
2025-02-27 17:04:32 +00:00
Kazuki Yamaguchi
f5a74bd645 [ruby/openssl] digest: always run SHA-3 and truncated SHA-2 tests
The "pend" are no longer necessary, as they work with all OpenSSL
variants we currently support. They were added in OpenSSL 1.1.1 and
LibreSSL 3.8.0. They are also supported by the current AWS-LC release.

This makes the SHA-3 tests run with AWS-LC correctly. AWS-LC does not
report SHA-3 in OpenSSL::Digest.digests.

e1a6e9c081
2025-02-27 17:04:32 +00:00
Kazuki Yamaguchi
9994a95790 [ruby/openssl] ssl: manually craft invalid SAN extensions in tests
Starting with LibreSSL 3.5, OpenSSL::X509::ExtensionFactory refuses to
create SAN extensions that are not valid according to RFC 6125. While
this behavior makes sense, we need such invalid extensions to test our
own validation routine. Let's construct SAN extensions manually instead.

b420d6d739
2025-02-27 17:04:16 +00:00
Jun Aruga
244363b23e [ruby/openssl] Use ENV["TEST_RUBY_OPENSSL_FIPS_ENABLED"] instead of OpenSSL::OPENSSL_FIPS.
As OpenSSL::OPENSSL_FIPS always returns true on OpenSSL >= 3.0.0, we cannot use
this constant as a flag to check whether the OpenSSL is FIPS or not.
See <d725783c5c/ext/openssl/ossl.c (L994-L1004)>.

Skip the test_fips_mode_get_with_fips_mode_set test in AWS-LC case.

Because we don't test `OpenSSL.fips_mode=` on AWS-LC for now. We cannot change
the value of the `OpenSSL.fips_mode` on AWS-LC.
The `OpenSSL.fips_mode` in AWS-LC behaves as follows.

On AWS-LC non-FIPS:
```
$ bundle exec ruby -I ./lib -ropenssl.so -e 'p OpenSSL.fips_mode'
false

$ bundle exec ruby -I ./lib -ropenssl.so -e 'OpenSSL.fips_mode = true; p OpenSSL.fips_mode'
-e:1:in 'OpenSSL.fips_mode=': Turning on FIPS mode failed (OpenSSL::OpenSSLError)
	from -e:1:in '<main>'

$ bundle exec ruby -I ./lib -ropenssl.so -e 'OpenSSL.fips_mode = false; p OpenSSL.fips_mode'
false
```

On AWS-LC FIPS:
```
$ bundle exec ruby -I ./lib -ropenssl.so -e 'p OpenSSL.fips_mode'
true

$ bundle exec ruby -I ./lib -ropenssl.so -e 'OpenSSL.fips_mode = false; p OpenSSL.fips_mode'
-e:1:in 'OpenSSL.fips_mode=': Turning off FIPS mode failed (OpenSSL::OpenSSLError)
	from -e:1:in '<main>'

$ bundle exec ruby -I ./lib -ropenssl.so -e 'OpenSSL.fips_mode = true; p OpenSSL.fips_mode'
true
```

fd3e3e722f
2025-02-27 17:01:57 +00:00
Jean Boussier
0d62037fc0
[ruby/json] Ensure parser error snippets are valid UTF-8
Fix: https://github.com/ruby/json/issues/755

Error messages now include a snippet of the document
that doesn't parse to help locate the issue, however
the way it was done wasn't UTF-8 aware, and it could
result in exception messages with truncated characters.

It would be nice to go a bit farther and actually support
codepoints, but it's a lot of complexity to do it in C,
perhaps if we move that logic to Ruby given it's not a
performance sensitive codepath.

e144793b72
2025-02-27 13:32:32 +09:00
Nobuyoshi Nakada
931ac960b6
[Bug #21159] module names should not be modifiable 2025-02-27 11:07:36 +09:00
Hiroshi SHIBATA
237ab21f25 [ruby/cgi] Escape/unescape unclosed tags as well
cd1eb08076

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2025-02-26 07:34:04 +00:00
Hiroshi SHIBATA
b407b6b5b2 [ruby/uri] Fix merger of URI with authority component
https://hackerone.com/reports/2957667

2789182478

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2025-02-26 07:08:45 +00:00
Hiroshi SHIBATA
57dcb4bb9b [ruby/uri] Truncate userinfo with URI#join, URI#merge and URI#+
3675494839
2025-02-26 07:08:44 +00:00
Earlopain
790b3858e8 [ruby/prism] Add a custom builder class for the parser translator
I want to add new node types to the parser translator, for example `itblock`. The bulk of the work is already done by prism itself. In the `parser`
builder, this would be a 5-line change at most but we don't control that here.

Instead, we can add our own builder and either overwrite the few methods we need,
or just inline the complete builder. I'm not sure yet which would be better.

`rubocop-ast` uses its own builder for `parser`. For this to correctly work, it must explicitly choose to extend the
prism builder and use it, same as it currently chooses to use a different parser when prism is used.

I'd like to enforce that the builder for prism extends its custom one since it will lead to
some pretty weird issues otherwise. But first, I'd like to change `rubocop-ast` to make use of this.

b080e608a8
2025-02-25 15:44:56 +00:00
Hiroshi SHIBATA
e0c0e06154 Skip fiddle assertions if fiddle is not available 2025-02-25 15:36:46 +09:00
Hiroshi SHIBATA
b7c87ccd79 [rubygems/rubygems] Added fiddle dependency for TestGemExtCargoBuilder
a7c6696ffd
2025-02-25 15:36:46 +09:00
Andrii Konchyn
ea8b0017b2 [ruby/strscan] Enable tests passing on TruffleRuby
(https://github.com/ruby/strscan/pull/144)

Changes:
- enabled tests passing on TruffleRuby
- removed `truffleruby` and keep only `truffleruby-head` in CI

4aadfc8408
2025-02-25 15:36:46 +09:00
NAITOH Jun
018943ba05 [ruby/strscan] Fix a bug that inconsistency of IndexError vs nil for
unknown capture group
(https://github.com/ruby/strscan/pull/143)

Fix https://github.com/ruby/strscan/pull/139

Reported by Benoit Daloze. Thanks!!!

bc8a0d2623
2025-02-25 15:36:46 +09:00
NAITOH Jun
36ab247e4d [ruby/strscan] Fix a bug that scanning methods that don't use Regexp
don't clear named capture groups
(https://github.com/ruby/strscan/pull/142)

Fix https://github.com/ruby/strscan/pull/135

b957443e20
2025-02-25 15:36:46 +09:00
Samuel Williams
021ccbf7e8 [ruby/pp] Ensure the thread local state is always set up.
(https://github.com/ruby/pp/pull/38)

5b5d483ac2
2025-02-25 03:38:04 +00:00
Nobuyoshi Nakada
21ac0a3a64
[Bug #21153] Add missing op-assign to top const in command_asgn
It was defined in `arg` only; moved that pattern to `op_asgn` rule to
share it with `command_asgn`.
2025-02-24 23:20:12 +09:00
Samuel Chiang
fd882fb681 [ruby/openssl] test_ssl_session.rb: test adjustments to work with AWS-LC
The SSL SESSION files we were originally testing against use DHE and
SSLv3. AWS-LC happens to have no support for either and we have newer
possible alternatives available, so I've updated the respective
files to use ECDHE-RSA-AES256-SHA with TLS 1.1 and 1.2. I've verified
that these work as expected with all libcryptos we support.

There are also a few SSL session discrepencies in AWS-LC when
compared to OpenSSL.

1. AWS-LC has no support for internal session caching on the
   client-end.
2. AWS-LC supports internal session caching on the server, but
   SSL_get1_session does not return a resumable session with TLS 1.3
   in AWS-LC. Users have to use the SSL_CTX_sess_set_new_cb
   (ctx.session_new_cb in Ruby) to retrieve the resumable session
   ticket.
3. AWS-LC has no current support for external session caching in TLS
   1.3.

ca384b8e2f
2025-02-22 15:11:40 +00:00
Samuel Chiang
7a15ba48b5 [ruby/openssl] ssl: account for slight behavioral differences in AWS-LC
There are a few SSL discrepencies in AWS-LC when compared to OpenSSL.

1. AWS-LC has slightly different error messages (in all-caps).
2. AWS-LC has no support for DHE ciphersuites.
3. There are no concepts of SSL security levels within AWS-LC.
4. Similar to LibreSSL, there is no support for OPENSSL_CONF.

a60d050342
2025-02-22 15:11:40 +00:00
Samuel Chiang
4ec0e9e25d [ruby/openssl] pkey/ec: AWS-LC disallows serialization of explicit curves
65c5a772ea
2025-02-22 15:11:40 +00:00
Samuel Chiang
23465d8446 [ruby/openssl] pkey/dh: tweak break tests for AWS-LC
We reecently tweaked some break tests in test_pkey_dh.rb due to
different behavior with OpenSSL in FIPS mode.
AWS-LC does not inherit the same specific behavior, so tests
have been adjusted accordingly.

3117897dbc
2025-02-22 15:11:39 +00:00
Samuel Chiang
841d9f259d [ruby/openssl] pkey: EVP_DigestVerify doesn't return -1 in AWS-LC
EVP_DigestVerify in OpenSSL returns 0 to indicate a signature
verification failure and can return -1  to indicate other
failures, such as invalid ASN1 contents. ruby/openssl also
reflects that by returning false with 0 and raising an error
with -1.
EVP_DigestVerify in AWS-LC simply returns 0 for any failure.

be8ba76dc1
2025-02-22 15:11:39 +00:00
Samuel Chiang
f63a123606 [ruby/openssl] pkey: AWS-LC disallows parsing of invalid keys and params
OpenSSL allows invalid EC keys or DH params to be parsed. The consuming
application can then run parameter/key checks to check the validity of
the parameters. We happen to run tests to verify that this behaves as
expected.
AWS-LC on the other hand, directly raises an error and disallows the
invalid state to be parsed, rather than making it parsable and checking
the validity later. Relevant tests have been adjusted accordingly to
reflect this.

febe50be1b
2025-02-22 15:11:38 +00:00
Samuel Chiang
6263d0d16b [ruby/openssl] test_pkcs7.rb: skip AWS-LC's unsupported features
1. AWS-LC has no support for SMIME with PKCS7. That may change in the
   near future, so I've marked that with "pend" for now.
2. AWS-LC doesn't support printing of PKCS7 contents with
   PKCS7_print_ctx.
3. OpenSSL traditionally used indefinite-length encoding with
   ASN1_TFLG_NDEF in its implementation for PKCS7 EncryptedContent.
   AWS-LC uses explicit OCTET STRING headers to encode instead,
   which leads to a slight difference in serialized ASN1 contents
   from the two libraries.

78c585a9c2
2025-02-22 15:11:38 +00:00
Samuel Chiang
b995eee811 [ruby/openssl] asn1: adjusting an ASN1 test to use CONTEXT_SPECIFIC
AWS-LC's ASN1 parsing capabilities led to us examine some of our
ASN1 tests. One test in test_asn1.rb happens to use a tag number
of 8224. There are concerns with larger UNIVERSAL tags being
ambiguous with negative ASN1 Integers, so I've adjusted the test
to use CONTEXT_SPECIFIC instead with the same tag number (8224).

c73d9985ab
2025-02-22 15:11:38 +00:00
Samuel Chiang
c4a39d6ebc [ruby/openssl] test_config.rb: skip AWS-LC's unsupported features
AWS-LC has a few minor functionalities removed from NCONF_get_string.

1. Expanding of $foo to a previously-parsed value was removed.
2. OpenSSL falls back to using "default" with an unknown "section".
   AWS-LC does not support this behavior.
3. AWS-LC does not support parsing environment variables with "ENV"
   like LibreSSL.

e8de3bbd1e
2025-02-22 15:11:37 +00:00
Samuel Chiang
ee5af8860f [ruby/openssl] test_bn.rb: AWS-LC does not support BN::CONSTTIME
AWS-LC does not support BN_FLG_CONSTTIME due to its historically
inconsistent constant-time guarantees.

9875a01b5f
2025-02-22 15:11:37 +00:00