From 4db296d9f0cf2855b358883a55b77a6b6f6848ba Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 2 May 2018 11:32:39 +0100 Subject: [PATCH] Make X509_VERIFY_PARAM_get_hostflags() take a const arg Commit 5b748dea5 added this function which should have taken a const argument. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/6154) --- crypto/x509/x509_vpm.c | 2 +- doc/man3/X509_VERIFY_PARAM_set_flags.pod | 2 +- include/openssl/x509_vfy.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c index e860afd725..16d27f91b5 100644 --- a/crypto/x509/x509_vpm.c +++ b/crypto/x509/x509_vpm.c @@ -393,7 +393,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/man3/X509_VERIFY_PARAM_set_flags.pod b/doc/man3/X509_VERIFY_PARAM_set_flags.pod index d317fa85a4..7765029766 100644 --- a/doc/man3/X509_VERIFY_PARAM_set_flags.pod +++ b/doc/man3/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 cede60e7b0..75fcdb6fe9 100644 --- a/include/openssl/x509_vfy.h +++ b/include/openssl/x509_vfy.h @@ -479,7 +479,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, -- 2.25.1