if (!grep { $what eq $_ } ( 'buildtest-c++', 'fips', 'threads', 'shared',
'module', 'pic', 'dynamic-engine', 'makedepend',
- 'zlib-dynamic', 'zlib', 'sse2', 'legacy' )) {
+ 'sse2', 'legacy' )) {
(my $WHAT = uc $what) =~ s|-|_|g;
my $skipdir = $what;
{"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"},
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
/* 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
base64 = 1;
break;
case OPT_Z:
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
do_zlib = 1;
#endif
break;
if (verbose)
BIO_printf(bio_err, "bufsize=%d\n", bsize);
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
if (do_zlib)
base64 = 0;
#endif
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;
BIO_free(b64);
EVP_MD_free(dgst);
EVP_CIPHER_free(cipher);
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
BIO_free(bzl);
#endif
BIO_free(bbrot);
#ifdef OPENSSL_NO_WHIRLPOOL
BIO_puts(bio_out, "WHIRLPOOL\n");
#endif
-#ifndef ZLIB
+#ifdef OPENSSL_NO_ZLIB
BIO_puts(bio_out, "ZLIB\n");
#endif
#ifdef OPENSSL_NO_BROTLI
) {
my $str = " {FT_cipher, \"$cmd\", enc_main, enc_options, NULL},\n";
(my $algo = $cmd) =~ s/-.*//g;
- if ($cmd eq "zlib") {
- print "#ifdef ZLIB\n${str}#endif\n";
- } elsif (grep { $algo eq $_ } @disablables) {
+ if (grep { $algo eq $_ } @disablables) {
print "#ifndef OPENSSL_NO_" . uc($algo) . "\n${str}#endif\n";
} elsif (my $disabler = $cipher_disabler{$algo}) {
print "#ifndef OPENSSL_NO_" . uc($disabler) . "\n${str}#endif\n";
#include <openssl/comp.h>
#include "cms_local.h"
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
/* CMS CompressedData Utilities */
case NID_pkcs7_digest:
cmsbio = ossl_cms_DigestedData_init_bio(cms);
break;
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
case NID_id_smime_ct_compressedData:
cmsbio = ossl_cms_CompressedData_init_bio(cms);
break;
return ret;
}
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
unsigned int flags)
NULL,
};
-#ifndef ZLIB
+#ifdef OPENSSL_NO_ZLIB
# undef ZLIB_SHARED
#else
{
COMP_METHOD *meth = &zlib_method_nozlib;
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
if (RUN_ONCE(&zlib_once, ossl_comp_zlib_init))
meth = &zlib_stateful_method;
#endif
#endif
}
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
/* Zlib based compression/decompression filter BIO */
bio_zlib_free,
bio_zlib_callback_ctrl
};
+#endif
const BIO_METHOD *BIO_f_zlib(void)
{
- return &bio_meth_zlib;
+#ifndef OPENSSL_NO_ZLIB
+ if (RUN_ONCE(&zlib_once, ossl_comp_zlib_init))
+ return &bio_meth_zlib;
+#endif
+ return NULL;
}
+#ifndef OPENSSL_NO_ZLIB
static int bio_zlib_new(BIO *bi)
{
BIO_ZLIB_CTX *ctx;
#endif
# ifdef OPENSSL_BIO_H
-# ifdef ZLIB
const BIO_METHOD *BIO_f_zlib(void);
-# endif
const BIO_METHOD *BIO_f_brotli(void);
const BIO_METHOD *BIO_f_zstd(void);
# endif
return do_bio_comp(BIO_f_brotli(), n);
}
#endif
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
static int test_zlib(int n)
{
return do_bio_comp(BIO_f_zlib(), n);
int setup_tests(void)
{
-#ifdef ZLIB
+#ifndef OPENSSL_NO_ZLIB
ADD_ALL_TESTS(test_zlib, NUM_SIZES * 4);
#endif
#ifndef OPENSSL_NO_BROTLI
TS_STATUS_INFO_free 2495 3_0_0 EXIST::FUNCTION:TS
BN_mod_mul 2496 3_0_0 EXIST::FUNCTION:
CMS_add0_recipient_key 2497 3_0_0 EXIST::FUNCTION:CMS
-BIO_f_zlib 2498 3_0_0 EXIST::FUNCTION:COMP,ZLIB
+BIO_f_zlib 2498 3_0_0 EXIST::FUNCTION:COMP
AES_cfb128_encrypt 2499 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0
ENGINE_set_EC 2500 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE
d2i_ECPKParameters 2501 3_0_0 EXIST::FUNCTION:EC