[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.

https://github.com/ruby/openssl/commit/e8de3bbd1e
This commit is contained in:
Samuel Chiang 2025-02-12 01:31:31 +00:00 committed by git
parent ee5af8860f
commit c4a39d6ebc

View File

@ -43,6 +43,9 @@ __EOD__
end
def test_s_parse_format
# AWS-LC removed support for parsing $foo variables.
return if aws_lc?
c = OpenSSL::Config.parse(<<__EOC__)
baz =qx\t # "baz = qx"
@ -213,13 +216,15 @@ __EOC__
assert_raise(TypeError) do
@it.get_value(nil, 'HOME') # not allowed unlike Config#value
end
# fallback to 'default' ugly...
assert_equal('.', @it.get_value('unknown', 'HOME'))
unless aws_lc? # AWS-LC does not support the fallback
# fallback to 'default' ugly...
assert_equal('.', @it.get_value('unknown', 'HOME'))
end
end
def test_get_value_ENV
# LibreSSL removed support for NCONF_get_string(conf, "ENV", str)
return if libressl?
# LibreSSL and AWS-LC removed support for NCONF_get_string(conf, "ENV", str)
return if libressl? || aws_lc?
key = ENV.keys.first
assert_not_nil(key) # make sure we have at least one ENV var.