summaryrefslogtreecommitdiff
path: root/test/openssl
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-02-14 18:16:06 +0900
committerKazuki Yamaguchi <k@rhe.jp>2021-03-16 19:37:06 +0900
commit1ad222477344597038d7ec08885a41f547c2a3b4 (patch)
tree18291b9630e640c5f616f96aedbde3fa4a46e115 /test/openssl
parente2ce3830447b95fbb7d9b8dff80b8c1716688da0 (diff)
[ruby/openssl] Fixed the results of OpenSSL::Timestamp::Response#failure_info
Made stored values `Symbol`s instead of `ID`s. Fixes https://bugs.ruby-lang.org/issues/17625 Co-Authored-By: xtkoba (Tee KOBAYASHI) <xtkoba+ruby@gmail.com> https://github.com/ruby/openssl/commit/f2d004679a
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4275
Diffstat (limited to 'test/openssl')
-rw-r--r--test/openssl/test_ts.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/openssl/test_ts.rb b/test/openssl/test_ts.rb
index d39f3d3afd..5c2d43ebc9 100644
--- a/test/openssl/test_ts.rb
+++ b/test/openssl/test_ts.rb
@@ -222,6 +222,11 @@ _end_of_pem_
assert_equal(token.to_der, resp.token.to_der)
end
+ def test_response_failure_info
+ resp = OpenSSL::Timestamp::Response.new("0\"0 \x02\x01\x020\x17\f\x15Invalid TimeStampReq.\x03\x02\x06\x80")
+ assert_equal(:BAD_ALG, resp.failure_info)
+ end
+
def test_response_mandatory_fields
fac = OpenSSL::Timestamp::Factory.new
req = OpenSSL::Timestamp::Request.new