Bug #17625
closedOpenSSL::Timestamp::Response#failure_info does not work as documented
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
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.