Skip to content

Commit e8de3bb

Browse files
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.
1 parent 9875a01 commit e8de3bb

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/openssl/test_config.rb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ def test_s_parse
4343
end
4444

4545
def test_s_parse_format
46+
# AWS-LC removed support for parsing $foo variables.
47+
return if aws_lc?
48+
4649
c = OpenSSL::Config.parse(<<__EOC__)
4750
baz =qx\t # "baz = qx"
4851
@@ -213,13 +216,15 @@ def test_get_value
213216
assert_raise(TypeError) do
214217
@it.get_value(nil, 'HOME') # not allowed unlike Config#value
215218
end
216-
# fallback to 'default' ugly...
217-
assert_equal('.', @it.get_value('unknown', 'HOME'))
219+
unless aws_lc? # AWS-LC does not support the fallback
220+
# fallback to 'default' ugly...
221+
assert_equal('.', @it.get_value('unknown', 'HOME'))
222+
end
218223
end
219224

220225
def test_get_value_ENV
221-
# LibreSSL removed support for NCONF_get_string(conf, "ENV", str)
222-
return if libressl?
226+
# LibreSSL and AWS-LC removed support for NCONF_get_string(conf, "ENV", str)
227+
return if libressl? || aws_lc?
223228

224229
key = ENV.keys.first
225230
assert_not_nil(key) # make sure we have at least one ENV var.

0 commit comments

Comments
 (0)