I want to enable compression method on my TLS server developed using JSSE. I know it is not advisable to use compression method in server due to CRIME attacks, but for study(Analysis) purpose I need it. Please help!
-
this belongs on [sf]. make sure you mention what type of server. – Daniel A. White Sep 19 '16 at 10:46
-
@DanielA.White I disagree. It's actually a *de facto* development problem because just about zero off-the-shelf products installed with any OS implement TLS compression. You pretty much have to roll your own, even if that means something simple such as recompiling OpenSSL with compression enabled. – Andrew Henle Sep 19 '16 at 10:49
-
1@AndrewHenle the question changed look at the history – Daniel A. White Sep 19 '16 at 10:50
-
@DanielA.White Yes it did. The "JSSE" wasn't there. As far as I know, JSSE doesn't do compression. See https://en.wikipedia.org/wiki/Comparison_of_TLS_implementations#Compression – Andrew Henle Sep 19 '16 at 10:53
-
@Andrew Henle Thanks for your efforts – Anto Jerome Sep 19 '16 at 11:01
1 Answers
You can't. There is no indication of any support for TLS compression in the JSSE reference documentation, and the compression portion of the Wikipedia entry for TLS implementations specifically states that JSSE does not support compression.
The one reference to compression in the JSSE documentation does state you can provide your own compression implementation:
The sockets returned to the application can be subclasses of java.net.Socket (or javax.net.ssl.SSLSocket), so that they can directly expose new APIs for features such as compression, security, record marking, statistics collection, or firewall tunneling.
No out-of-the-box SSL/TLS implementation supports compression. You will have to compile your own. With OpenSSL, compression can be enabled with configure
options [enable-]comp
and [enable-]zlib[-dynamic]
. For example:
./configure enable-comp enable-zlib --prefix=/usr/local/openssl-1.0.2h ...
For OpenSSL, see https://wiki.openssl.org/index.php/Compilation_and_Installation

- 32,625
- 3
- 24
- 56