Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
OpenSSL::X509::StoreContext#current_cert
() -> ::OpenSSL::X509::Certificate
stctx.current_cert → X509::Certificate
ext/openssl/ossl_x509store.c
View on GitHub ↗
static VALUE
ossl_x509stctx_get_curr_cert(VALUE self)
{
X509_STORE_CTX *ctx;
const X509 *x509;
GetX509StCtx(self, ctx);
x509 = X509_STORE_CTX_get_current_cert(ctx);
if (!x509)
return Qnil;
return ossl_x509_new(x509);
}
Returns the certificate which caused the error.
See also the man page X509_STORE_CTX_get_current_cert(3).