summaryrefslogtreecommitdiffstats
path: root/crypto/cipher.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2015-11-20 16:15:42 +0000
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:21 -0600
commitf6adf87c0d62f494e5c8e45503259476e5cc9123 (patch)
treee38fe31ba7e6e349d0659d4c3942ac3f891aa095 /crypto/cipher.c
parent40f707d9331ff38a526e2a3e47a4be630dbbb59f (diff)
downloadhqemu-f6adf87c0d62f494e5c8e45503259476e5cc9123.zip
hqemu-f6adf87c0d62f494e5c8e45503259476e5cc9123.tar.gz
crypto: fix transposed arguments in cipher error message
When reporting an incorrect key length for a cipher, we mixed up the actual vs expected arguments. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'crypto/cipher.c')
-rw-r--r--crypto/cipher.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cipher.c b/crypto/cipher.c
index a24677c..7c33348 100644
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -89,7 +89,7 @@ qcrypto_cipher_validate_key_length(QCryptoCipherAlgorithm alg,
if (alg_key_len[alg] != nkey) {
error_setg(errp, "Cipher key length %zu should be %zu",
- alg_key_len[alg], nkey);
+ nkey, alg_key_len[alg]);
return false;
}
return true;
OpenPOWER on IntegriCloud