instance method
OpenSSL::OCSP::Request#certid
() -> ::Array[::OpenSSL::OCSP::CertificateId]
request.certid → [certificate_id, ...]
ext/openssl/ossl_ocsp.c
View on GitHub ↗
static VALUE
ossl_ocspreq_get_certid(VALUE self)
{
OCSP_REQUEST *req;
GetOCSPReq(self, req);
int count = OCSP_request_onereq_count(req);
if (count < 0)
ossl_raise(eOCSPError, "OCSP_request_onereq_count");
if (count == 0)
return Qnil;
VALUE ary = rb_ary_new_capa(count);
for (int i = 0; i < count; i++) {
OCSP_ONEREQ *one = OCSP_request_onereq_get0(req, i);
OCSP_CERTID *cid = OCSP_onereq_get0_id(one);
rb_ary_push(ary, ossl_ocspcid_new(cid));
}
return ary;
}
Returns all certificate IDs in this request.