=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/openssl/enc.c,v retrieving revision 1.27 retrieving revision 1.28 diff -c -r1.27 -r1.28 *** src/usr.bin/openssl/enc.c 2023/03/06 14:32:06 1.27 --- src/usr.bin/openssl/enc.c 2023/06/11 05:45:20 1.28 *************** *** 1,4 **** ! /* $OpenBSD: enc.c,v 1.27 2023/03/06 14:32:06 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * --- 1,4 ---- ! /* $OpenBSD: enc.c,v 1.28 2023/06/11 05:45:20 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * *************** *** 80,88 **** char *bufsize; const EVP_CIPHER *cipher; int debug; - #ifdef ZLIB - int do_zlib; - #endif int enc; char *hiv; char *hkey; --- 80,85 ---- *************** *** 287,301 **** .type = OPTION_FLAG, .opt.flag = &cfg.verbose, }, - #ifdef ZLIB { - .name = "z", - .desc = "Perform zlib compression/decompression", - .type = OPTION_FLAG, - .opt.flag = &cfg.do_zlib, - }, - #endif - { .name = NULL, .type = OPTION_ARGV_FUNC, .opt.argvfunc = enc_opt_cipher, --- 284,290 ---- *************** *** 349,357 **** int ret = 1, inl; unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH]; unsigned char salt[PKCS5_SALT_LEN]; - #ifdef ZLIB - BIO *bzl = NULL; - #endif EVP_CIPHER_CTX *ctx = NULL; const EVP_MD *dgst = NULL; BIO *in = NULL, *out = NULL, *b64 = NULL, *benc = NULL; --- 338,343 ---- *************** *** 374,393 **** if (strcmp(pname, "base64") == 0) cfg.base64 = 1; - #ifdef ZLIB - if (strcmp(pname, "zlib") == 0) - cfg.do_zlib = 1; - #endif - cfg.cipher = EVP_get_cipherbyname(pname); - #ifdef ZLIB - if (!cfg.do_zlib && !cfg.base64 && - cfg.cipher == NULL && strcmp(pname, "enc") != 0) - #else if (!cfg.base64 && cfg.cipher == NULL && strcmp(pname, "enc") != 0) - #endif { BIO_printf(bio_err, "%s is an unknown cipher\n", pname); goto end; --- 360,369 ---- *************** *** 561,577 **** rbio = in; wbio = out; - #ifdef ZLIB - if (do_zlib) { - if ((bzl = BIO_new(BIO_f_zlib())) == NULL) - goto end; - if (enc) - wbio = BIO_push(bzl, wbio); - else - rbio = BIO_push(bzl, rbio); - } - #endif - if (cfg.base64) { if ((b64 = BIO_new(BIO_f_base64())) == NULL) goto end; --- 537,542 ---- *************** *** 787,795 **** BIO_free_all(out); BIO_free(benc); BIO_free(b64); - #ifdef ZLIB - BIO_free(bzl); - #endif free(pass); return (ret); --- 752,757 ----