]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fix an annoying bug in the d0_blind_id protocol handling:
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 25 Aug 2015 01:27:49 +0000 (01:27 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 25 Aug 2015 01:27:49 +0000 (01:27 +0000)
If a server uses the protocol but is not signed, the code previously did
not let a client connect to the server more than once per instance.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12226 d7cf8633-e32d-0410-b094-e92efae38249

crypto.c

index 6abaaa220719ed20c96728530953c696bed78b67..79489532947c073eda3aa86e71c494db88825a85 100644 (file)
--- a/crypto.c
+++ b/crypto.c
@@ -2492,7 +2492,7 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
                        }
 
                        // cache the server key
-                       Crypto_StoreHostKey(&cls.connect_address, va(vabuf, sizeof(vabuf), "%d %s@%s", crypto->use_aes ? 1 : 0, crypto->server_idfp, pubkeys_fp64[CDATA->s]), false);
+                       Crypto_StoreHostKey(&cls.connect_address, va(vabuf, sizeof(vabuf), "%d %s@%s%s", crypto->use_aes ? 1 : 0, crypto->server_idfp, crypto->server_issigned ? "" : "~", pubkeys_fp64[CDATA->s]), false);
 
                        if(CDATA->c >= 0)
                        {