From: tb Date: Wed, 24 May 2023 08:46:01 +0000 (+0000) Subject: Provide X509_VERIFY_PARAM_set_hostflags() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e51d4db3dada5e138401dc8d637c3ce8a97cb983;p=openbsd Provide X509_VERIFY_PARAM_set_hostflags() This is needed for an upcoming regress test that needs to access the hostflag. This is public API in OpenSSL but since nothing seems to be using this, this accessor will be kept internal-only for the time being. ok jsing --- diff --git a/lib/libcrypto/x509/x509_vpm.c b/lib/libcrypto/x509/x509_vpm.c index 4896fe8b7ed..2110787a5f6 100644 --- a/lib/libcrypto/x509/x509_vpm.c +++ b/lib/libcrypto/x509/x509_vpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vpm.c,v 1.37 2023/04/28 16:50:16 beck Exp $ */ +/* $OpenBSD: x509_vpm.c,v 1.38 2023/05/24 08:46:01 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2004. */ @@ -551,6 +551,13 @@ X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param, } LCRYPTO_ALIAS(X509_VERIFY_PARAM_add1_host); +/* Public API in OpenSSL - nothing seems to use this. */ +unsigned int +X509_VERIFY_PARAM_get_hostflags(X509_VERIFY_PARAM *param) +{ + return param->id->hostflags; +} + void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, unsigned int flags) {