[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Sun Sep 18 04:26:08 UTC 2016


The branch master has been updated
       via  81f9ce1e1965e0e33db6d2391285c4c1b6af0434 (commit)
      from  66fe388aa410820d80ab1d99730b64b1b56a89d4 (commit)


- Log -----------------------------------------------------------------
commit 81f9ce1e1965e0e33db6d2391285c4c1b6af0434
Author: FdaSilvaYY <fdasilvayy at gmail.com>
Date:   Thu Sep 15 21:37:14 2016 +0200

    Constify code about X509_VERIFY_PARAM
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/1594)

-----------------------------------------------------------------------

Summary of changes:
 crypto/x509/x509_vpm.c                     | 4 ++--
 doc/crypto/X509_VERIFY_PARAM_set_flags.pod | 4 ++--
 doc/ssl/SSL_set1_host.pod                  | 2 +-
 include/openssl/ssl.h                      | 2 +-
 include/openssl/x509_vfy.h                 | 4 ++--
 ssl/ssl_lib.c                              | 2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c
index 05c7852..2ea39c8 100644
--- a/crypto/x509/x509_vpm.c
+++ b/crypto/x509/x509_vpm.c
@@ -301,7 +301,7 @@ int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
     return 1;
 }
 
-unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param)
+unsigned long X509_VERIFY_PARAM_get_flags(const X509_VERIFY_PARAM *param)
 {
     return param->flags;
 }
@@ -396,7 +396,7 @@ void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
     param->hostflags = flags;
 }
 
-char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *param)
+const char *X509_VERIFY_PARAM_get0_peername(const X509_VERIFY_PARAM *param)
 {
     return param->peername;
 }
diff --git a/doc/crypto/X509_VERIFY_PARAM_set_flags.pod b/doc/crypto/X509_VERIFY_PARAM_set_flags.pod
index 2800cd4..528a53a 100644
--- a/doc/crypto/X509_VERIFY_PARAM_set_flags.pod
+++ b/doc/crypto/X509_VERIFY_PARAM_set_flags.pod
@@ -12,7 +12,7 @@ X509_VERIFY_PARAM_set_flags, X509_VERIFY_PARAM_clear_flags, X509_VERIFY_PARAM_ge
                                         unsigned long flags);
  int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
                                         unsigned long flags);
- unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
+ unsigned long X509_VERIFY_PARAM_get_flags(const X509_VERIFY_PARAM *param);
 
  int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
  int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
@@ -37,7 +37,7 @@ X509_VERIFY_PARAM_set_flags, X509_VERIFY_PARAM_clear_flags, X509_VERIFY_PARAM_ge
                                  const char *name, size_t namelen);
  void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
                                       unsigned int flags);
- char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *param);
+ const char *X509_VERIFY_PARAM_get0_peername(const X509_VERIFY_PARAM *param);
  int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
                                  const char *email, size_t emaillen);
  int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
diff --git a/doc/ssl/SSL_set1_host.pod b/doc/ssl/SSL_set1_host.pod
index 3339a0e..d254fe7 100644
--- a/doc/ssl/SSL_set1_host.pod
+++ b/doc/ssl/SSL_set1_host.pod
@@ -12,7 +12,7 @@ SSL server verification parameters
  int SSL_set1_host(SSL *s, const char *hostname);
  int SSL_add1_host(SSL *s, const char *hostname);
  void SSL_set_hostflags(SSL *s, unsigned int flags);
- const char *SSL_get0_peername(SSL *s);
+ const char *SSL_get0_peername(const SSL *s);
 
 =head1 DESCRIPTION
 
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index af6d9b5..1fcdbd2 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -1493,7 +1493,7 @@ __owur int SSL_set_trust(SSL *s, int trust);
 
 __owur int SSL_set1_host(SSL *s, const char *hostname);
 __owur int SSL_add1_host(SSL *s, const char *hostname);
-__owur const char *SSL_get0_peername(SSL *s);
+__owur const char *SSL_get0_peername(const SSL *s);
 void SSL_set_hostflags(SSL *s, unsigned int flags);
 
 __owur int SSL_CTX_dane_enable(SSL_CTX *ctx);
diff --git a/include/openssl/x509_vfy.h b/include/openssl/x509_vfy.h
index cab8005..12984f0 100644
--- a/include/openssl/x509_vfy.h
+++ b/include/openssl/x509_vfy.h
@@ -453,7 +453,7 @@ int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,
                                 unsigned long flags);
 int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
                                   unsigned long flags);
-unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
+unsigned long X509_VERIFY_PARAM_get_flags(const X509_VERIFY_PARAM *param);
 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
@@ -470,7 +470,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);
-char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *);
+const char *X509_VERIFY_PARAM_get0_peername(const 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,
                                  const char *email, size_t emaillen);
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index bd0fbf8..27a16ef 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -795,7 +795,7 @@ void SSL_set_hostflags(SSL *s, unsigned int flags)
     X509_VERIFY_PARAM_set_hostflags(s->param, flags);
 }
 
-const char *SSL_get0_peername(SSL *s)
+const char *SSL_get0_peername(const SSL *s)
 {
     return X509_VERIFY_PARAM_get0_peername(s->param);
 }


More information about the openssl-commits mailing list