SSH: Fix decryption in CBC mode

Two function call arguments got switched around. Their types, while
looking different, were in fact just aliases for the same underlying
type, so this was not detected by the compiler.

Fixes: QTCREATORBUG-21387
Change-Id: I631d37634501759e37bfc594656f569c4ff1aa72
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Christian Kandeler
2018-10-25 15:06:15 +02:00
parent 93269f3ecd
commit 4c82dd6d12

View File

@@ -423,7 +423,7 @@ Keyed_Filter *SshDecryptionFacility::makeCipherMode(BlockCipher *cipher, Mode mo
{ {
switch (mode) { switch (mode) {
case CbcMode: case CbcMode:
return get_cipher(cipher->name() + "/CBC/NoPadding", iv, key, DECRYPTION); return get_cipher(cipher->name() + "/CBC/NoPadding", key, iv, DECRYPTION);
case CtrMode: case CtrMode:
return makeCtrCipherMode(cipher, iv, key); return makeCtrCipherMode(cipher, iv, key);
} }