From patchwork Thu Mar 12 09:00:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 449353 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 B8E0E1400DD for ; Thu, 12 Mar 2015 20:17:19 +1100 (AEDT) Received: from localhost ([::1]:58777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVzEz-0002iz-LO for incoming@patchwork.ozlabs.org; Thu, 12 Mar 2015 05:17:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVzEd-00023A-RM for qemu-devel@nongnu.org; Thu, 12 Mar 2015 05:16:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVzEc-0003ed-RA for qemu-devel@nongnu.org; Thu, 12 Mar 2015 05:16:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVzEc-0003eV-IX for qemu-devel@nongnu.org; Thu, 12 Mar 2015 05:16:54 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2C9GoqK009226 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Mar 2015 05:16:50 -0400 Received: from nilsson.home.kraxel.org (ovpn-116-36.ams2.redhat.com [10.36.116.36]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2C90UYV026896; Thu, 12 Mar 2015 05:00:30 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id CC93980AE6; Thu, 12 Mar 2015 10:00:29 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 12 Mar 2015 10:00:22 +0100 Message-Id: <1426150825-782-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1426150825-782-1-git-send-email-kraxel@redhat.com> References: <1426150825-782-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann , Anthony Liguori Subject: [Qemu-devel] [PULL 4/7] ui: fix regression in x509verify parameter for VNC server 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 From: "Daniel P. Berrange" The 'x509verify' parameter is documented as taking a path to the x509 certificates, ie the same syntax as the 'x509' parameter. commit 4db14629c38611061fc19ec6927405923de84f08 Author: Gerd Hoffmann Date: Tue Sep 16 12:33:03 2014 +0200 vnc: switch to QemuOpts, allow multiple servers caused a regression by turning 'x509verify' into a boolean parameter instead. This breaks setup from libvirt and is not consistent with the docs. Signed-off-by: Daniel P. Berrange Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index db8409b..b514777 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3303,7 +3303,7 @@ static QemuOptsList qemu_vnc_opts = { .type = QEMU_OPT_BOOL, },{ .name = "x509verify", - .type = QEMU_OPT_BOOL, + .type = QEMU_OPT_STRING, },{ .name = "acl", .type = QEMU_OPT_BOOL, @@ -3410,9 +3410,14 @@ void vnc_display_open(const char *id, Error **errp) #ifdef CONFIG_VNC_TLS tls = qemu_opt_get_bool(opts, "tls", false); path = qemu_opt_get(opts, "x509"); + if (!path) { + path = qemu_opt_get(opts, "x509verify"); + if (path) { + vs->tls.x509verify = true; + } + } if (path) { x509 = true; - vs->tls.x509verify = qemu_opt_get_bool(opts, "x509verify", false); if (vnc_tls_set_x509_creds_dir(vs, path) < 0) { error_setg(errp, "Failed to find x509 certificates/keys in %s", path);