[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Tue Apr 25 13:45:32 UTC 2017


The branch master has been updated
       via  d88ab353d3f94031d56d2d6451695eac305c9738 (commit)
       via  a5eef31e257bc6267e0973edda18ee2f180ed081 (commit)
      from  208d721a004026b128dc66300e32e65a9dc7df1d (commit)


- Log -----------------------------------------------------------------
commit d88ab353d3f94031d56d2d6451695eac305c9738
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Apr 25 15:35:41 2017 +0200

    Correct some badly formated preprocessor lines
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3304)

commit a5eef31e257bc6267e0973edda18ee2f180ed081
Author: Richard Levitte <levitte at openssl.org>
Date:   Tue Apr 25 15:35:09 2017 +0200

    Add guards around one of use of IPPROTO_SCTP where it was missing
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3304)

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

Summary of changes:
 apps/s_server.c         | 12 +++++++-----
 crypto/srp/srp_vfy.c    |  4 ++--
 test/dtlsv1listentest.c |  2 +-
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/apps/s_server.c b/apps/s_server.c
index 7fb7772..d842fb8 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -2125,11 +2125,11 @@ static int sv_body(int s, int stype, int prot, unsigned char *context)
     struct timeval *timeoutp;
 #endif
 #ifndef OPENSSL_NO_DTLS
- #ifndef OPENSSL_NO_SCTP
+# ifndef OPENSSL_NO_SCTP
     int isdtls = (stype == SOCK_DGRAM || prot == IPPROTO_SCTP);
- #else
+# else
     int isdtls = (stype == SOCK_DGRAM);
- #endif
+# endif
 #endif
 
     buf = app_malloc(bufsize, "server buffer");
@@ -2163,11 +2163,11 @@ static int sv_body(int s, int stype, int prot, unsigned char *context)
     }
 #ifndef OPENSSL_NO_DTLS
     if (isdtls) {
-#ifndef OPENSSL_NO_SCTP
+# ifndef OPENSSL_NO_SCTP
         if (prot == IPPROTO_SCTP)
             sbio = BIO_new_dgram_sctp(s, BIO_NOCLOSE);
         else
-#endif
+# endif
             sbio = BIO_new_dgram(s, BIO_NOCLOSE);
 
         if (enable_timeouts) {
@@ -2199,10 +2199,12 @@ static int sv_body(int s, int stype, int prot, unsigned char *context)
             /* want to do MTU discovery */
             BIO_ctrl(sbio, BIO_CTRL_DGRAM_MTU_DISCOVER, 0, NULL);
 
+# ifndef OPENSSL_NO_SCTP
         if (prot != IPPROTO_SCTP) {
             /* Turn on cookie exchange. Not necessary for SCTP */
             SSL_set_options(con, SSL_OP_COOKIE_EXCHANGE);
         }
+# endif
     } else
 #endif
         sbio = BIO_new_socket(s, BIO_NOCLOSE);
diff --git a/crypto/srp/srp_vfy.c b/crypto/srp/srp_vfy.c
index 29b7afc..20e4258 100644
--- a/crypto/srp/srp_vfy.c
+++ b/crypto/srp/srp_vfy.c
@@ -474,7 +474,7 @@ static SRP_user_pwd *find_user(SRP_VBASE *vb, char *username)
     return NULL;
 }
 
- #if OPENSSL_API_COMPAT < 0x10100000L
+# if OPENSSL_API_COMPAT < 0x10100000L
 /*
  * DEPRECATED: use SRP_VBASE_get1_by_user instead.
  * This method ignores the configured seed and fails for an unknown user.
@@ -485,7 +485,7 @@ SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username)
 {
     return find_user(vb, username);
 }
-#endif
+# endif
 
 /*
  * Ownership of the returned pointer is released to the caller.
diff --git a/test/dtlsv1listentest.c b/test/dtlsv1listentest.c
index 91d78e1..dfbc7ae 100644
--- a/test/dtlsv1listentest.c
+++ b/test/dtlsv1listentest.c
@@ -13,7 +13,7 @@
 #include <openssl/err.h>
 #include <openssl/conf.h>
 #ifndef OPENSSL_NO_ENGINE
- #include <openssl/engine.h>
+# include <openssl/engine.h>
 #endif
 #include "e_os.h"
 


More information about the openssl-commits mailing list