Skip to content

Commit

Permalink
Explicit disable support of SSL / TLS Compression
Browse files Browse the repository at this point in the history
Motivation:

Our ReferenceCountedOpenSslEngine does not support compression so we should explicit disable it.
This is related to netty#3722.

Modifications:

Set SSL_OP_NO_COMPRESSION option.

Result:

Not use compression.
  • Loading branch information
normanmaurer committed Dec 16, 2016
1 parent cd458f1 commit 89cb50a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ public String run() {
SSLContext.setOptions(ctx, SSL.SSL_OP_SINGLE_ECDH_USE);
SSLContext.setOptions(ctx, SSL.SSL_OP_SINGLE_DH_USE);
SSLContext.setOptions(ctx, SSL.SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION);

// We do not support compression as the moment so we should explicitly disable it.
SSLContext.setOptions(ctx, SSL.SSL_OP_NO_COMPRESSION);

// Disable ticket support by default to be more inline with SSLEngineImpl of the JDK.
// This also let SSLSession.getId() work the same way for the JDK implementation and the OpenSSLEngine.
// If tickets are supported SSLSession.getId() will only return an ID on the server-side if it could
Expand Down

0 comments on commit 89cb50a

Please sign in to comment.