summaryrefslogtreecommitdiff
path: root/apps/enc.c
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2022-08-17 17:36:27 -0400
committerTodd Short <todd.short@me.com>2022-10-18 09:30:21 -0400
commit59d21298df9176b64b41cc8583c7024f7f5895d4 (patch)
tree6819e56eb1a1916dd85950bb210c27b9904e9859 /apps/enc.c
parentcaf9317d7d75213990014e07048384be15688889 (diff)
downloadopenssl-new-59d21298df9176b64b41cc8583c7024f7f5895d4.tar.gz
Convert ZLIB defines to OPENSSL_NO_ZLIB
Use the normal OPENSSL_NO_ prefix to enable/disable ZLIB Make `BIO_f_zlib()` always available. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18186)
Diffstat (limited to 'apps/enc.c')
-rw-r--r--apps/enc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/enc.c b/apps/enc.c
index cbeaeaa8aa..3a55d72c7a 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -91,7 +91,7 @@ const OPTIONS enc_options[] = {
{"iter", OPT_ITER, 'p', "Specify the iteration count and force use of PBKDF2"},
{"pbkdf2", OPT_PBKDF2, '-', "Use password-based key derivation function 2"},
{"none", OPT_NONE, '-', "Don't encrypt"},
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
{"z", OPT_Z, '-', "Compress or decompress encrypted data using zlib"},
#endif
{"", OPT_CIPHER, '-', "Any supported cipher"},
@@ -130,7 +130,7 @@ int enc_main(int argc, char **argv)
int streamable = 1;
int wrap = 0;
struct doall_enc_ciphers dec;
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
int do_zlib = 0;
BIO *bzl = NULL;
#endif
@@ -142,7 +142,7 @@ int enc_main(int argc, char **argv)
/* first check the command name */
if (strcmp(argv[0], "base64") == 0)
base64 = 1;
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
else if (strcmp(argv[0], "zlib") == 0)
do_zlib = 1;
#endif
@@ -225,7 +225,7 @@ int enc_main(int argc, char **argv)
base64 = 1;
break;
case OPT_Z:
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
do_zlib = 1;
#endif
break;
@@ -332,7 +332,7 @@ int enc_main(int argc, char **argv)
if (verbose)
BIO_printf(bio_err, "bufsize=%d\n", bsize);
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
if (do_zlib)
base64 = 0;
#endif
@@ -417,7 +417,7 @@ int enc_main(int argc, char **argv)
wbio = out;
#ifndef OPENSSL_NO_COMP
-# ifdef ZLIB
+# ifndef OPENSSL_NO_ZLIB
if (do_zlib) {
if ((bzl = BIO_new(BIO_f_zlib())) == NULL)
goto end;
@@ -699,7 +699,7 @@ int enc_main(int argc, char **argv)
BIO_free(b64);
EVP_MD_free(dgst);
EVP_CIPHER_free(cipher);
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
BIO_free(bzl);
#endif
BIO_free(bbrot);