From: Matt Caswell Date: Wed, 2 May 2018 10:32:39 +0000 (+0100) Subject: Make X509_VERIFY_PARAM_get_hostflags() take a const arg X-Git-Tag: OpenSSL_1_1_0i~133 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=70ec1c96a7cdf8ee6a500535a71cf46e930fb2f3;p=oweals%2Fopenssl.git Make X509_VERIFY_PARAM_get_hostflags() take a const arg Commit 14e55560 added this function which should have taken a const argument. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6155) --- diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c index 04a5164af2..d622b89ceb 100644 --- a/crypto/x509/x509_vpm.c +++ b/crypto/x509/x509_vpm.c @@ -412,7 +412,7 @@ void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, param->hostflags = flags; } -unsigned int X509_VERIFY_PARAM_get_hostflags(X509_VERIFY_PARAM *param) +unsigned int X509_VERIFY_PARAM_get_hostflags(const X509_VERIFY_PARAM *param) { return param->hostflags; } diff --git a/doc/crypto/X509_VERIFY_PARAM_set_flags.pod b/doc/crypto/X509_VERIFY_PARAM_set_flags.pod index df149f42f0..55077e5253 100644 --- a/doc/crypto/X509_VERIFY_PARAM_set_flags.pod +++ b/doc/crypto/X509_VERIFY_PARAM_set_flags.pod @@ -56,7 +56,7 @@ X509_VERIFY_PARAM_set1_ip_asc const char *name, size_t namelen); void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, unsigned int flags); - unsigned int X509_VERIFY_PARAM_get_hostflags(X509_VERIFY_PARAM *param); + unsigned int X509_VERIFY_PARAM_get_hostflags(const X509_VERIFY_PARAM *param); char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *param); int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param, const char *email, size_t emaillen); diff --git a/include/openssl/x509_vfy.h b/include/openssl/x509_vfy.h index aaaf7b5e66..46719814a1 100644 --- a/include/openssl/x509_vfy.h +++ b/include/openssl/x509_vfy.h @@ -475,7 +475,7 @@ int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param, const char *name, size_t namelen); void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, unsigned int flags); -unsigned int X509_VERIFY_PARAM_get_hostflags(X509_VERIFY_PARAM *param); +unsigned int X509_VERIFY_PARAM_get_hostflags(const X509_VERIFY_PARAM *param); char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *); void X509_VERIFY_PARAM_move_peername(X509_VERIFY_PARAM *, X509_VERIFY_PARAM *); int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,