mirror of
https://github.com/apache/rocketmq.git
synced 2026-08-30 18:10:44 +08:00
[ISSUE #7042] maven-compile job failed, Because TlsTest's serverRejectsSSLClient test case will throw TooLongFrameException (#7179)
This commit is contained in:
@@ -502,7 +502,7 @@ public class NettyRemotingServer extends NettyRemotingAbstract implements Remoti
|
||||
case DISABLED:
|
||||
ctx.close();
|
||||
log.warn("Clients intend to establish an SSL connection while this server is running in SSL disabled mode");
|
||||
break;
|
||||
throw new UnsupportedOperationException("The NettyRemotingServer in SSL disabled mode doesn't support ssl client");
|
||||
case PERMISSIVE:
|
||||
case ENFORCING:
|
||||
if (null != sslContext) {
|
||||
|
||||
@@ -144,8 +144,13 @@ public class TlsTest {
|
||||
tlsClientKeyPath = "";
|
||||
tlsClientCertPath = "";
|
||||
clientConfig.setUseTLS(false);
|
||||
} else if ("serverRejectsSSLClient".equals(name.getMethodName())) {
|
||||
} else if ("disabledServerRejectsSSLClient".equals(name.getMethodName())) {
|
||||
tlsMode = TlsMode.DISABLED;
|
||||
} else if ("disabledServerAcceptUnAuthClient".equals(name.getMethodName())) {
|
||||
tlsMode = TlsMode.DISABLED;
|
||||
tlsClientKeyPath = "";
|
||||
tlsClientCertPath = "";
|
||||
clientConfig.setUseTLS(false);
|
||||
} else if ("reloadSslContextForServer".equals(name.getMethodName())) {
|
||||
tlsClientAuthServer = false;
|
||||
tlsServerNeedClientAuth = "none";
|
||||
@@ -211,7 +216,7 @@ public class TlsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serverRejectsSSLClient() throws Exception {
|
||||
public void disabledServerRejectsSSLClient() throws Exception {
|
||||
try {
|
||||
RemotingCommand response = remotingClient.invokeSync(getServerAddress(), createRequest(), 1000 * 5);
|
||||
failBecauseExceptionWasNotThrown(RemotingSendRequestException.class);
|
||||
@@ -219,6 +224,11 @@ public class TlsTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void disabledServerAcceptUnAuthClient() throws Exception {
|
||||
requestThenAssertResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that a server configured to require client authentication refuses to accept connections
|
||||
* from a client that has an untrusted certificate.
|
||||
|
||||
Reference in New Issue
Block a user