diff options
Diffstat (limited to 'crypto/comp')
-rw-r--r-- | crypto/comp/c_brotli.c | 6 | ||||
-rw-r--r-- | crypto/comp/c_zstd.c | 6 | ||||
-rw-r--r-- | crypto/comp/comp_err.c | 4 |
3 files changed, 6 insertions, 10 deletions
diff --git a/crypto/comp/c_brotli.c b/crypto/comp/c_brotli.c index ace6f221b8..377ea2b8d0 100644 --- a/crypto/comp/c_brotli.c +++ b/crypto/comp/c_brotli.c @@ -419,10 +419,10 @@ static const BIO_METHOD bio_meth_brotli = { const BIO_METHOD *BIO_f_brotli(void) { #ifndef OPENSSL_NO_BROTLI - return &bio_meth_brotli; -#else - return NULL; + if (RUN_ONCE(&brotli_once, ossl_comp_brotli_init)) + return &bio_meth_brotli; #endif + return NULL; } #ifndef OPENSSL_NO_BROTLI diff --git a/crypto/comp/c_zstd.c b/crypto/comp/c_zstd.c index 99d326219e..15b826c589 100644 --- a/crypto/comp/c_zstd.c +++ b/crypto/comp/c_zstd.c @@ -481,10 +481,10 @@ static const BIO_METHOD bio_meth_zstd = { const BIO_METHOD *BIO_f_zstd(void) { #ifndef OPENSSL_NO_ZSTD - return &bio_meth_zstd; -#else - return NULL; + if (RUN_ONCE(&zstd_once, ossl_comp_zstd_init)) + return &bio_meth_zstd; #endif + return NULL; } #ifndef OPENSSL_NO_ZSTD diff --git a/crypto/comp/comp_err.c b/crypto/comp/comp_err.c index 10a9e66860..2345da693e 100644 --- a/crypto/comp/comp_err.c +++ b/crypto/comp/comp_err.c @@ -19,12 +19,8 @@ static const ERR_STRING_DATA COMP_str_reasons[] = { {ERR_PACK(ERR_LIB_COMP, 0, COMP_R_BROTLI_DECODE_ERROR), "brotli decode error"}, - {ERR_PACK(ERR_LIB_COMP, 0, COMP_R_BROTLI_DEFLATE_ERROR), - "brotli deflate error"}, {ERR_PACK(ERR_LIB_COMP, 0, COMP_R_BROTLI_ENCODE_ERROR), "brotli encode error"}, - {ERR_PACK(ERR_LIB_COMP, 0, COMP_R_BROTLI_INFLATE_ERROR), - "brotli inflate error"}, {ERR_PACK(ERR_LIB_COMP, 0, COMP_R_BROTLI_NOT_SUPPORTED), "brotli not supported"}, {ERR_PACK(ERR_LIB_COMP, 0, COMP_R_ZLIB_DEFLATE_ERROR), |