Expand description
Certificate compression and decompression support
This crate supports compression and decompression everywhere certificates are used, in accordance with RFC8879.
Note that this is only supported for TLS1.3 connections.
§Getting started
Build this crate with the brotli
and/or zlib
crate features. This
adds dependencies on these crates. They are used by default if enabled.
We especially recommend brotli
as it has the widest deployment so far.
§Custom compression/decompression implementations
- Implement the
CertCompressor
and/orCertDecompressor
traits - Provide those to:
ClientConfig::cert_compressors
orServerConfig::cert_compressors
.ClientConfig::cert_decompressors
orServerConfig::cert_decompressors
.
These are used in these circumstances:
Peer | Client authentication | Server authentication |
---|---|---|
Client | ClientConfig::cert_compressors | ClientConfig::cert_decompressors |
Server | ServerConfig::cert_decompressors | ServerConfig::cert_compressors |
Structs§
- Compression
Cache Inner std
- Innards of an enabled CompressionCache.
- Compression
Failed - A content-less error for when
CertCompressor::compress
fails. - Decompression
Failed - A content-less error for when
CertDecompressor::decompress
fails.
Enums§
- Compression
Cache - An LRU cache for compressions.
- Compression
Level - A hint for how many resources to dedicate to a compression.
Traits§
- Cert
Compressor - An available certificate compression algorithm.
- Cert
Decompressor - An available certificate decompression algorithm.
Functions§
- default_
cert_ compressors - Returns the supported
CertCompressor
implementations enabled by crate features. - default_
cert_ decompressors - Returns the supported
CertDecompressor
implementations enabled by crate features.