summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-02-09 09:39:07 +0000
committerMatt Caswell <matt@openssl.org>2016-02-09 15:11:38 +0000
commit498abff0ae907dce08f37a1353976755e8c8120e (patch)
tree523033d5c005cbe95a4c56c57c8f25a5f452932b /crypto
parent71567a6f418ed1dc42d4c5ec57f72d3119b75966 (diff)
Add an OPENSSL_NO_AUTOERRINIT option
This option disables automatic loading of the crypto/ssl error strings in order to keep statically linked executable file size down Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/init.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/init.c b/crypto/init.c
index 856b06afdd..bce8438b95 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -282,7 +282,11 @@ static void ossl_init_no_load_crypto_strings(void)
static void ossl_init_load_crypto_strings(void)
{
-#ifndef OPENSSL_NO_ERR
+ /*
+ * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
+ * pulling in all the error strings during static linking
+ */
+#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
# ifdef OPENSSL_INIT_DEBUG
fprintf(stderr, "OPENSSL_INIT: ossl_init_load_crypto_strings: "
"err_load_crypto_strings_intern()\n");