Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

OpenSSL::OCSP::Request#sign

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

Signs this OCSP request using cert, key and optional digest. If digest is not specified, SHA-1 is used. certs is an optional Array of additional certificates which are included in the request in addition to the signer certificate. Note that if certs is nil or not given, flag OpenSSL::OCSP::NOCERTS is enabled. Pass an empty array to include only the signer certificate.

flags is a bitwise OR of the following constants:

OpenSSL::OCSP::NOCERTS

Don’t include any certificates in the request. certs will be ignored.

See also #initialize_copy #signed? #check_nonce #to_der also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0