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
CertCompressorand/orCertDecompressortraits - Provide those to:
ClientConfig::cert_compressorsorServerConfig::cert_compressors.ClientConfig::cert_decompressorsorServerConfig::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 - Innards of an enabled CompressionCache.
- Compression
Failed - A content-less error for when
CertCompressor::compressfails. - Decompression
Failed - A content-less error for when
CertDecompressor::decompressfails.
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
CertCompressorimplementations enabled by crate features. - default_
cert_ decompressors - Returns the supported
CertDecompressorimplementations enabled by crate features.