summaryrefslogtreecommitdiffstats
path: root/crypto/x509
diff options
context:
space:
mode:
authorvl-loz <vlozano@vmware.com>2023-08-09 15:56:27 -0700
committerTomas Mraz <tomas@openssl.org>2023-08-17 21:34:12 +0200
commit4a469cba27cf778f1d97ddeefd3a3a80cd623553 (patch)
tree85fbae5590ca0858fedc9872496edb8d92d21b5c /crypto/x509
parent51b2a670c8f8499dc4f89efbd711e5b5276791b2 (diff)
Add X509_STORE_CTX_set_get_crl and X509_STORE_CTX_set_current_reasons
This change is for feature request #21679. Adds a couple of setters to aid with custom CRL validation. Reviewed-by: Todd Short <todd.short@me.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21737)
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509_vfy.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index 3c7b7a563a..1794c14e99 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -2614,6 +2614,12 @@ void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
X509_VERIFY_PARAM_set_time(ctx->param, t);
}
+void X509_STORE_CTX_set_current_reasons(X509_STORE_CTX *ctx,
+ unsigned int current_reasons)
+{
+ ctx->current_reasons = current_reasons;
+}
+
X509 *X509_STORE_CTX_get0_cert(const X509_STORE_CTX *ctx)
{
return ctx->cert;
@@ -2685,6 +2691,12 @@ X509_STORE_CTX_get_crl_fn X509_STORE_CTX_get_get_crl(const X509_STORE_CTX *ctx)
return ctx->get_crl;
}
+void X509_STORE_CTX_set_get_crl(X509_STORE_CTX *ctx,
+ X509_STORE_CTX_get_crl_fn get_crl)
+{
+ ctx->get_crl = get_crl;
+}
+
X509_STORE_CTX_check_crl_fn
X509_STORE_CTX_get_check_crl(const X509_STORE_CTX *ctx)
{