End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
OpenSSL::Timestamp::TokenInfo.new
OpenSSL::Timestamp::TokenInfo.new(file) → token-info
OpenSSL::Timestamp::TokenInfo.new(string) → token-info
ext/openssl/ossl_ts.c
View on GitHub ↗
static VALUE
ossl_ts_token_info_initialize(VALUE self, VALUE der)
{
TS_TST_INFO *info = DATA_PTR(self);
BIO *in;
der = ossl_to_der_if_possible(der);
in = ossl_obj2bio(&der);
info = d2i_TS_TST_INFO_bio(in, &info);
BIO_free(in);
if (!info) {
DATA_PTR(self) = NULL;
ossl_raise(eTimestampError, "Error when decoding the timestamp token info");
}
DATA_PTR(self) = info;
return self;
}