Today I encountered errors like "bad package size" which is related to connection handshake. When I tried stepping into the source code, I found the following suspicious bug -
In KeyExchange.cs, please see this part.
this._clientCipherInfo = session.ConnectionInfo.Encryptions[clientEncryptionAlgorithmName];
_____this._serverCipherInfo = session.ConnectionInfo.Encryptions[clientEncryptionAlgorithmName];_____
this._clientHashInfo = session.ConnectionInfo.HmacAlgorithms[clientHmacAlgorithmName];
this._serverHashInfo = session.ConnectionInfo.HmacAlgorithms[serverHmacAlgorithmName];
this._compressionType = session.ConnectionInfo.CompressionAlgorithms[compressionAlgorithmName];
this._decompressionType = session.ConnectionInfo.CompressionAlgorithms[decompressionAlgorithmName
I think the highlighted line should be
_____this._serverCipherInfo = session.ConnectionInfo.Encryptions[serverDecryptionAlgorithmName];_____
This change has fixed my issue. I guess some encryption problems that other people were complaining are actually due to this typo.
Please have a check.
Thank you.
Comments: ** Comment from web user: drieseng **
In KeyExchange.cs, please see this part.
this._clientCipherInfo = session.ConnectionInfo.Encryptions[clientEncryptionAlgorithmName];
_____this._serverCipherInfo = session.ConnectionInfo.Encryptions[clientEncryptionAlgorithmName];_____
this._clientHashInfo = session.ConnectionInfo.HmacAlgorithms[clientHmacAlgorithmName];
this._serverHashInfo = session.ConnectionInfo.HmacAlgorithms[serverHmacAlgorithmName];
this._compressionType = session.ConnectionInfo.CompressionAlgorithms[compressionAlgorithmName];
this._decompressionType = session.ConnectionInfo.CompressionAlgorithms[decompressionAlgorithmName
I think the highlighted line should be
_____this._serverCipherInfo = session.ConnectionInfo.Encryptions[serverDecryptionAlgorithmName];_____
This change has fixed my issue. I guess some encryption problems that other people were complaining are actually due to this typo.
Please have a check.
Thank you.
Comments: ** Comment from web user: drieseng **
This is fixed in changeset 34811.
Thanks for reporting the issue, and taking the time to find the cause.