Skip to content
instance method

OpenSSL::OCSP::BasicResponse#sign

(::OpenSSL::X509::Certificate cert, ::OpenSSL::PKey::PKey key, ?::Array[::OpenSSL::X509::Certificate] certs, ?::Integer flags, ?::OpenSSL::Digest digest) -> self
basic_response.sign(cert, key, certs = nil, flags = 0, digest = nil) → self

Signs this OCSP response using the cert, key and optional digest. This behaves in the similar way as OpenSSL::OCSP::Request#sign.

flags can include:

OpenSSL::OCSP::NOCERTS

don’t include certificates

OpenSSL::OCSP::NOTIME

don’t set producedAt

OpenSSL::OCSP::RESPID_KEY

use signer’s public key hash as responderID

See also #responses #status #find_response #to_der also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0