From patchwork Tue Jul 14 12:51:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Bumiller X-Patchwork-Id: 495072 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A962A140761 for ; Tue, 14 Jul 2015 22:59:50 +1000 (AEST) Received: from localhost ([::1]:59532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEzoK-0003kC-FJ for incoming@patchwork.ozlabs.org; Tue, 14 Jul 2015 08:59:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEzo5-0003Ts-PE for qemu-devel@nongnu.org; Tue, 14 Jul 2015 08:59:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZEzo0-00029C-0w for qemu-devel@nongnu.org; Tue, 14 Jul 2015 08:59:33 -0400 Received: from proxmox.maurer-it.com ([94.136.31.133]:40897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZEznz-00025l-R5 for qemu-devel@nongnu.org; Tue, 14 Jul 2015 08:59:27 -0400 Received: from proxmox.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox.maurer-it.com (Proxmox) with ESMTP id 13662AD09E0 for ; Tue, 14 Jul 2015 14:51:44 +0200 (CEST) From: Wolfgang Bumiller To: qemu-devel@nongnu.org Date: Tue, 14 Jul 2015 14:51:40 +0200 Message-Id: <1436878300-13284-1-git-send-email-w.bumiller@proxmox.com> X-Mailer: git-send-email 2.1.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 94.136.31.133 Subject: [Qemu-devel] [PATCH] vnc: fix vnc client authentication X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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,