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::StoreContext#verify
stctx.verify → true | false
ext/openssl/ossl_x509store.c
View on GitHub ↗
static VALUE
ossl_x509stctx_verify(VALUE self)
{
X509_STORE_CTX *ctx;
GetX509StCtx(self, ctx);
X509_STORE_CTX_set_ex_data(ctx, stctx_ex_verify_cb_idx,
(void *)rb_iv_get(self, "@verify_callback"));
switch (X509_verify_cert(ctx)) {
case 1:
return Qtrue;
case 0:
ossl_clear_error();
return Qfalse;
default:
ossl_raise(eX509CertError, "X509_verify_cert");
}
}
Performs the certificate verification using the parameters set to stctx.
See also the man page X509_verify_cert(3).