Method: OpenSSL::Timestamp::Request#message_imprint=

Defined in:
ossl_ts.c

#message_imprint=(hash) ⇒ Object

Set the message imprint digest.

call-seq:
     request.message_imprint = "string"    -> string


302
303
304
305
306
307
308
309
310
311
312
313
314
315
# File 'ossl_ts.c', line 302

static VALUE
ossl_ts_req_set_msg_imprint(VALUE self, VALUE hash)
{
    TS_REQ *req;
    TS_MSG_IMPRINT *mi;
    StringValue(hash);

    GetTSRequest(self, req);
    mi = TS_REQ_get_msg_imprint(req);
    if (!TS_MSG_IMPRINT_set_msg(mi, (unsigned char *)RSTRING_PTR(hash), RSTRING_LENINT(hash)))
        ossl_raise(eTimestampError, "TS_MSG_IMPRINT_set_msg");

    return hash;
}