From: xtkoba+ruby@... Date: 2021-02-13T14:52:25+00:00 Subject: [ruby-core:102478] [Ruby master Bug#17625] OpenSSL::Timestamp::Response#failure_info does not work as documented Issue #17625 has been updated by xtkoba (Tee KOBAYASHI). File ruby-openssl-ossl_ts-symbols.patch added It may suffice to substitute `ID2SYM(rb_intern_const("BAD_ALG"))` for `rb_intern_const("BAD_ALG")` and so on in `ext/openssl/ossl_ts.c`. ---------------------------------------- Bug #17625: OpenSSL::Timestamp::Response#failure_info does not work as documented https://bugs.ruby-lang.org/issues/17625#change-90369 * Author: midnight (Sarun R) * Status: Open * Priority: Normal * ruby -v: ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- I was playing around with `OpenSSL::Timestamp` and found that `#failure_info` does not work as documented. Here what's [the document](https://ruby-doc.org/stdlib-3.0.0/libdoc/openssl/rdoc/OpenSSL/Timestamp/Response.html#method-i-failure_info) says. > failure_info ��� nil or symbol However, the method returns `Interger` instead, neither nil nor symbol returned. Here's some test case: ~~~ruby identrust_ts_response = ::Base64.decode64('MCIwIAIBAjAXDBVJbnZhbGlkIFRpbWVTdGFtcFJlcS4DAgaA') parsed_response = ::OpenSSL::Timestamp::Response.new(identrust_ts_response) parsed_response.failure_info ~~~ The response is the actual one from IdenTrust timestamp server. ---Files-------------------------------- ruby-openssl-ossl_ts-symbols.patch (1.64 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: