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