diff options
author | Pierre Ossman <ossman@cendio.se> | 2022-08-18 14:33:48 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2022-08-18 16:25:59 +0200 |
commit | 5671072dfe109193bbd2570d95882480c7aea011 (patch) | |
tree | d262eb2abe0f78d1343e9ebaab821ecb11518309 /tests | |
parent | 084030fe68b137e20043d112e7876e0094b4d761 (diff) | |
download | novnc-5671072dfe109193bbd2570d95882480c7aea011.tar.gz |
Expect security result for RFB 3.7
The cut off was wrong here. 3.7 will send a security result, but not a
security reason. It also fixes the issue that < 3.7 (e.g. 3.3) supports
VNC authentication as well.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.rfb.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test.rfb.js b/tests/test.rfb.js index 2b9d5e7..4f16861 100644 --- a/tests/test.rfb.js +++ b/tests/test.rfb.js @@ -1144,7 +1144,7 @@ describe('Remote Frame Buffer Protocol Client', function () { const authSchemes = [2, 1, 3]; client._sock._websocket._receiveData(new Uint8Array(authSchemes)); expect(client._rfbAuthScheme).to.equal(1); - expect(client._sock).to.have.sent(new Uint8Array([1, 1])); + expect(client._sock).to.have.sent(new Uint8Array([1])); }); it('should choose for the most prefered scheme possible for versions >= 3.7', function () { @@ -1209,15 +1209,15 @@ describe('Remote Frame Buffer Protocol Client', function () { 'Security negotiation failed on authentication scheme (reason: Whoopsies)'); }); - it('should transition straight to SecurityResult on "no auth" (1) for versions >= 3.8', function () { - client._rfbVersion = 3.8; + it('should transition straight to SecurityResult on "no auth" (1) for versions >= 3.7', function () { + client._rfbVersion = 3.7; sendSecurity(1, client); expect(client._rfbInitState).to.equal('SecurityResult'); }); - it('should transition straight to ServerInitialisation on "no auth" for versions < 3.8', function () { - client._rfbVersion = 3.7; - sendSecurity(1, client); + it('should transition straight to ServerInitialisation on "no auth" for versions < 3.7', function () { + client._rfbVersion = 3.6; + client._sock._websocket._receiveData(new Uint8Array([0, 0, 0, 1])); expect(client._rfbInitState).to.equal('ServerInitialisation'); }); |