summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDaniel P. Berrange2015-11-20 17:15:42 +0100
committerDaniel P. Berrange2015-12-23 12:02:20 +0100
commit50de6261510301d586f0411b3fdb11e4cd4fdb52 (patch)
tree4b2973fe12c3308d85bc898408ac46aa0b132a8f /crypto
parentcrypto: ensure qapi/crypto.json is listed in qapi-modules (diff)
downloadqemu-50de6261510301d586f0411b3fdb11e4cd4fdb52.tar.gz
qemu-50de6261510301d586f0411b3fdb11e4cd4fdb52.tar.xz
qemu-50de6261510301d586f0411b3fdb11e4cd4fdb52.zip
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')
-rw-r--r--crypto/cipher.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/cipher.c b/crypto/cipher.c
index a24677c97f..7c333486d2 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;