instance method
OpenSSL::OCSP::BasicResponse#find_response
(::OpenSSL::OCSP::CertificateId certificate_id) -> ::OpenSSL::OCSP::SingleResponse?
basic_response.find_response(certificate_id) → SingleResponse | nil
ext/openssl/ossl_ocsp.c
View on GitHub ↗
static VALUE
ossl_ocspbres_find_response(VALUE self, VALUE target)
{
OCSP_BASICRESP *bs;
OCSP_CERTID *id;
int n;
GetOCSPCertId(target, id);
GetOCSPBasicRes(self, bs);
if ((n = OCSP_resp_find(bs, id, -1)) == -1)
return Qnil;
return ossl_ocspsres_new(OCSP_resp_get0(bs, n));
}
Returns a SingleResponse whose CertId matches with certificate_id, or nil if this BasicResponse does not contain it.