From: divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Date: Tue, 25 Aug 2015 01:27:49 +0000 (+0000)
Subject: Fix an annoying bug in the d0_blind_id protocol handling:
X-Git-Tag: xonotic-v0.8.1^0
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ca82c4fb3d5bfa7e802e7ff5bc1f50130db5bb4e;p=xonotic%2Fdarkplaces.git

Fix an annoying bug in the d0_blind_id protocol handling:

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
::stable-branch::merge=59aa859f4004bb78b28fafaac095af2e2cc34300
---

diff --git a/crypto.c b/crypto.c
index 6abaaa22..79489532 100644
--- 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)
 			{