End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenSSL::Timestamp::Response#token
response.token → nil or OpenSSL::PKCS7
ext/openssl/ossl_ts.c
View on GitHub ↗
static VALUE
ossl_ts_resp_get_token(VALUE self)
{
TS_RESP *resp;
PKCS7 *p7, *copy;
VALUE obj;
GetTSResponse(self, resp);
if (!(p7 = TS_RESP_get_token(resp)))
return Qnil;
obj = NewPKCS7(cPKCS7);
if (!(copy = PKCS7_dup(p7)))
ossl_raise(eTimestampError, NULL);
SetPKCS7(obj, copy);
return obj;
}
If a timestamp token is present, this returns it in the form of a OpenSSL::PKCS7.
See also
#to_der
#token_info
#status_text
#tsa_certificate
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0