Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
OpenSSL::Timestamp::Request#policy_id=
request.policy_id = "string" → string
ext/openssl/ossl_ts.c
View on GitHub ↗
static VALUE
ossl_ts_req_set_policy_id(VALUE self, VALUE oid)
{
TS_REQ *req;
ASN1_OBJECT *obj;
int ok;
GetTSRequest(self, req);
obj = obj_to_asn1obj(oid);
ok = TS_REQ_set_policy_id(req, obj);
ASN1_OBJECT_free(obj);
if (!ok)
ossl_raise(eTimestampError, "TS_REQ_set_policy_id");
return oid;
}
Allows to set the object identifier that represents the timestamp policy under which the server shall create the timestamp. This may be left nil, implying that the timestamp server will issue the timestamp using some default policy.
Example:
Example
request.policy_id = "1.2.3.4.5"