Project

General

Profile

Actions

Bug #17625

closed

OpenSSL::Timestamp::Response#failure_info does not work as documented

Added by midnight (Sarun R) almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
[ruby-core:102475]

Description

I was playing around with OpenSSL::Timestamp and found that #failure_info does not work as documented.
Here what's the document says.

failure_info → nil or symbol

However, the method returns Interger instead, neither nil nor symbol returned.
Here's some test case:

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) ruby-openssl-ossl_ts-symbols.patch xtkoba (Tee KOBAYASHI), 02/13/2021 02:51 PM

Updated by xtkoba (Tee KOBAYASHI) almost 4 years ago

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.

Updated by midnight (Sarun R) almost 4 years ago

I want to help try out the patch. However, I have issues compiling Ruby from the source.
It somewhat deviates from the main topic, but here I go anyway.

I followed compiling instructions from the README and got an error that I do not understand after running make.

linking shared-object bigdecimal.so
/usr/bin/ld: bigdecimal.o: relocation R_X86_64_PC32 against undefined symbol `rb_eArgError' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status

Does anybody have a clue of what I should look into?

P.S. if you have something to discuss regarding the main topic, please continue.

Updated by nobu (Nobuyoshi Nakada) almost 4 years ago

  • Status changed from Open to Closed
  • Backport changed from 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED, 3.0: REQUIRED

Merged the patch at ruby/openssl@f2d004679a.

Updated by nagachika (Tomoyuki Chikanaga) over 3 years ago

  • Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED, 3.0: REQUIRED to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONTNEED, 3.0: DONE

ruby_3_0 fc73fc79cbaee6674256589b7cfe53d20b638a05 merged revision(s) 1ad222477344597038d7ec08885a41f547c2a3b4.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0