Skip to content
instance method

OpenSSL::Timestamp::Response#verify

(::OpenSSL::Timestamp::Request request, ::OpenSSL::X509::Store store, ?::OpenSSL::X509::Certificate intermediate_cert) -> self
response.verify(Request, root_store) → Response
response.verify(Request, root_store, [intermediate_cert]) → Response

Verifies a timestamp token by checking the signature, validating the certificate chain implied by tsa_certificate and by checking conformance to a given Request. Mandatory parameters are the Request associated to this Response, and an OpenSSL::X509::Store of trusted roots.

Intermediate certificates can optionally be supplied for creating the certificate chain. These intermediate certificates must all be instances of OpenSSL::X509::Certificate.

If validation fails, several kinds of exceptions can be raised:

  • TypeError if types don’t fit

  • TimestampError if something is wrong with the timestamp token itself, if it is not conformant to the Request, or if validation of the timestamp certificate chain fails.

See also #tsa_certificate #to_text also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0