#endif
int do_brotli = 0;
BIO *bbrot = NULL;
+ int do_zstd = 0;
+ BIO *bzstd = NULL;
/* first check the command name */
if (strcmp(argv[0], "base64") == 0)
#ifndef OPENSSL_NO_BROTLI
else if (strcmp(argv[0], "brotli") == 0)
do_brotli = 1;
+#endif
+#ifndef OPENSSL_NO_ZSTD
+ else if (strcmp(argv[0], "zstd") == 0)
+ do_zstd = 1;
#endif
else if (strcmp(argv[0], "enc") != 0)
ciphername = argv[0];
#endif
if (do_brotli)
base64 = 0;
+ if (do_zstd)
+ base64 = 0;
if (base64) {
if (enc)
else
rbio = BIO_push(bbrot, rbio);
}
+
+ if (do_zstd) {
+ if ((bzstd = BIO_new(BIO_f_zstd())) == NULL)
+ goto end;
+ if (debug) {
+ BIO_set_callback_ex(bzstd, BIO_debug_callback_ex);
+ BIO_set_callback_arg(bzstd, (char *)bio_err);
+ }
+ if (enc)
+ wbio = BIO_push(bzstd, wbio);
+ else
+ rbio = BIO_push(bzstd, rbio);
+ }
#endif
if (base64) {
BIO_free(bzl);
#endif
BIO_free(bbrot);
+ BIO_free(bzstd);
release_engine(e);
OPENSSL_free(pass);
return ret;