From: Wolfgang Bumiller Date: Tue, 14 Jul 2015 12:51:40 +0000 (+0200) Subject: vnc: fix vnc client authentication X-Git-Tag: v2.4.0-rc1~11^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a16951375f7669b7faf27f72ca753e25325c5179;p=thirdparty%2Fqemu.git vnc: fix vnc client authentication Commit 800567a61 updated the code to the generic crypto API and mixed up encrypt and decrypt functions in procotol_client_auth_vnc. (Used to be: deskey(key, EN0) which encrypts, and was changed to qcrypto_cipher_decrypt in 800567a61.) Changed it to qcrypto_cipher_encrypt now. Signed-off-by: Wolfgang Bumiller Signed-off-by: Gerd Hoffmann --- diff --git a/ui/vnc.c b/ui/vnc.c index 94e4f19a60e..1483958c454 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2551,7 +2551,7 @@ static int protocol_client_auth_vnc(VncState *vs, uint8_t *data, size_t len) goto reject; } - if (qcrypto_cipher_decrypt(cipher, + if (qcrypto_cipher_encrypt(cipher, vs->challenge, response, VNC_AUTH_CHALLENGE_SIZE,