Skip to content

Commit

Permalink
Use default SslContextFactory excludes for weak ciphers and protocols (
Browse files Browse the repository at this point in the history
…openhab#1241)

To prevent weak cipher/protocol warnings it's better to not customize the default excluded ciphers and protocols.
The MD5 ciphers have already been excluded by default since Jetty 9.3.11.v20160721.

Fixes openhab#1064

Signed-off-by: Wouter Born <[email protected]>
GitOrigin-RevId: c50766d
  • Loading branch information
wborn authored and splatch committed Jul 11, 2023
1 parent 02d3b3f commit 3d6afc1
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,6 @@ private SslContextFactory createSslContextFactoryFromExtensibleTrustManager() {
} catch (NoSuchAlgorithmException | KeyManagementException ex) {
throw new HttpClientInitializationException("Cannot create an TLS context!", ex);
}
// Exclude weak / insecure ciphers
sslContextFactory.addExcludeCipherSuites("^.*_(MD5|SHA|SHA1)$");
// Exclude ciphers that don't support forward secrecy
sslContextFactory.addExcludeCipherSuites("^TLS_RSA_.*$");
return sslContextFactory;
}

Expand All @@ -416,8 +412,6 @@ private SslContextFactory createSslContextFactoryFromTrustManagerProvider(@Nulla
}
}

String excludeCipherSuites[] = { "^.*_(MD5)$" };
sslContextFactory.setExcludeCipherSuites(excludeCipherSuites);
return sslContextFactory;
}

Expand Down

0 comments on commit 3d6afc1

Please sign in to comment.