[openssl-commits] [openssl] master update

Andy Polyakov appro at openssl.org
Fri Jul 20 11:41:02 UTC 2018


The branch master has been updated
       via  f20aa69e33a7b418e052cf210374e2267cb93a5c (commit)
       via  f36e9f1183b4c4947d3c71d4c31a541b96c6e3f8 (commit)
       via  89310b8b0f4dbe207ffd9056109fad9abab6e4d4 (commit)
       via  756c91b163e7d4b117590e2cb7632fbfd8cd0bda (commit)
       via  d1e19404ceab92084eeab9e9f319009fbd9e1002 (commit)
      from  d8434cf85691f32a17dcdfed6e81769a001074dd (commit)


- Log -----------------------------------------------------------------
commit f20aa69e33a7b418e052cf210374e2267cb93a5c
Author: Andy Polyakov <appro at openssl.org>
Date:   Thu Jul 19 15:28:34 2018 +0200

    crypto/*: address standard-compilance nits.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    (Merged from https://github.com/openssl/openssl/pull/6745)

commit f36e9f1183b4c4947d3c71d4c31a541b96c6e3f8
Author: Andy Polyakov <appro at openssl.org>
Date:   Thu Jul 19 15:27:24 2018 +0200

    bio/bss_dgram.c: harmonize usage of OPENSSL_USE_IPV6 with the rest.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    (Merged from https://github.com/openssl/openssl/pull/6745)

commit 89310b8b0f4dbe207ffd9056109fad9abab6e4d4
Author: Andy Polyakov <appro at openssl.org>
Date:   Thu Jul 19 15:16:38 2018 +0200

    include/openssl/e_os2.h: define last-resort SSIZE_MAX.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    (Merged from https://github.com/openssl/openssl/pull/6745)

commit 756c91b163e7d4b117590e2cb7632fbfd8cd0bda
Author: Andy Polyakov <appro at openssl.org>
Date:   Thu Jul 19 14:45:06 2018 +0200

    ec/ec_lcl.h: fix pre-C9x compilation problems.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    (Merged from https://github.com/openssl/openssl/pull/6745)

commit d1e19404ceab92084eeab9e9f319009fbd9e1002
Author: Andy Polyakov <appro at openssl.org>
Date:   Thu Jul 19 12:30:26 2018 +0200

    .travis.yml: exercise -std=c89 in order to catch corresponding problems.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    (Merged from https://github.com/openssl/openssl/pull/6745)

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

Summary of changes:
 .travis.yml                |  2 +-
 crypto/bio/bss_dgram.c     |  2 +-
 crypto/conf/conf_def.c     |  6 +++++-
 crypto/ec/ec_lcl.h         | 18 +++++++++---------
 crypto/store/loader_file.c |  6 +++++-
 crypto/ui/ui_openssl.c     |  2 +-
 include/openssl/e_os2.h    |  2 ++
 7 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 34ccf80..51fd563 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,7 +27,7 @@ compiler:
 env:
     - CONFIG_OPTS="" DESTDIR="_install"
     - CONFIG_OPTS="no-asm -Werror --debug no-afalgeng no-shared enable-crypto-mdebug enable-rc5 enable-md2"
-    - CONFIG_OPTS="no-asm no-makedepend --strict-warnings" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes"
+    - CONFIG_OPTS="no-asm no-makedepend --strict-warnings -std=c89 -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" GENERATE="yes"
 
 matrix:
     include:
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index 424109c..d5fe5bb 100644
--- a/crypto/bio/bss_dgram.c
+++ b/crypto/bio/bss_dgram.c
@@ -364,7 +364,7 @@ static long dgram_get_mtu_overhead(bio_dgram_data *data)
          */
         ret = 28;
         break;
-# ifdef AF_INET6
+# if OPENSSL_USE_IPV6
     case AF_INET6:
         {
 #  ifdef IN6_IS_ADDR_V4MAPPED
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index 7340a91..676540c 100644
--- a/crypto/conf/conf_def.c
+++ b/crypto/conf/conf_def.c
@@ -27,6 +27,10 @@
 # endif
 #endif
 
+#ifndef S_ISDIR
+# define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR)
+#endif
+
 /*
  * The maximum length we can grow a value to after variable expansion. 64k
  * should be more than enough for all reasonable uses.
@@ -656,7 +660,7 @@ static BIO *process_include(char *include, OPENSSL_DIR_CTX **dirctx,
         return NULL;
     }
 
-    if ((st.st_mode & S_IFDIR) == S_IFDIR) {
+    if (S_ISDIR(st.st_mode)) {
         if (*dirctx != NULL) {
             CONFerr(CONF_F_PROCESS_INCLUDE,
                     CONF_R_RECURSIVE_DIRECTORY_INCLUDE);
diff --git a/crypto/ec/ec_lcl.h b/crypto/ec/ec_lcl.h
index 8b16971..217392e 100644
--- a/crypto/ec/ec_lcl.h
+++ b/crypto/ec/ec_lcl.h
@@ -681,9 +681,9 @@ int ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r,
 
 int ec_point_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx);
 
-static inline int ec_point_ladder_pre(const EC_GROUP *group,
-                                      EC_POINT *r, EC_POINT *s,
-                                      EC_POINT *p, BN_CTX *ctx)
+static ossl_inline int ec_point_ladder_pre(const EC_GROUP *group,
+                                           EC_POINT *r, EC_POINT *s,
+                                           EC_POINT *p, BN_CTX *ctx)
 {
     if (group->meth->ladder_pre != NULL)
         return group->meth->ladder_pre(group, r, s, p, ctx);
@@ -695,9 +695,9 @@ static inline int ec_point_ladder_pre(const EC_GROUP *group,
     return 1;
 }
 
-static inline int ec_point_ladder_step(const EC_GROUP *group,
-                                       EC_POINT *r, EC_POINT *s,
-                                       EC_POINT *p, BN_CTX *ctx)
+static ossl_inline int ec_point_ladder_step(const EC_GROUP *group,
+                                            EC_POINT *r, EC_POINT *s,
+                                            EC_POINT *p, BN_CTX *ctx)
 {
     if (group->meth->ladder_step != NULL)
         return group->meth->ladder_step(group, r, s, p, ctx);
@@ -710,9 +710,9 @@ static inline int ec_point_ladder_step(const EC_GROUP *group,
 
 }
 
-static inline int ec_point_ladder_post(const EC_GROUP *group,
-                                       EC_POINT *r, EC_POINT *s,
-                                       EC_POINT *p, BN_CTX *ctx)
+static ossl_inline int ec_point_ladder_post(const EC_GROUP *group,
+                                            EC_POINT *r, EC_POINT *s,
+                                            EC_POINT *p, BN_CTX *ctx)
 {
     if (group->meth->ladder_post != NULL)
         return group->meth->ladder_post(group, r, s, p, ctx);
diff --git a/crypto/store/loader_file.c b/crypto/store/loader_file.c
index 25ada81..632e451 100644
--- a/crypto/store/loader_file.c
+++ b/crypto/store/loader_file.c
@@ -35,6 +35,10 @@
 # define stat    _stat
 #endif
 
+#ifndef S_ISDIR
+# define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR)
+#endif
+
 /*-
  *  Password prompting
  *  ------------------
@@ -839,7 +843,7 @@ static OSSL_STORE_LOADER_CTX *file_open(const OSSL_STORE_LOADER *loader,
         return NULL;
     }
 
-    if ((st.st_mode & S_IFDIR) == S_IFDIR) {
+    if (S_ISDIR(st.st_mode)) {
         /*
          * Try to copy everything, even if we know that some of them must be
          * NULL for the moment.  This prevents errors in the future, when more
diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c
index 9f13c14..45d4820 100644
--- a/crypto/ui/ui_openssl.c
+++ b/crypto/ui/ui_openssl.c
@@ -43,7 +43,7 @@
  * If unistd.h defines _POSIX_VERSION, we conclude that we are on a POSIX
  * system and have sigaction and termios.
  */
-#  if defined(_POSIX_VERSION)
+#  if defined(_POSIX_VERSION) && _POSIX_VERSION>=199309L
 
 #   define SIGACTION
 #   if !defined(TERMIOS) && !defined(TERMIO) && !defined(SGTTY)
diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h
index be0ee20..eeae215 100644
--- a/include/openssl/e_os2.h
+++ b/include/openssl/e_os2.h
@@ -216,6 +216,8 @@ extern "C" {
 #   define OSSL_SSIZE_MAX SSIZE_MAX
 #  elif defined(_POSIX_SSIZE_MAX)
 #   define OSSL_SSIZE_MAX _POSIX_SSIZE_MAX
+#  else
+#   define OSSL_SSIZE_MAX ((ssize_t)(SIZE_MAX>>1))
 #  endif
 # endif
 


More information about the openssl-commits mailing list