diff options
| author | Kazuki Yamaguchi <k@rhe.jp> | 2023-08-31 14:58:14 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-09-06 19:30:55 +0900 |
| commit | 1d4a43e7b09d0c90be6bef839b0616fe6a9008cd (patch) | |
| tree | 8d71f9c60385bc99b1799fed90dafeb48851e315 | |
| parent | 91e5f51607e38138045b67f80932f7a2a56f7d72 (diff) | |
[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
| -rw-r--r-- | test/openssl/test_ossl.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/openssl/test_ossl.rb b/test/openssl/test_ossl.rb index 5759c75b81..979669a003 100644 --- a/test/openssl/test_ossl.rb +++ b/test/openssl/test_ossl.rb @@ -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 |
