Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove TLSv1 as default protocol FIX https://github.com/OpenIdentityPlatform/OpenDJ/issues/298 #303

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public final class SSLContextBuilder {

private TrustManager trustManager;
private KeyManager keyManager;
private String protocol = PROTOCOL_TLS1_2;
private String protocol = PROTOCOL_TLS;
private SecureRandom random;

/** These are mutually exclusive. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private void startConnectorNoClientCertificate() throws Exception
: SelectableCertificateKeyManager.wrap(provider.getKeyManagers(), nicknames);
}

SSLContext ctx = SSLContext.getInstance("TLSv1");
SSLContext ctx = SSLContext.getInstance("TLS");
ctx.init(
keyManagers,
null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public class SSLConnectionFactory
}
catch (NoSuchAlgorithmException ex)
{
logger.trace("Unable to retrieve default TLS protocols of the JVM, defaulting to TLSv1", ex);
protocols = Arrays.asList(SSLContextBuilder.PROTOCOL_TLS1);
logger.trace("Unable to retrieve default TLS protocols of the JVM, defaulting to TLS", ex);
protocols = Arrays.asList(SSLContextBuilder.PROTOCOL_TLS);
}
TLS_PROTOCOLS = protocols.toArray(new String[protocols.size()]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public RemoteConnection(String host, int port, boolean secure) throws Exception

private Socket getSslSocket(String host, int port) throws Exception
{
SSLContext sslCtx = SSLContext.getInstance("TLSv1");
SSLContext sslCtx = SSLContext.getInstance("TLS");
TrustManager[] tm = new TrustManager[] { new BlindTrustManager() };
sslCtx.init(null, tm, new SecureRandom());
SSLSocketFactory socketFactory = sslCtx.getSocketFactory();
Expand Down