Added some asserts.

These were intended to track down a msyterious failure that was only
affecting certain players.  It turned out to be this:
https://github.com/openssl/openssl/issues/3241
This commit is contained in:
Fletcher Dunn
2019-09-02 13:37:49 -07:00
parent e9b367fbf6
commit 149e95117e
2 changed files with 7 additions and 0 deletions
@@ -735,6 +735,7 @@ void CSteamNetworkConnectionBase::CertRequestFailed( ESteamNetConnectionEnd nCon
bool CSteamNetworkConnectionBase::BRecvCryptoHandshake( const CMsgSteamDatagramCertificateSigned &msgCert, const CMsgSteamDatagramSessionCryptInfoSigned &msgSessionInfo, bool bServer )
{
SteamDatagramTransportLock::AssertHeldByCurrentThread();
SteamNetworkingErrMsg errMsg;
// Have we already done key exchange?
@@ -280,6 +280,12 @@ static void CertStore_OneTimeInit()
PublicKey *pKey = new PublicKey;
pKey->SlamHardcodedRootCA();
uint64 nKeyID = pKey->CalculateKeyID();
// Make sure calculated ID matches what we expect!
char checkID[64];
V_sprintf_safe( checkID, "ID%llu", (unsigned long long)nKeyID );
AssertFatal( V_stristr( STEAMNETWORKINGSOCKETS_HARDCODED_ROOT_CA_KEY, checkID ) != NULL );
s_mapPublicKeys.Insert( nKeyID, pKey );
}
#endif