Skip to content

Commit 6ad088e

Browse files
committed
Fixed signature issue & allocation size
1 parent fd18634 commit 6ad088e

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

MLAPI/Data/NetworkConfig.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,6 @@ public class NetworkConfig
119119
/// Wheter or not to enable scene switching
120120
/// </summary>
121121
public bool EnableSceneSwitching = false;
122-
/// <summary>
123-
/// The RSA Keysize to use
124-
/// </summary>
125-
public int RSAKeySize = 2048;
126122

127123
private byte[] ConfigHash = null;
128124
/// <summary>

MLAPI/MonoBehaviours/Core/NetworkingManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ private void HandleApproval(int clientId, bool approved)
15301530
{
15311531
rsa.PersistKeyInCsp = false;
15321532
rsa.FromXmlString(NetworkConfig.RSAPrivateKey);
1533-
publicKeySignature = rsa.SignData(publicKeySignature, new SHA512CryptoServiceProvider());
1533+
publicKeySignature = rsa.SignData(publicKey, new SHA512CryptoServiceProvider());
15341534
}
15351535
}
15361536
}
@@ -1555,7 +1555,7 @@ private void HandleApproval(int clientId, bool approved)
15551555
if (NetworkConfig.HandleObjectSpawning)
15561556
{
15571557
sizeOfStream += 4;
1558-
sizeOfStream += 14 * amountOfObjectsToSend;
1558+
sizeOfStream += 38 * amountOfObjectsToSend;
15591559
}
15601560

15611561
if (NetworkConfig.EnableEncryption)

0 commit comments

Comments
 (0)