[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Wed Feb 17 18:35:53 UTC 2016


The branch master has been updated
       via  1288f26fb9c3cfe6c5919b706e30d3f0b2d55b0b (commit)
      from  c7c4625693e653b7b3cff726cd7946326c720841 (commit)


- Log -----------------------------------------------------------------
commit 1288f26fb9c3cfe6c5919b706e30d3f0b2d55b0b
Author: Rich Salz <rsalz at openssl.org>
Date:   Wed Feb 17 13:33:51 2016 -0500

    RT4310: Fix varous no-XXX builds
    
    When OPENSSL_NO_ASYNC is set, make ASYNC_{un,}block_pause() do nothing.
    This prevents md_rand.c from failing to build. Probably better to do it
    this way than to wrap every instance in an explicit #ifdef.
    
    A bunch of new socket code got added to a new file crypto/bio/b_addr.c.
    Make it all go away if OPENSSL_NO_SOCK is defined.
    
    Allow configuration with no-ripemd, no-ts, no-ui
    We use these for the UEFI build.
    
    Also remove the 'Really???' comment from no-err and no-locking. We use
    those too.
    
    We need to drop the crypto/engine directory from the build too, and also
    set OPENSSL_NO_ENGINE
    
    Signed-off-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Tim Hudson <tjh at openssl.org>

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

Summary of changes:
 Configure               | 15 +++++++++++----
 crypto/bio/b_addr.c     |  2 ++
 crypto/init.c           |  9 ++++++++-
 include/openssl/async.h |  7 +++++++
 4 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/Configure b/Configure
index bc75363..2ada702 100755
--- a/Configure
+++ b/Configure
@@ -269,12 +269,12 @@ my @disablables = (
     "ec_nistp_64_gcc_128",
     "egd",
     "engine",
-    "err",			# Really???
+    "err",
     "heartbeats",
     "hmac",
     "hw(-.+)?",
     "idea",
-    "locking",			# Really???
+    "locking",
     "md2",
     "md4",
     "md5",
@@ -292,6 +292,7 @@ my @disablables = (
     "rdrand",
     "rfc3779",
     "rijndael",			# Old AES name
+    "ripemd",
     "rmd160",
     "rsa",
     "scrypt",
@@ -310,6 +311,8 @@ my @disablables = (
     "stdio",
     "threads",
     "tls",
+    "ts",
+    "ui",
     "unit-test",
     "whirlpool",
     "zlib",
@@ -772,13 +775,17 @@ foreach (sort (keys %disabled))
 	elsif (/^sse2$/)
 		{ $no_sse2 = 1; }
 	elsif (/^engine$/)
-		{ @{$config{dirs}} = grep !/^engine$/, @{$config{dirs}}; }
+		{
+		@{$config{dirs}} = grep !/^engines$/, @{$config{dirs}};
+		@{$config{sdirs}} = grep !/^engine$/, @{$config{sdirs}};
+		push @{$config{openssl_other_defines}}, "OPENSSL_NO_ENGINE";
+		}
 	else
 		{
 		my ($ALGO, $algo);
 		($ALGO = $algo = $_) =~ tr/[\-a-z]/[_A-Z]/;
 
-		if (/^asm$/ || /^err$/ || /^hw$/ || /^hw-/ || /^async$/
+		if (/^asm$/ || /^err$/ || /^hw$/ || /^hw-/
 				|| /^autoalginit/ || /^autoerrinit/)
 			{
 			push @{$config{openssl_other_defines}}, "OPENSSL_NO_$ALGO";
diff --git a/crypto/bio/b_addr.c b/crypto/bio/b_addr.c
index e92876a..a46cf93 100644
--- a/crypto/bio/b_addr.c
+++ b/crypto/bio/b_addr.c
@@ -56,6 +56,7 @@
 
 #include "bio_lcl.h"
 
+#ifndef OPENSSL_NO_SOCK
 #include <openssl/err.h>
 #include <openssl/buffer.h>
 #include <ctype.h>
@@ -848,3 +849,4 @@ int BIO_lookup(const char *host, const char *service,
 
     return ret;
 }
+#endif /* OPENSSL_NO_SOCK */
diff --git a/crypto/init.c b/crypto/init.c
index c7eff8b..8775b82 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -62,7 +62,9 @@
 #include <internal/evp_int.h>
 #include <internal/conf.h>
 #include <internal/async.h>
+#ifndef OPENSSL_NO_ENGINE
 #include <internal/engine.h>
+#endif
 #include <openssl/comp.h>
 #include <internal/err.h>
 #include <stdlib.h>
@@ -372,6 +374,7 @@ static void ossl_init_no_config(void)
     config_inited = 1;
 }
 
+#ifndef OPENSSL_NO_ASYNC
 static OPENSSL_INIT_ONCE async = OPENSSL_INIT_ONCE_STATIC_INIT;
 static int async_inited = 0;
 static void ossl_init_async(void)
@@ -382,6 +385,7 @@ static void ossl_init_async(void)
     async_init();
     async_inited = 1;
 }
+#endif
 
 #ifndef OPENSSL_NO_ENGINE
 static int engine_inited = 0;
@@ -483,6 +487,7 @@ static void ossl_init_thread_stop(struct thread_local_inits_st *locals)
     if (locals == NULL)
         return;
 
+#ifndef OPENSSL_NO_ASYNC
     if (locals->async) {
 #ifdef OPENSSL_INIT_DEBUG
         fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: "
@@ -490,6 +495,7 @@ static void ossl_init_thread_stop(struct thread_local_inits_st *locals)
 #endif
         ASYNC_cleanup_thread();
     }
+#endif
 
     if (locals->err_state) {
 #ifdef OPENSSL_INIT_DEBUG
@@ -664,10 +670,11 @@ int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings)
         CRYPTO_w_unlock(CRYPTO_LOCK_INIT);
     }
 
+#ifndef OPENSSL_NO_ASYNC
     if (opts & OPENSSL_INIT_ASYNC) {
         ossl_init_once_run(&async, ossl_init_async);
     }
-
+#endif
 #ifndef OPENSSL_NO_ENGINE
     if (opts & OPENSSL_INIT_ENGINE_OPENSSL) {
         ossl_init_once_run(&engine_openssl, ossl_init_engine_openssl);
diff --git a/include/openssl/async.h b/include/openssl/async.h
index 8ec9b00..99d8075 100644
--- a/include/openssl/async.h
+++ b/include/openssl/async.h
@@ -53,6 +53,12 @@
 #ifndef HEADER_ASYNC_H
 # define HEADER_ASYNC_H
 
+#include <openssl/opensslconf.h>
+
+#ifdef OPENSSL_NO_ASYNC
+#define ASYNC_block_pause() do { ; } while(0)
+#define ASYNC_unblock_pause() do { ; } while(0)
+#else
 #include <stdlib.h>
 
 #if defined(_WIN32)
@@ -116,4 +122,5 @@ void ERR_load_ASYNC_strings(void);
 #ifdef  __cplusplus
 }
 #endif
+#endif /* OPENSSL_NO_ASYNC */
 #endif


More information about the openssl-commits mailing list