From fc73fc79cbaee6674256589b7cfe53d20b638a05 Mon Sep 17 00:00:00 2001 From: nagachika Date: Sun, 23 May 2021 14:40:20 +0900 Subject: merge revision(s) 1ad222477344597038d7ec08885a41f547c2a3b4: [Backport #17625] [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) https://github.com/ruby/openssl/commit/f2d004679a --- ext/openssl/ossl_ts.c | 22 +++++++++++----------- test/openssl/test_ts.rb | 5 +++++ 2 files changed, 16 insertions(+), 11 deletions(-) --- test/openssl/test_ts.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/openssl') diff --git a/test/openssl/test_ts.rb b/test/openssl/test_ts.rb index 6e9c30894b..8e31a7d28d 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 -- cgit v1.2.3