class OpenSSL::X509::StoreContext
A StoreContext is used while validating a single certificate and holds the status involved.
Public Class Methods
(Store store, ?Certificate cert, ?Array[Certificate] chain) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12225
def initialize: (Store store, ?Certificate cert, ?Array[Certificate] chain) -> void
Sets up a StoreContext for a verification of the X.509 certificate cert.
Public Instance Methods
() → Array[Certificate]?
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12091
def chain: () -> Array[Certificate]?
Returns the verified chain.
See also the man page X509_STORE_CTX_set0_verified_chain(3).
() → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12098
def cleanup: () -> void
() → Certificate
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12108
def current_cert: () -> Certificate
Returns the certificate which caused the error.
See also the man page X509_STORE_CTX_get_current_cert(3).
() → CRL
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12118
def current_crl: () -> CRL
Returns the CRL which caused the error.
See also the man page X509_STORE_CTX_get_current_crl(3).
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12130
def error: () -> Integer?
Returns the error code of stctx. This is typically called after verify is done, or from the verification callback set to OpenSSL::X509::Store#verify_callback=.
See also the man page X509_STORE_CTX_get_error(3).
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12141
def error=: (Integer error) -> Integer
Sets the error code of stctx. This is used by the verification callback set to OpenSSL::X509::Store#verify_callback=.
See also the man page X509_STORE_CTX_set_error(3).
() → Integer
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12151
def error_depth: () -> Integer
Returns the depth of the chain. This is used in combination with error.
See also the man page X509_STORE_CTX_get_error_depth(3).
() → String?
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12162
def error_string: () -> String?
Returns the human readable error string corresponding to the error code retrieved by error.
See also the man page X509_verify_cert_error_string(3).
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12173
def flags=: (Integer flags) -> Integer
Sets the verification flags to the context. This overrides the default value set by Store#flags=.
See also the man page X509_VERIFY_PARAM_set_flags(3).
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12184
def purpose=: (Integer purpose) -> Integer
Sets the purpose of the context. This overrides the default value set by Store#purpose=.
See also the man page X509_VERIFY_PARAM_set_purpose(3).
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12194
def time=: (Time time) -> Time
Sets the time used in the verification. If not set, the current time is used.
See also the man page X509_VERIFY_PARAM_set_time(3).
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12205
def trust=: (Integer trust) -> Integer
Sets the trust settings of the context. This overrides the default value set by Store#trust=.
See also the man page X509_VERIFY_PARAM_set_trust(3).
() → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/openssl/0/openssl.rbs, line 12215
def verify: () -> bool
Performs the certificate verification using the parameters set to stctx.
See also the man page X509_verify_cert(3).