Received: from eggs.gnu.org ([2001:4830:134:3::10]:54764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZF0RL-0006c7-MD for qemu-devel@nongnu.org; Tue, 14 Jul 2015 09:40:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZF0RG-0008B2-1t for qemu-devel@nongnu.org; Tue, 14 Jul 2015 09:40:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZF0RF-0008A7-Te for qemu-devel@nongnu.org; Tue, 14 Jul 2015 09:40:01 -0400 From: Gerd Hoffmann Date: Tue, 14 Jul 2015 15:39:56 +0200 Message-Id: <1436881196-16444-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1436881196-16444-1-git-send-email-kraxel@redhat.com> References: <1436881196-16444-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 1/1] vnc: fix vnc client authentication List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Wolfgang Bumiller , Gerd Hoffmann From: Wolfgang Bumiller 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 --- ui/vnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vnc.c b/ui/vnc.c index 94e4f19..1483958 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, -- 1.8.3.1