]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/comp/c_zstd.c
Add support for compressed certificates (RFC8879)
[thirdparty/openssl.git] / crypto / comp / c_zstd.c
index 99d326219e2e0408205c8cb297649a6b9dca843b..15b826c589075185b672c1dd0956eb4f19ef5508 100644 (file)
@@ -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