Make X509_VERIFY_PARAM_get_hostflags() take a const arg
authorMatt Caswell <matt@openssl.org>
Wed, 2 May 2018 10:32:39 +0000 (11:32 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 2 May 2018 22:43:52 +0000 (23:43 +0100)
Commit 5b748dea5 added this function which should have taken a const
argument.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6154)

crypto/x509/x509_vpm.c
doc/man3/X509_VERIFY_PARAM_set_flags.pod
include/openssl/x509_vfy.h

index e860afd7252ff7a37b4bcd0a60529caaa64b97a0..16d27f91b5c6743bae2d2c15d4c7f186fdc31286 100644 (file)
@@ -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;
 }
index d317fa85a48fbc2891159bae1bd4f0e41d5ea713..7765029766553518a8646e477b3ec00c35c0a650 100644 (file)
@@ -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);
index cede60e7b0f0450a212d6fe80340eb7f23d00458..75fcdb6fe94d781c2d661ffe10ebb026da44a81d 100644 (file)
@@ -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,