Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
OpenSSL::OCSP::Response.create
OpenSSL::OCSP::Response.create(status, basic_response = nil) → response
ext/openssl/ossl_ocsp.c
View on GitHub ↗
static VALUE
ossl_ocspres_s_create(VALUE klass, VALUE status, VALUE basic_resp)
{
OCSP_BASICRESP *bs;
OCSP_RESPONSE *res;
VALUE obj;
int st = NUM2INT(status);
if(NIL_P(basic_resp)) bs = NULL;
else GetOCSPBasicRes(basic_resp, bs); /* NO NEED TO DUP */
obj = NewOCSPRes(klass);
if(!(res = OCSP_response_create(st, bs)))
ossl_raise(eOCSPError, NULL);
SetOCSPRes(obj, res);
return obj;
}
Creates an OpenSSL::OCSP::Response from status and basic_response.