Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

OpenSSL::X509::Store#verify

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.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0