Top Description Methods
io.netty5.handler.ssl

public Interface OpenSslCertificateCompressionAlgorithm

Imports
javax.net.ssl.SSLEngine

Provides compression and decompression implementations for TLS Certificate Compression (RFC 8879).

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

compression algorithm ID as specified by RFC8879.
algorithmId
()

Return the ID for the compression algorithm provided for by a given implementation.

public byte[]

Returns:

the compressed form of the certificate
compress
(SSLEngine engine, byte[]
the uncompressed certificate
uncompressedCertificate
)

Compress the given input with the specified algorithm and return the compressed bytes.

public byte[]

Returns:

the decompressed form of the certificate
decompress
(SSLEngine engine, int
the expected length of the decompressed certificate that will be returned.
uncompressedLen
,
byte[]
the compressed form of the certificate
compressedCertificate
)

Decompress the given input with the specified algorithm and return the decompressed bytes.

Method Detail

algorithmIdback to summary
public int algorithmId()

Return the ID for the compression algorithm provided for by a given implementation.

Returns:int

compression algorithm ID as specified by RFC8879.

compressback to summary
public byte[] compress(SSLEngine engine, byte[] uncompressedCertificate) throws Exception

Compress the given input with the specified algorithm and return the compressed bytes.

Parameters
engine:SSLEngine

the SSLEngine

uncompressedCertificate:byte[]

the uncompressed certificate

Returns:byte[]

the compressed form of the certificate

Exceptions
Exception:
thrown if an error occurs while compressing
decompressback to summary
public byte[] decompress(SSLEngine engine, int uncompressedLen, byte[] compressedCertificate) throws Exception

Decompress the given input with the specified algorithm and return the decompressed bytes.

Implementation Security Considerations

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.

Parameters
engine:SSLEngine

the SSLEngine

uncompressedLen:int

the expected length of the decompressed certificate that will be returned.

compressedCertificate:byte[]

the compressed form of the certificate

Returns:byte[]

the decompressed form of the certificate

Exceptions
Exception:
thrown if an error occurs while decompressing or output size exceeds uncompressedLen