summaryrefslogtreecommitdiffstats
path: root/crypto/comp
diff options
context:
space:
mode:
authorTodd Short <tshort@akamai.com>2021-08-09 22:56:50 +0200
committerTodd Short <todd.short@me.com>2022-10-18 15:30:22 +0200
commitb67cb09f8ddf258cf326f3e7b20be095fb53457c (patch)
treeb31a978e8c71e972e84fd03b4de92491deff032a /crypto/comp
parentConvert ZLIB defines to OPENSSL_NO_ZLIB (diff)
downloadopenssl-b67cb09f8ddf258cf326f3e7b20be095fb53457c.tar.xz
openssl-b67cb09f8ddf258cf326f3e7b20be095fb53457c.zip
Add support for compressed certificates (RFC8879)
* Compressed Certificate extension (server/client) * Server certificates (send/receive) * Client certificate (send/receive) 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 'crypto/comp')
-rw-r--r--crypto/comp/c_brotli.c6
-rw-r--r--crypto/comp/c_zstd.c6
-rw-r--r--crypto/comp/comp_err.c4
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),