instance method
OpenSSL::X509::StoreContext#verify
() -> bool
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);
VALUE cb = rb_iv_get(self, "@verify_callback");
X509_STORE_CTX_set_ex_data(ctx, stctx_ex_verify_cb_idx, (void *)cb);
RB_OBJ_WRITTEN(self, Qundef, cb);
switch (X509_verify_cert(ctx)) {
case 1:
return Qtrue;
case 0:
ossl_clear_error();
return Qfalse;
default:
ossl_raise(eX509StoreError, "X509_verify_cert");
}
}
Performs the certificate verification using the parameters set to stctx.
See also the man page X509_verify_cert(3).