]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix a bug in handling "accept" for crypto connections
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 25 Nov 2011 11:50:28 +0000 (11:50 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 25 Nov 2011 11:50:28 +0000 (11:50 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11568 d7cf8633-e32d-0410-b094-e92efae38249

crypto.c

index 2847e048b2bfd18c578e66834cd2c5af51b6cd75..e503102ec94564a8e5efe8c557602bd65bb1ac74 100644 (file)
--- a/crypto.c
+++ b/crypto.c
@@ -2017,7 +2017,7 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
        {
                int wantserverid = -1;
                Crypto_RetrieveHostKey(&cls.connect_address, &wantserverid, NULL, 0, NULL, 0, NULL);
-               //if(!crypto || !crypto->authenticated)
+               if(!crypto || !crypto->authenticated) // we ALSO get here if we are using an encrypted connection, so let's rule this out
                {
                        if(wantserverid >= 0)
                                return Crypto_ClientError(data_out, len_out, "Server tried an unauthenticated connection even though a host key is present");