Class: OpenSSL::OCSP::BasicResponse
Relationships & Source Files | |
Inherits: | Object |
Defined in: | ext/openssl/ossl_ocsp.c |
Overview
Class Method Summary
-
.new(*) ⇒ basic_response
constructor
Creates a new
BasicResponse
and ignores all arguments.
Instance Method Summary
-
#add_nonce(nonce = nil)
Adds
nonce
to this response. -
#add_status(certificate_id, status, reason, revocation_time, this_update, next_update, extensions) ⇒ basic_response
Adds a validation #status (0 for good, 1 for revoked, 2 for unknown) to this response for
certificate_id
. -
#copy_nonce(request) ⇒ Integer
Copies the nonce from
request
into this response. -
#sign(signer_cert, signer_key) ⇒ self
Signs this response using the
signer_cert
andsigner_key
. -
#status ⇒ statuses
Returns an Array of statuses for this response.
-
#verify(certificates, store) ⇒ Boolean
Verifies the signature of the response using the given
certificates
,store
andflags
.
Constructor Details
.new(*) ⇒ basic_response
Creates a new BasicResponse
and ignores all arguments.
Instance Method Details
#add_nonce(nonce = nil)
Adds nonce
to this response. If no nonce was provided a random nonce will be added.
#add_status(certificate_id, status, reason, revocation_time, this_update, next_update, extensions) ⇒ basic_response
Adds a validation #status (0 for good, 1 for revoked, 2 for unknown) to this response for certificate_id
. reason
describes the reason for the revocation, if any.
The revocation_time
, this_update
and next_update
are times for the certificate's revocation time, the time of this status and the next update time for a new status, respectively.
extensions
may be an Array of ::OpenSSL::X509::Extension that will be added to this response or nil.
#copy_nonce(request) ⇒ Integer
Copies the nonce from request
into this response. Returns 1 on success and 0 on failure.
#sign(signer_cert, signer_key) ⇒ self
#sign(signer_cert, signer_key, certificates) ⇒ self
#sign(signer_cert, signer_key, certificates, flags) ⇒ self
self
#sign(signer_cert, signer_key, certificates) ⇒ self
#sign(signer_cert, signer_key, certificates, flags) ⇒ self
Signs this response using the signer_cert
and signer_key
. Additional certificates
may be added to the signature along with a set of flags
.
#status ⇒ statuses
Returns an Array of statuses for this response. Each status contains a CertificateId, the status (0 for good, 1 for revoked, 2 for unknown), the reason for the status, the revocation time, the time of this update, the time for the next update and a list of OpenSSL::X509::Extensions
.
#verify(certificates, store) ⇒ Boolean
#verify(certificates, store, flags) ⇒ Boolean
Boolean
#verify(certificates, store, flags) ⇒ Boolean
Verifies the signature of the response using the given certificates
, store
and flags
.