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>
"ec_nistp_64_gcc_128",
"egd",
"engine",
"ec_nistp_64_gcc_128",
"egd",
"engine",
"heartbeats",
"hmac",
"hw(-.+)?",
"idea",
"heartbeats",
"hmac",
"hw(-.+)?",
"idea",
"rdrand",
"rfc3779",
"rijndael", # Old AES name
"rdrand",
"rfc3779",
"rijndael", # Old AES name
"rmd160",
"rsa",
"scrypt",
"rmd160",
"rsa",
"scrypt",
"stdio",
"threads",
"tls",
"stdio",
"threads",
"tls",
"unit-test",
"whirlpool",
"zlib",
"unit-test",
"whirlpool",
"zlib",
elsif (/^sse2$/)
{ $no_sse2 = 1; }
elsif (/^engine$/)
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]/;
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";
|| /^autoalginit/ || /^autoerrinit/)
{
push @{$config{openssl_other_defines}}, "OPENSSL_NO_$ALGO";
#include <openssl/err.h>
#include <openssl/buffer.h>
#include <ctype.h>
#include <openssl/err.h>
#include <openssl/buffer.h>
#include <ctype.h>
+#endif /* OPENSSL_NO_SOCK */
#include <internal/evp_int.h>
#include <internal/conf.h>
#include <internal/async.h>
#include <internal/evp_int.h>
#include <internal/conf.h>
#include <internal/async.h>
+#ifndef OPENSSL_NO_ENGINE
#include <internal/engine.h>
#include <internal/engine.h>
#include <openssl/comp.h>
#include <internal/err.h>
#include <stdlib.h>
#include <openssl/comp.h>
#include <internal/err.h>
#include <stdlib.h>
+#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)
static OPENSSL_INIT_ONCE async = OPENSSL_INIT_ONCE_STATIC_INIT;
static int async_inited = 0;
static void ossl_init_async(void)
async_init();
async_inited = 1;
}
async_init();
async_inited = 1;
}
#ifndef OPENSSL_NO_ENGINE
static int engine_inited = 0;
#ifndef OPENSSL_NO_ENGINE
static int engine_inited = 0;
if (locals == NULL)
return;
if (locals == NULL)
return;
+#ifndef OPENSSL_NO_ASYNC
if (locals->async) {
#ifdef OPENSSL_INIT_DEBUG
fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: "
if (locals->async) {
#ifdef OPENSSL_INIT_DEBUG
fprintf(stderr, "OPENSSL_INIT: ossl_init_thread_stop: "
#endif
ASYNC_cleanup_thread();
}
#endif
ASYNC_cleanup_thread();
}
if (locals->err_state) {
#ifdef OPENSSL_INIT_DEBUG
if (locals->err_state) {
#ifdef OPENSSL_INIT_DEBUG
CRYPTO_w_unlock(CRYPTO_LOCK_INIT);
}
CRYPTO_w_unlock(CRYPTO_LOCK_INIT);
}
+#ifndef OPENSSL_NO_ASYNC
if (opts & OPENSSL_INIT_ASYNC) {
ossl_init_once_run(&async, ossl_init_async);
}
if (opts & OPENSSL_INIT_ASYNC) {
ossl_init_once_run(&async, ossl_init_async);
}
#ifndef OPENSSL_NO_ENGINE
if (opts & OPENSSL_INIT_ENGINE_OPENSSL) {
ossl_init_once_run(&engine_openssl, ossl_init_engine_openssl);
#ifndef OPENSSL_NO_ENGINE
if (opts & OPENSSL_INIT_ENGINE_OPENSSL) {
ossl_init_once_run(&engine_openssl, ossl_init_engine_openssl);
#ifndef HEADER_ASYNC_H
# define HEADER_ASYNC_H
#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)
#include <stdlib.h>
#if defined(_WIN32)
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
}
#endif
+#endif /* OPENSSL_NO_ASYNC */