aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/init.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-02-17 13:33:51 -0500
committerRich Salz <rsalz@openssl.org>2016-02-17 13:33:51 -0500
commit1288f26fb9c3cfe6c5919b706e30d3f0b2d55b0b (patch)
treecc6dbb9d0b81e76f68355b94ffe08f724e8e54f7 /crypto/init.c
parentc7c4625693e653b7b3cff726cd7946326c720841 (diff)
downloadopenssl-1288f26fb9c3cfe6c5919b706e30d3f0b2d55b0b.tar.gz
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@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/init.c')
-rw-r--r--crypto/init.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/crypto/init.c b/crypto/init.c
index c7eff8ba4a..8775b82a22 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);