mirror of https://github.com/apache/cloudstack.git
Fix VNC SecurityType None on RFB v3.8 (#7287)
This commit is contained in:
parent
aa881f6bf3
commit
b8bc0b3e13
|
|
@ -200,7 +200,7 @@ public class ConsoleProxyNoVncClient implements ConsoleProxyClient {
|
|||
client.processHandshakeSecurityType(secType, getClientHostPassword(),
|
||||
getClientHostAddress(), getClientHostPort());
|
||||
|
||||
client.processSecurityResultMsg(secType);
|
||||
client.processSecurityResultMsg();
|
||||
byte[] securityResultToClient = new byte[] { 0, 0, 0, 0 };
|
||||
sendMessageToVNCClient(securityResultToClient, 4);
|
||||
client.setWaitForNoVnc(true);
|
||||
|
|
|
|||
|
|
@ -472,18 +472,13 @@ public class NoVncClient {
|
|||
return new Pair<>(result, message);
|
||||
}
|
||||
|
||||
public void processSecurityResultMsg(int securityType) {
|
||||
public void processSecurityResultMsg() {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
s_logger.debug("Processing security result message");
|
||||
}
|
||||
|
||||
int result;
|
||||
if (securityType == RfbConstants.NO_AUTH) {
|
||||
result = RfbConstants.VNC_AUTH_OK;
|
||||
} else {
|
||||
nioSocketConnection.waitForBytesAvailableForReading(1);
|
||||
result = nioSocketConnection.readUnsignedInteger(32);
|
||||
}
|
||||
nioSocketConnection.waitForBytesAvailableForReading(1);
|
||||
int result = nioSocketConnection.readUnsignedInteger(32);
|
||||
|
||||
Pair<Boolean, String> securityResultType = processSecurityResultType(result);
|
||||
boolean success = BooleanUtils.toBoolean(securityResultType.first());
|
||||
|
|
|
|||
Loading…
Reference in New Issue