]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - crypto.c
Fix SolutionDir)) typo in Debug builds using VS2012 and VS2013 projects, thanks to...
[xonotic/darkplaces.git] / crypto.c
index 63988031386e5cbc12db7572773141cfb5ef4326..79489532947c073eda3aa86e71c494db88825a85 100644 (file)
--- a/crypto.c
+++ b/crypto.c
@@ -2127,11 +2127,11 @@ int Crypto_ClientParsePacket(const char *data_in, size_t len_in, char *data_out,
                int wantserverid = -1;
 
                // these three are harmless
-               if(string[4] == CCREP_SERVER_INFO)
+               if((unsigned char) string[4] == CCREP_SERVER_INFO)
                        return CRYPTO_NOMATCH;
-               if(string[4] == CCREP_PLAYER_INFO)
+               if((unsigned char) string[4] == CCREP_PLAYER_INFO)
                        return CRYPTO_NOMATCH;
-               if(string[4] == CCREP_RULE_INFO)
+               if((unsigned char) string[4] == CCREP_RULE_INFO)
                        return CRYPTO_NOMATCH;
 
                Crypto_RetrieveHostKey(&cls.connect_address, &wantserverid, NULL, 0, NULL, 0, NULL, NULL);
@@ -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)
                        {