[ruby/openssl] 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. https://github.com/ruby/openssl/commit/9cdfa3a4d1
This commit is contained in:
parent
91e5f51607
commit
1d4a43e7b0
@ -67,8 +67,9 @@ class OpenSSL::OSSL < OpenSSL::SSLTestCase
|
||||
#
|
||||
# The generated message should look like:
|
||||
# "subjectAltName = IP:not.a.valid.ip.address: bad ip address (value=not.a.valid.ip.address)"
|
||||
# "subjectAltName = IP:not.a.valid.ip.address: error in extension (name=subjectAltName, value=IP:not.a.valid.ip.address)"
|
||||
ef = OpenSSL::X509::ExtensionFactory.new
|
||||
assert_raise_with_message(OpenSSL::X509::ExtensionError, /\(value=not.a.valid.ip.address\)/) {
|
||||
assert_raise_with_message(OpenSSL::X509::ExtensionError, /value=(IP:)?not.a.valid.ip.address\)/) {
|
||||
ef.create_ext("subjectAltName", "IP:not.a.valid.ip.address")
|
||||
}
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user