From 498abff0ae907dce08f37a1353976755e8c8120e Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 9 Feb 2016 09:39:07 +0000 Subject: 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 --- crypto/init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crypto') 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"); -- cgit v1.2.3