public interface CertificateCompressionAlgo
| Modifier and Type | Field and Description |
|---|---|
static int |
TLS_EXT_CERT_COMPRESSION_BROTLI |
static int |
TLS_EXT_CERT_COMPRESSION_ZLIB |
static int |
TLS_EXT_CERT_COMPRESSION_ZSTD |
| Modifier and Type | Method and Description |
|---|---|
int |
algorithmId()
Return the ID for the compression algorithm provided for by a given implementation.
|
byte[] |
compress(long ssl,
byte[] input)
Compress the given input with the specified algorithm and return the compressed bytes.
|
byte[] |
decompress(long ssl,
int uncompressedLen,
byte[] input)
Decompress the given input with the specified algorithm and return the decompressed bytes.
|
static final int TLS_EXT_CERT_COMPRESSION_ZLIB
static final int TLS_EXT_CERT_COMPRESSION_BROTLI
static final int TLS_EXT_CERT_COMPRESSION_ZSTD
byte[] compress(long ssl,
byte[] input)
throws Exception
ssl - the SSL instanceinput - the uncompressed form of the certificateException - thrown if an error occurs while compressingbyte[] decompress(long ssl,
int uncompressedLen,
byte[] input)
throws Exception
Implementations SHOULD bound the memory usage when decompressing the CompressedCertificate message.
Implementations MUST limit the size of the resulting decompressed chain to the specified uncompressedLen,
and they MUST abort the connection (throw an exception) if the size of the output of the decompression
function exceeds that limit.
ssl - the SSL instanceuncompressedLen - the expected length of the uncompressed certificateinput - the compressed form of the certificateException - thrown if an error occurs while decompressing or output
size exceeds uncompressedLenint algorithmId()
TLS_EXT_CERT_COMPRESSION_ZLIBTLS_EXT_CERT_COMPRESSION_BROTLITLS_EXT_CERT_COMPRESSION_ZSTD
Copyright © 2022. All rights reserved.