instance method
OpenSSL::Timestamp::Request#algorithm=
(::String) -> ::String
request.algorithm = "string" → string
ext/openssl/ossl_ts.c
View on GitHub ↗
static VALUE
ossl_ts_req_set_algorithm(VALUE self, VALUE algo)
{
TS_REQ *req;
TS_MSG_IMPRINT *mi;
ASN1_OBJECT *obj;
X509_ALGOR *algor;
GetTSRequest(self, req);
obj = ossl_to_asn1obj(algo);
mi = TS_REQ_get_msg_imprint(req);
algor = TS_MSG_IMPRINT_get_algo(mi);
if (!X509_ALGOR_set0(algor, obj, V_ASN1_NULL, NULL)) {
ASN1_OBJECT_free(obj);
ossl_raise(eTimestampError, "X509_ALGOR_set0");
}
return algo;
}
Allows to set the object identifier or the ‘short name’ of the algorithm that was used to create the message imprint digest.
Example:
Example
request.algorithm = "SHA1"
See also
#algorithm
#cert_requested=
.new
#cert_requested?
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0