Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

OpenSSL::X509::Store#verify

(::OpenSSL::X509::Certificate certificate, ?::Array[::OpenSSL::X509::Certificate] chain) ?{ (bool preverify_ok, ::OpenSSL::X509::StoreContext store_ctx) -> ::boolish } -> ::boolish
store.verify(cert, chain = nil) → true | false

Performs a certificate verification on the OpenSSL::X509::Certificate cert.

chain can be an array of OpenSSL::X509::Certificate that is used to construct the certificate chain.

If a block is given, it overrides the callback set by verify_callback=.

After finishing the verification, the error information can be retrieved by error, error_string, and the resulting complete certificate chain can be retrieved by chain.

See also #trust= #verify_callback= #time= also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0