Skip to content

Commit 6e45755

Browse files
committed
test/openssl/test_config: skip tests for .include on older OpenSSL
The .include directive was initially added by OpenSSL 1.1.1, but the syntax was later modified in 1.1.1b to improve compatibility with the parser in <= 1.1.0. The test case expects 1.1.1b's parser. openssl/openssl@95f59d3 The test case is failing on Ubuntu 18.04 because it still uses the initial 1.1.1 release: http://rubyci.s3.amazonaws.com/graviton2/ruby-master/log/20210316T120003Z.fail.html.gz (cherry picked from commit ruby/ruby@e61e9bc)
1 parent c7edb0a commit 6e45755

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/openssl/test_config.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ def test_s_parse_format
121121
end
122122

123123
def test_s_parse_include
124+
if !openssl?(1, 1, 1, 2)
125+
# OpenSSL < 1.1.1 parses .include directive as a normal assignment
126+
pend ".include directive is not supported"
127+
end
128+
124129
in_tmpdir("ossl-config-include-test") do |dir|
125130
Dir.mkdir("child")
126131
File.write("child/a.conf", <<~__EOC__)
@@ -150,10 +155,6 @@ def test_s_parse_include
150155

151156
# Include a file by relative path
152157
c1 = OpenSSL::Config.parse(include_file)
153-
if c1["sec-main"][".include"]
154-
# OpenSSL < 1.1.1 parses '.include =' as a normal assignment
155-
pend ".include directive is not supported"
156-
end
157158
assert_equal(["default", "sec-a", "sec-b", "sec-main"], c1.sections.sort)
158159
assert_equal(["file-a", "file-b", "file-main"], c1["default"].keys.sort)
159160
assert_equal({"a" => "123"}, c1["sec-a"])

0 commit comments

Comments
 (0)