When GetCredential() callback is not set, don't use authentications requiring it.

The auth methods that employ Getcredential() will only be used if the client's
GetCredential callback is actually set.
pull/1/head
Christian Beier 11 years ago
parent 14c8943c92
commit 27b4372c94
  1. 4
      libvncclient/rfbproto.c

@ -569,8 +569,8 @@ ReadSupportedSecurityType(rfbClient* client, uint32_t *result, rfbBool subAuth)
rfbClientLog("%d) Received security type %d\n", loop, tAuth[loop]);
if (flag) continue;
if (tAuth[loop]==rfbVncAuth || tAuth[loop]==rfbNoAuth ||
tAuth[loop]==rfbARD ||
(!subAuth && (tAuth[loop]==rfbTLS || tAuth[loop]==rfbVeNCrypt)))
(tAuth[loop]==rfbARD && client->GetCredential) ||
(!subAuth && (tAuth[loop]==rfbTLS || (tAuth[loop]==rfbVeNCrypt && client->GetCredential))))
{
if (!subAuth && client->clientAuthSchemes)
{

Loading…
Cancel
Save