Navigation Menu

Skip to content

Commit

Permalink
8293657: sun/management/jmxremote/bootstrap/RmiBootstrapTest.java#id1…
Browse files Browse the repository at this point in the history
… failed with "SSLHandshakeException: Remote host terminated the handshake"

Reviewed-by: kevinw, dfuchs
  • Loading branch information
jaikiran committed Sep 23, 2022
1 parent a4dc035 commit f6d78cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -27,7 +27,6 @@

import java.lang.System.Logger;
import java.lang.System.Logger.Level;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
Expand Down Expand Up @@ -924,9 +923,6 @@ public ServerSocket createServerSocket(int port) throws IOException {
private static class HostAwareSslSocketFactory extends SslRMIServerSocketFactory {

private final String bindAddress;
private final String[] enabledCipherSuites;
private final String[] enabledProtocols;
private final boolean needClientAuth;
private final SSLContext context;

private HostAwareSslSocketFactory(String[] enabledCipherSuites,
Expand All @@ -941,11 +937,9 @@ private HostAwareSslSocketFactory(SSLContext ctx,
String[] enabledProtocols,
boolean sslNeedClientAuth,
String bindAddress) throws IllegalArgumentException {
this.context = ctx;
super(ctx, enabledCipherSuites, enabledProtocols, sslNeedClientAuth);
this.bindAddress = bindAddress;
this.enabledProtocols = enabledProtocols;
this.enabledCipherSuites = enabledCipherSuites;
this.needClientAuth = sslNeedClientAuth;
this.context = ctx;
checkValues(ctx, enabledCipherSuites, enabledProtocols);
}

Expand All @@ -955,14 +949,15 @@ public ServerSocket createServerSocket(int port) throws IOException {
try {
InetAddress addr = InetAddress.getByName(bindAddress);
return new SslServerSocket(port, 0, addr, context,
enabledCipherSuites, enabledProtocols, needClientAuth);
this.getEnabledCipherSuites(), this.getEnabledProtocols(),
this.getNeedClientAuth());
} catch (UnknownHostException e) {
return new SslServerSocket(port, context,
enabledCipherSuites, enabledProtocols, needClientAuth);
this.getEnabledCipherSuites(), this.getEnabledProtocols(), this.getNeedClientAuth());
}
} else {
return new SslServerSocket(port, context,
enabledCipherSuites, enabledProtocols, needClientAuth);
this.getEnabledCipherSuites(), this.getEnabledProtocols(), this.getNeedClientAuth());
}
}

Expand Down
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Expand Up @@ -524,7 +524,6 @@ java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java 8247426 generic-
sun/management/jdp/JdpDefaultsTest.java 8241865 linux-aarch64,macosx-all
sun/management/jdp/JdpJmxRemoteDynamicPortTest.java 8241865 macosx-all
sun/management/jdp/JdpSpecificAddressTest.java 8241865 macosx-all
sun/management/jmxremote/bootstrap/RmiBootstrapTest.java#id1 8293657 linux-x64

############################################################################

Expand Down
@@ -1,5 +1,5 @@
com.sun.management.jmxremote.ssl.enabled.cipher.suites=TLS_DHE_DSS_WITH_AES_128_GCM_SHA256
com.sun.management.jmxremote.ssl.enabled.cipher.suites=TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA
com.sun.management.jmxremote.ssl.enabled.protocols=SSLv2Hello,SSLv3,TLSv1
com.sun.management.jmxremote.ssl.need.client.auth=true
com.sun.management.jmxremote.authenticate=false
javax.rmi.ssl.client.enabledCipherSuites=TLS_DHE_DSS_WITH_AES_128_GCM_SHA256
javax.rmi.ssl.client.enabledCipherSuites=TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA

1 comment on commit f6d78cd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.