Skip to content

Commit 9cdfa3a

Browse files
committed
test/openssl/test_ossl.rb: relax assertion for error messages
The test case test_error_data utilizes the error message generated by X509V3_EXT_nconf_nid(). The next commit will use X509V3_EXT_nconf(), which generates a slightly different error message. Let's adapt the check to it.
1 parent 7c34a43 commit 9cdfa3a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/openssl/test_ossl.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ def test_error_data
6767
#
6868
# The generated message should look like:
6969
# "subjectAltName = IP:not.a.valid.ip.address: bad ip address (value=not.a.valid.ip.address)"
70+
# "subjectAltName = IP:not.a.valid.ip.address: error in extension (name=subjectAltName, value=IP:not.a.valid.ip.address)"
7071
ef = OpenSSL::X509::ExtensionFactory.new
71-
assert_raise_with_message(OpenSSL::X509::ExtensionError, /\(value=not.a.valid.ip.address\)/) {
72+
assert_raise_with_message(OpenSSL::X509::ExtensionError, /value=(IP:)?not.a.valid.ip.address\)/) {
7273
ef.create_ext("subjectAltName", "IP:not.a.valid.ip.address")
7374
}
7475
end

0 commit comments

Comments
 (0)