public interface OpenSslCertificateCompressionAlgorithm
| 限定符和类型 | 方法和说明 |
|---|---|
int |
algorithmId()
Return the ID for the compression algorithm provided for by a given implementation.
|
byte[] |
compress(javax.net.ssl.SSLEngine engine,
byte[] uncompressedCertificate)
Compress the given input with the specified algorithm and return the compressed bytes.
|
byte[] |
decompress(javax.net.ssl.SSLEngine engine,
int uncompressedLen,
byte[] compressedCertificate)
Decompress the given input with the specified algorithm and return the decompressed bytes.
|
byte[] compress(javax.net.ssl.SSLEngine engine,
byte[] uncompressedCertificate)
throws java.lang.Exception
engine - the SSLEngineuncompressedCertificate - the uncompressed certificatejava.lang.Exception - thrown if an error occurs while compressingbyte[] decompress(javax.net.ssl.SSLEngine engine,
int uncompressedLen,
byte[] compressedCertificate)
throws java.lang.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.
engine - the SSLEngineuncompressedLen - the expected length of the decompressed certificate that will be returned.compressedCertificate - the compressed form of the certificatejava.lang.Exception - thrown if an error occurs while decompressing or output size exceeds
uncompressedLenint algorithmId()