From nobody Mon Sep 8 17:12:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1752840399; cv=none; d=zohomail.com; s=zohoarc; b=NckDivIJ9BtBnPg6z5CdfuWXFugs2hLis2cTD27Dzo+OkGLU1LXJw5hRhiVYVfk2EkyMbf65xwsNj70Qnv5X1DirfqY0Ig5fgS3LoYOWiUpWULM+76vrkNZBSnFLnoVuiIJHuNyU8uHAob9T8W8GqXtcy+jlA9q6vD6gfKIdws8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752840399; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=A7f9UwuIerCZOJ0+ZlYkGeCjLbIcMKt9GOrsFlJ4iUg=; b=BZ41ojEfhY6i2K30y6PRR1sjlCjNvlUVEL34ZJXyQnslHF6UXFiT8PqbGcdEKbVdCEwQilzaKWGxBPw2/x7leIiEx7iqBtqXLt/6AoBiaXZADTwjK54sVXy10B9fZkJLLapCasYD+MBWxUPAOPEovr314UT8WKdkMHRX/4E9pOc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1752840399105968.4325835931808; Fri, 18 Jul 2025 05:06:39 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 1EDE71397; Fri, 18 Jul 2025 08:06:38 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id C14081289; Fri, 18 Jul 2025 08:05:43 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id C0ED013F7; Fri, 18 Jul 2025 08:05:40 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 470C51289 for ; Fri, 18 Jul 2025 08:05:40 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-206-YQ97xV_ZMcCzBzQuQ_wh2g-1; Fri, 18 Jul 2025 08:05:38 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id ADD6F1800C2F for ; Fri, 18 Jul 2025 12:05:37 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.137]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7757F30001B1; Fri, 18 Jul 2025 12:05:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752840340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+DR1beaUAuFpm8/730EmygHhFWProNO23Bf+owpm6X4=; b=Q1Wd2J3HnHNr6qYwqUnTxEoT5fBzPoMy5JQ0cAm9Bde/btlQG49xkMIZLShZCQlzNxldUw VGP3JnCoeqy6whZ1vrZ3UNfctSs1p045wcoFaHiJ8kqcKf3MUJ62oYPb2iXqYFDzt2IrYx rAmltG3TIYZ5mKeWdXcoruUKLwltISA= X-MC-Unique: YQ97xV_ZMcCzBzQuQ_wh2g-1 X-Mimecast-MFC-AGG-ID: YQ97xV_ZMcCzBzQuQ_wh2g_1752840337 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 1/3] qemu: fix order of VNC TLS config entries Date: Fri, 18 Jul 2025 13:05:31 +0100 Message-ID: <20250718120533.2591376-2-berrange@redhat.com> In-Reply-To: <20250718120533.2591376-1-berrange@redhat.com> References: <20250718120533.2591376-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: naeXcoRq_6na6v1ceAGzA0yJYQPlzXeTP7VeJfR0-TU_1752840337 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 3LTVZJ5B46HUNBO6PNYNLH2OY3NGZDJJ X-Message-ID-Hash: 3LTVZJ5B46HUNBO6PNYNLH2OY3NGZDJJ X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1752840399636116600 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 For TLS config parameters, the 'verify' option always comes before the 'secret_uuid' option, except in the VNC case which has them reversed. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- src/qemu/libvirtd_qemu.aug | 2 +- src/qemu/qemu.conf.in | 12 ++++++------ src/qemu/test_libvirtd_qemu.aug.in | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug index e1e479d72c..d36baed6fc 100644 --- a/src/qemu/libvirtd_qemu.aug +++ b/src/qemu/libvirtd_qemu.aug @@ -35,8 +35,8 @@ module Libvirtd_qemu =3D | bool_entry "vnc_auto_unix_socket" | bool_entry "vnc_tls" | str_entry "vnc_tls_x509_cert_dir" - | str_entry "vnc_tls_x509_secret_uuid" | bool_entry "vnc_tls_x509_verify" + | str_entry "vnc_tls_x509_secret_uuid" | str_entry "vnc_password" | bool_entry "vnc_sasl" | str_entry "vnc_sasl_dir" diff --git a/src/qemu/qemu.conf.in b/src/qemu/qemu.conf.in index 6358a45ae2..9bb52b5927 100644 --- a/src/qemu/qemu.conf.in +++ b/src/qemu/qemu.conf.in @@ -101,12 +101,6 @@ #vnc_tls_x509_cert_dir =3D "/etc/pki/libvirt-vnc" =20 =20 -# Uncomment and use the following option to override the default secret -# UUID provided in the default_tls_x509_secret_uuid parameter. -# -#vnc_tls_x509_secret_uuid =3D "00000000-0000-0000-0000-000000000000" - - # The default TLS configuration only uses certificates for the server # allowing the client to verify the server's identity and establish # an encrypted channel. @@ -125,6 +119,12 @@ #vnc_tls_x509_verify =3D 1 =20 =20 +# Uncomment and use the following option to override the default secret +# UUID provided in the default_tls_x509_secret_uuid parameter. +# +#vnc_tls_x509_secret_uuid =3D "00000000-0000-0000-0000-000000000000" + + # The default VNC password. Only 8 bytes are significant for # VNC passwords. This parameter is only used if the per-domain # XML config does not already provide a password. To allow diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qe= mu.aug.in index 88d1a6aca1..e461fcc9df 100644 --- a/src/qemu/test_libvirtd_qemu.aug.in +++ b/src/qemu/test_libvirtd_qemu.aug.in @@ -9,8 +9,8 @@ module Test_libvirtd_qemu =3D { "vnc_auto_unix_socket" =3D "1" } { "vnc_tls" =3D "1" } { "vnc_tls_x509_cert_dir" =3D "/etc/pki/libvirt-vnc" } -{ "vnc_tls_x509_secret_uuid" =3D "00000000-0000-0000-0000-000000000000" } { "vnc_tls_x509_verify" =3D "1" } +{ "vnc_tls_x509_secret_uuid" =3D "00000000-0000-0000-0000-000000000000" } { "vnc_password" =3D "XYZ12345" } { "vnc_sasl" =3D "1" } { "vnc_sasl_dir" =3D "/some/directory/sasl2" } --=20 2.50.1 From nobody Mon Sep 8 17:12:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1752840443; cv=none; d=zohomail.com; s=zohoarc; b=j7ZFpZGChEpnOU2WzNSwtIiaX3JpdPhg8os5VcOHppRQdKvf9a1uJEcFlyD5hnnZUZ9tGOYgSPU6nfb+y1qp5K8jDHTzW1nYNo+6eVarqPcWzChydajcaONUE6+VbDEy68/XjBLzeT+CspXzJKBPK6Ta8GSGAq08kIVIzi0oCoA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752840443; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=XxdFxqmteD3LMU21YL+3I2jnG2BySB3XGAK59RxKTgc=; b=dXuZRmR7hN3qcXRHqQVi4VrZc6H7RjuTFdiv6rLDHHQaQTUDdczq1ZbnkP9xq2fOMx3fRRrygcRcLcfpdcitNW/3Smk5yK1nMp2jokeMRWoszuEnxjrQ6VS+FpSNiSRh8D1O1HkcYqHeRoWnjdYq746E01ABO5c1dfMDq20lAKI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1752840443905433.7167112420534; Fri, 18 Jul 2025 05:07:23 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 0632BA50; Fri, 18 Jul 2025 08:07:23 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id BF98E1554; Fri, 18 Jul 2025 08:05:47 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id ECAB0150F; Fri, 18 Jul 2025 08:05:42 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id E7E531397 for ; Fri, 18 Jul 2025 08:05:41 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-83-tPY8FTqLMW2CHW7RjQ5wZw-1; Fri, 18 Jul 2025 08:05:40 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 38D2419541A7 for ; Fri, 18 Jul 2025 12:05:39 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.137]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2DC6930001B1; Fri, 18 Jul 2025 12:05:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752840341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xJVPFCkQAqK1hYGebzN6pJdQH1tebaJXUx+imM1QgdA=; b=NXBuUhlhSAdpaNgBLmIFBxw7FJVkDnzzdEfBUZwiSd2duYyKqTtCimL+0OCMmMqjFd12vX PHUElnyI3L0b2Yukc92z+vLTGNzFI6yJYNKSybYBQzg6KUc9QcMPrSqhbgsih45xd40phW NjN0bJ5j3Iz0pJQDfkfdzuEiUARH5zY= X-MC-Unique: tPY8FTqLMW2CHW7RjQ5wZw-1 X-Mimecast-MFC-AGG-ID: tPY8FTqLMW2CHW7RjQ5wZw_1752840339 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 2/3] qemu: sanitize blank lines in config file Date: Fri, 18 Jul 2025 13:05:32 +0100 Message-ID: <20250718120533.2591376-3-berrange@redhat.com> In-Reply-To: <20250718120533.2591376-1-berrange@redhat.com> References: <20250718120533.2591376-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: cIIQxiTpt9fvPvOHYa_4_BM3TFlIbkcbVgYmR5zIIF8_1752840339 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 4FHFIZOKLZNQFP4YOFFNEE2VKQABRUMV X-Message-ID-Hash: 4FHFIZOKLZNQFP4YOFFNEE2VKQABRUMV X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1752840446323116600 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 We mostly use 2 blank lines between config file entries to improve readability. Fix where we don't do that. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- src/qemu/qemu.conf.in | 50 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu.conf.in b/src/qemu/qemu.conf.in index 9bb52b5927..eee190cf0b 100644 --- a/src/qemu/qemu.conf.in +++ b/src/qemu/qemu.conf.in @@ -48,6 +48,7 @@ # #default_tls_x509_verify =3D 1 =20 + # # Libvirt assumes the server-key.pem file is unencrypted by default. # To use an encrypted server-key.pem file, the password to decrypt @@ -71,6 +72,7 @@ # #vnc_listen =3D "0.0.0.0" =20 + # Enable this option to have VNC served over an automatically created # unix socket. This prevents unprivileged access from users on the # host machine, though most VNC clients do not support it. @@ -81,6 +83,7 @@ # #vnc_auto_unix_socket =3D 1 =20 + # Enable use of TLS encryption on the VNC server. This requires # a VNC client which supports the VeNCrypt protocol extension. # Examples include vinagre, virt-viewer, virt-manager and vencrypt @@ -222,6 +225,7 @@ # #spice_sasl =3D 1 =20 + # The default SASL configuration file is located in /etc/sasl2/ # When running libvirtd unprivileged, it may be desirable to # override the configs in this location. Set this parameter to @@ -229,6 +233,7 @@ # #spice_sasl_dir =3D "/some/directory/sasl2" =20 + # RDP is configured to listen on 127.0.0.1 by default. # To make it listen on all public interfaces, uncomment # this next option. @@ -242,11 +247,13 @@ # #rdp_tls_x509_cert_dir =3D "/etc/pki/libvirt-rdp" =20 + # The default RDP username. This parameter is only used if the # per-domain XML config does not already provide a username. # #rdp_username =3D "user" =20 + # The default RDP password. This parameter is only used if the # per-domain XML config does not already provide a password. # By default, RDP server will not allow password-less connections. @@ -254,6 +261,7 @@ # #rdp_password =3D "RDP12345" =20 + # Enable use of TLS encryption on the chardev TCP transports. # # It is necessary to setup CA and issue a server certificate @@ -457,6 +465,7 @@ #remote_display_port_min =3D 5900 #remote_display_port_max =3D 65535 =20 + # VNC WebSocket port policies, same rules apply as with remote display # ports. VNC WebSockets use similar display <-> port mappings, with # the exception being that ports start from 5700 instead of 5900. @@ -464,6 +473,7 @@ #remote_websocket_port_min =3D 5700 #remote_websocket_port_max =3D 65535 =20 + # The default security driver is SELinux. If SELinux is disabled # on the host, then the security driver will automatically disable # itself. If you wish to disable QEMU SELinux security driver while @@ -481,15 +491,18 @@ # #security_driver =3D "selinux" =20 + # If set to non-zero, then the default security labeling # will make guests confined. If set to zero, then guests # will be unconfined by default. Defaults to 1. #security_default_confined =3D 1 =20 + # If set to non-zero, then attempts to create unconfined # guests will be blocked. Defaults to 0. #security_require_confined =3D 1 =20 + # The user for QEMU processes run by the system instance. It can be # specified as a user name or as a user id. The qemu driver will try to # parse this value first as a name and then, if the name doesn't exist, @@ -507,10 +520,12 @@ # #user =3D "@QEMU_USER@" =20 + # The group for QEMU processes run by the system instance. It can be # specified in a similar way to user. #group =3D "@QEMU_GROUP@" =20 + # Whether libvirt should dynamically change file ownership # to match the configured user/group above. Defaults to 1. # @@ -526,11 +541,13 @@ # Set to 0 to disable file ownership changes globally in the qemu driver. #dynamic_ownership =3D 1 =20 + # Whether libvirt should remember and restore the original # ownership over files it is relabeling. Defaults to 1, set # to 0 to disable the feature. #remember_owner =3D 1 =20 + # What cgroup controllers to make use of with QEMU guests # # - 'cpu' - use for scheduler tunables @@ -552,6 +569,7 @@ # #cgroup_controllers =3D [ "cpu", "devices", "memory", "blkio", "cpuset", "= cpuacct" ] =20 + # This is the basic set of devices allowed / required by # all virtual machines. # @@ -618,12 +636,14 @@ #dump_image_format =3D "raw" #snapshot_image_format =3D "raw" =20 + # When a domain is configured to be auto-dumped when libvirtd receives a # watchdog event from qemu guest, libvirtd will save dump files in directo= ry # specified by auto_dump_path. Default value is /var/lib/libvirt/qemu/dump # #auto_dump_path =3D "/var/lib/libvirt/qemu/dump" =20 + # When a domain is configured to be auto-dumped, enabling this flag # has the same effect as using the VIR_DUMP_BYPASS_CACHE flag with the # virDomainCoreDump API. That is, the system will avoid using the @@ -632,6 +652,7 @@ # #auto_dump_bypass_cache =3D 0 =20 + # When a domain is configured to be auto-started, enabling this flag # has the same effect as using the VIR_DOMAIN_START_BYPASS_CACHE flag # with the virDomainCreateWithFlags API. That is, the system will @@ -640,11 +661,13 @@ # #auto_start_bypass_cache =3D 0 =20 + # Delay in milliseconds between initiating the startup for # each VM, during autostart # #auto_start_delay =3D 0 =20 + # The settings for auto shutdown actions accept one of # four possible options: # @@ -669,6 +692,7 @@ # they are restarted, or saved and restored. #auto_shutdown_try_save =3D "persistent" =20 + # As above, but with a graceful shutdown action instead of # managed save. If managed save is enabled, shutdown will # be tried only on failure to perform managed save. @@ -683,6 +707,7 @@ # they are restarted, or saved and restored. #auto_shutdown_try_shutdown =3D "all" =20 + # As above, but with a forced poweroff instead of managed # save. If managed save or graceful shutdown are enabled, # forced poweroff will be tried only on failure of the @@ -702,16 +727,19 @@ # feature should to be enabled as well to ensure proper cleanup of the VMs. #auto_shutdown_poweroff =3D "all" =20 + # How may seconds to wait for running VMs to gracefully shutdown # when 'auto_shutdown_try_shutdown' is enabled. If set to 0 # then an arbitrary built-in default value will be used (which # is currently 30 secs) #auto_shutdown_wait =3D 30 =20 + # Whether VMs that are automatically powered off or saved during # host shutdown, should be set to restore on next boot #auto_shutdown_restore =3D 1 =20 + # When a domain is configured to be auto-saved on shutdown, enabling # this flag has the same effect as using the VIR_DOMAIN_SAVE_BYPASS_CACHE # flag with the virDomainManagedSave API. That is, the system will @@ -720,6 +748,7 @@ # #auto_save_bypass_cache =3D 0 =20 + # If provided by the host and a hugetlbfs mount point is configured, # a guest may request huge page backing. When this mount point is # unspecified here, determination of a host mount point in /proc/mounts @@ -768,6 +797,7 @@ #max_processes =3D 0 #max_files =3D 0 =20 + # If max_threads_per_process is set to a positive integer, libvirt # will use it to set the maximum number of threads that can be # created by a qemu process. Some VM configurations can result in @@ -778,6 +808,7 @@ # #max_threads_per_process =3D 0 =20 + # If max_core is set to a non-zero integer, then QEMU will be # permitted to create core dumps when it crashes, provided its # RAM size is smaller than the limit set. @@ -804,6 +835,7 @@ # #max_core =3D "unlimited" =20 + # Determine if guest RAM is included in QEMU core dumps. By # default guest RAM will be excluded on Linux platforms, # and included on all other patforms. Setting this to '1' will @@ -814,6 +846,7 @@ # #dump_guest_core =3D 1 =20 + # mac_filter enables MAC addressed based filtering on bridge ports. # This currently requires ebtables to be installed. # @@ -843,6 +876,7 @@ # #max_queued =3D 0 =20 + ################################################################### # Keepalive protocol: # This allows qemu driver to detect broken connections to remote @@ -866,7 +900,6 @@ #keepalive_count =3D 5 =20 =20 - # Use seccomp syscall filtering sandbox in QEMU. # 1 =3D=3D filter enabled, 0 =3D=3D filter disabled # @@ -901,7 +934,6 @@ #migration_port_max =3D 49215 =20 =20 - # Timestamp QEMU's log messages (if QEMU supports it) # # Defaults to 1. @@ -941,6 +973,7 @@ # "/usr/share/AAVMF/AAVMF32_CODE.fd:/usr/share/AAVMF/AAVMF32_VARS.fd" #] =20 + # The backend to use for handling stdout/stderr output from # QEMU processes. # @@ -956,6 +989,7 @@ # #stdio_handler =3D "logd" =20 + # QEMU gluster libgfapi log level, debug levels are 0-9, with 9 being the # most verbose, and 0 representing no debugging output. # @@ -976,6 +1010,7 @@ # #gluster_debug_level =3D 9 =20 + # virtiofsd debug # # Whether to enable the debugging output of the virtiofsd daemon. @@ -983,6 +1018,7 @@ # #virtiofsd_debug =3D 1 =20 + # To enhance security, QEMU driver is capable of creating private namespac= es # for each domain started. Well, so far only "mount" namespace is supporte= d. If # enabled it means qemu process is unable to see all the devices on the sy= stem, @@ -991,16 +1027,19 @@ # by default. #namespaces =3D [ "mount" ] =20 + # This directory is used for memoryBacking source if configured as file. # NOTE: big files will be stored here #memory_backing_dir =3D "/var/lib/libvirt/qemu/ram" =20 + # Path to the SCSI persistent reservations helper. This helper is # used whenever are enabled for SCSI LUN devices. # If this is not an absolute path, the program will be searched for # in $PATH as well as a few additional directories. #pr_helper =3D "qemu-pr-helper" =20 + # Path to the SLIRP networking helper. #slirp_helper =3D "/usr/bin/slirp-helper" =20 @@ -1010,11 +1049,13 @@ # in $PATH. #qemu_rdp =3D "qemu-rdp" =20 + # Path to the dbus-daemon # If this is not an absolute path, the program will be searched for # in $PATH. #dbus_daemon =3D "dbus-daemon" =20 + # User for the swtpm TPM Emulator # # Default is 'tss'; this is the same user that tcsd (TrouSerS) installs @@ -1023,6 +1064,7 @@ #swtpm_user =3D "tss" #swtpm_group =3D "tss" =20 + # For debugging and testing purposes it's sometimes useful to be able to d= isable # libvirt behaviour based on the capabilities of the qemu process. This op= tion # allows to do so. DO _NOT_ use in production and beaware that the behavio= ur @@ -1030,6 +1072,7 @@ # #capability_filters =3D [ "capname" ] =20 + # 'deprecation_behavior' setting controls how the qemu process behaves tow= ards # deprecated commands and arguments used by libvirt. # @@ -1061,6 +1104,7 @@ # #deprecation_behavior =3D "none" =20 + # If this is set then QEMU and its threads will run in a separate scheduli= ng # group meaning no other process will share Hyper Threads of a single core= with # QEMU. Each QEMU has its own group. @@ -1077,6 +1121,7 @@ # scheduling group #sched_core =3D "none" =20 + # Using nbdkit to access remote disk sources # # If this is set then libvirt will use nbdkit to access remote disk sources @@ -1088,6 +1133,7 @@ # #storage_use_nbdkit =3D @USE_NBDKIT_DEFAULT@ =20 + # libvirt will normally prevent migration if the storage backing the VM is= not # on a shared filesystems. Sometimes, however, the storage *is* shared des= pite # not being detected as such: for example, this is the case when one of the --=20 2.50.1 From nobody Mon Sep 8 17:12:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1752840524; cv=none; d=zohomail.com; s=zohoarc; b=flR8xYiQzwyEC5n3uiZwNf01MvtihbWTU5WMu2uCwG2EqmHOXPSb9zggQU0WDSGmsZkbxl35vWdHVA5NeB50AYUKrpvcG4MkgaYw8w/Lf81pHYEhjqcblNPlPtESGrZe9p5jgXzpyyupmzI6FzBJ4qmdHxrM96GI+t+imKxnKYU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752840524; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=3pFBAKyMdMWRjU+ZjJjcsgvcrvZ+bXwxH3/nllM2bM4=; b=NIMWcnRyoCQAi5P34owVhRCW1/bPegBp4yQK5zrNl6K0ztI4vcVg72a1aD8Tp09y+KmbR0skv3ExxKmvhi1jfm0a9honc+0AAfJOM5b51cMGqpOqa3XmP1y9zwU2PvsdBF9GpY3wEE7uvQXhXoFAJmgfv8NZf2OivcwOa0SFSWk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1752840523971689.8748885252187; Fri, 18 Jul 2025 05:08:43 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id E429C9C1; Fri, 18 Jul 2025 08:08:42 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E0B911634; Fri, 18 Jul 2025 08:05:59 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7CF061609; Fri, 18 Jul 2025 08:05:54 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 5858715D8 for ; Fri, 18 Jul 2025 08:05:44 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-297-w15-9UYGOfKg7ZCaMsD0eg-1; Fri, 18 Jul 2025 08:05:41 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2CB541800359 for ; Fri, 18 Jul 2025 12:05:41 +0000 (UTC) Received: from toolbx.redhat.com (unknown [10.42.28.137]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DF61E30001B9; Fri, 18 Jul 2025 12:05:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752840344; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hF9nJQgfaoNYEGn8md+cgk4l3TphYJ5Xrnbzaigq9y4=; b=PCqGKg3J4iE7qjfgbZ+5JJC0bEXb5NcswxN5HsWkFHXENei0UnLimmekPX26vsiAs/muU8 A7h+PdWpAyama2t1JrYbtaD8dVOXljdnuZQHFmOEB1H24xLjUDHcv8h19LwTwmbgVSM5US HOc4WDRuYdQEZfsEiTgOsvfGM6aOl9Y= X-MC-Unique: w15-9UYGOfKg7ZCaMsD0eg-1 X-Mimecast-MFC-AGG-ID: w15-9UYGOfKg7ZCaMsD0eg_1752840341 To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 3/3] qemu: add ability to set TLS priority string with QEMU Date: Fri, 18 Jul 2025 13:05:33 +0100 Message-ID: <20250718120533.2591376-4-berrange@redhat.com> In-Reply-To: <20250718120533.2591376-1-berrange@redhat.com> References: <20250718120533.2591376-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: rcdyRHwlzBk9UTm6BzOMj3Tf8E8KYdAcOAYgr-eoRtk_1752840341 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: LXE7K3OU25M6U2462JPCLCUNBGTMSPEH X-Message-ID-Hash: LXE7K3OU25M6U2462JPCLCUNBGTMSPEH X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9_via_Devel?= Reply-To: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1752840525653116600 Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 QEMU will either use the GNUTLS default priority string of "NORMAL", or on Fedora/RHEL related distros, "@QEMU,SYSTEM", which resolves to a configuration in /etc/crypto-policies/back-ends/gnutls.config. The latter gives the sysadmin the ability to change the priority string used for GNUTLS at deployment time, either system side, or exclusively for QEMU, avoiding the hardcoded GNUTLS defaults. There are still some limitations to this: * Priorities cannot be set for different areas of QEMU functionality (migration, vnc, nbd, etc) * Priorities are fixed at the time when QEMU first triggers GNUTLS to load its config file, often immediately at startup. We recently uncovered a QEMU bug that causes crashes in live migration with TLS-1.3, where the easiest workaround is to change the TLS priorities. We can't change this on the running QEMU, but fortunately it is possible to change it on the target QEMU and the TLS handshake will make it take effect on both src and dst. The problem is, while fixing the immediate incoming and outgoing live migration problems, the workaround will apply to everything else that QEMU does for the rest of the time that process exists. We want to make it possible to set the TLS priorities only for the current migrations, such that if the target QEMU has a fixed GNUTLS, it will not have its TLS priorities hobbled for the next live migration. To achieve this we need libvirt to be able to (optionally) set the TLS priority string with QEMU. While live migration is the most pressing need, the new qemu.conf parameters are wired up for every subsystem for greater selectivity in future. With this we can activate the GNUTLS workaround for running QEMU processes by editting qemu.conf and restarting virtqemud, and later undo this the same way. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Peter Krempa --- src/conf/storage_source_conf.c | 2 + src/conf/storage_source_conf.h | 1 + src/qemu/libvirtd_qemu.aug | 6 +++ src/qemu/qemu.conf.in | 37 +++++++++++++++++++ src/qemu/qemu_backup.c | 5 ++- src/qemu/qemu_blockjob.c | 1 + src/qemu/qemu_command.c | 15 ++++++-- src/qemu/qemu_command.h | 1 + src/qemu/qemu_conf.c | 22 +++++++++++ src/qemu/qemu_conf.h | 6 +++ src/qemu/qemu_domain.c | 3 ++ src/qemu/qemu_domain.h | 1 + src/qemu/qemu_hotplug.c | 4 +- src/qemu/qemu_hotplug.h | 1 + src/qemu/qemu_migration_params.c | 1 + src/qemu/test_libvirtd_qemu.aug.in | 6 +++ ...rk-tlsx509-nbd-hostname.x86_64-latest.args | 2 +- ...graphics-vnc-tls-secret.x86_64-latest.args | 2 +- ...-tlsx509-secret-chardev.x86_64-latest.args | 2 +- tests/qemuxmlconftest.c | 6 +++ 20 files changed, 114 insertions(+), 10 deletions(-) diff --git a/src/conf/storage_source_conf.c b/src/conf/storage_source_conf.c index 8a063be244..8bab116d89 100644 --- a/src/conf/storage_source_conf.c +++ b/src/conf/storage_source_conf.c @@ -832,6 +832,7 @@ virStorageSourceCopy(const virStorageSource *src, def->compat =3D g_strdup(src->compat); def->tlsAlias =3D g_strdup(src->tlsAlias); def->tlsCertdir =3D g_strdup(src->tlsCertdir); + def->tlsPriority =3D g_strdup(src->tlsPriority); def->tlsHostname =3D g_strdup(src->tlsHostname); def->query =3D g_strdup(src->query); def->vdpadev =3D g_strdup(src->vdpadev); @@ -1185,6 +1186,7 @@ virStorageSourceClear(virStorageSource *def) =20 VIR_FREE(def->tlsAlias); VIR_FREE(def->tlsCertdir); + VIR_FREE(def->tlsPriority); VIR_FREE(def->tlsHostname); =20 VIR_FREE(def->ssh_user); diff --git a/src/conf/storage_source_conf.h b/src/conf/storage_source_conf.h index ebddf28cd6..a0d5acdb09 100644 --- a/src/conf/storage_source_conf.h +++ b/src/conf/storage_source_conf.h @@ -396,6 +396,7 @@ struct _virStorageSource { * certificate directory with listen and verify bools. */ char *tlsAlias; char *tlsCertdir; + char *tlsPriority; =20 /* TLS hostname override */ char *tlsHostname; diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug index d36baed6fc..772d4dcabe 100644 --- a/src/qemu/libvirtd_qemu.aug +++ b/src/qemu/libvirtd_qemu.aug @@ -30,6 +30,7 @@ module Libvirtd_qemu =3D let default_tls_entry =3D str_entry "default_tls_x509_cert_dir" | bool_entry "default_tls_x509_verify" | str_entry "default_tls_x509_secret_uuid" + | str_entry "default_tls_priority" =20 let vnc_entry =3D str_entry "vnc_listen" | bool_entry "vnc_auto_unix_socket" @@ -37,6 +38,7 @@ module Libvirtd_qemu =3D | str_entry "vnc_tls_x509_cert_dir" | bool_entry "vnc_tls_x509_verify" | str_entry "vnc_tls_x509_secret_uuid" + | str_entry "vnc_tls_priority" | str_entry "vnc_password" | bool_entry "vnc_sasl" | str_entry "vnc_sasl_dir" @@ -59,15 +61,18 @@ module Libvirtd_qemu =3D | str_entry "chardev_tls_x509_cert_dir" | bool_entry "chardev_tls_x509_verify" | str_entry "chardev_tls_x509_secret_uuid" + | str_entry "chardev_tls_priority" =20 let migrate_entry =3D str_entry "migrate_tls_x509_cert_dir" | bool_entry "migrate_tls_x509_verify" | str_entry "migrate_tls_x509_secret_uuid" + | str_entry "migrate_tls_priority" | bool_entry "migrate_tls_force" =20 let backup_entry =3D str_entry "backup_tls_x509_cert_dir" | bool_entry "backup_tls_x509_verify" | str_entry "backup_tls_x509_secret_uuid" + | str_entry "backup_tls_priority" =20 (* support for vxhs was removed from qemu and the examples were dopped = from *) (* qemu.conf but these need to stay *) @@ -78,6 +83,7 @@ module Libvirtd_qemu =3D let nbd_entry =3D bool_entry "nbd_tls" | str_entry "nbd_tls_x509_cert_dir" | str_entry "nbd_tls_x509_secret_uuid" + | str_entry "nbd_tls_priority" =20 let nogfx_entry =3D bool_entry "nographics_allow_host_audio" =20 diff --git a/src/qemu/qemu.conf.in b/src/qemu/qemu.conf.in index eee190cf0b..7602e777ae 100644 --- a/src/qemu/qemu.conf.in +++ b/src/qemu/qemu.conf.in @@ -63,6 +63,18 @@ #default_tls_x509_secret_uuid =3D "00000000-0000-0000-0000-000000000000" =20 =20 +# Libvirt allows QEMU to use its built-in TLS priority by default, +# however, this allows overriding it at runtime. This is especially +# useful if TLS priority needs to be changed for an operation run +# against an existing running QEMU. +# +# This must be a valid GNUTLS priority string: +# +# https://gnutls.org/manual/html_node/Priority-Strings.html +# +#default_tls_priority =3D "@SYSTEM" + + # VNC is configured to listen on 127.0.0.1 by default. # To make it listen on all public interfaces, uncomment # this next option. @@ -128,6 +140,11 @@ #vnc_tls_x509_secret_uuid =3D "00000000-0000-0000-0000-000000000000" =20 =20 +# Override QEMU default GNUTLS priority string for VNC +# +#vnc_tls_priority =3D "@SYSTEM" + + # The default VNC password. Only 8 bytes are significant for # VNC passwords. This parameter is only used if the per-domain # XML config does not already provide a password. To allow @@ -307,6 +324,11 @@ #chardev_tls_x509_secret_uuid =3D "00000000-0000-0000-0000-000000000000" =20 =20 +# Override QEMU default GNUTLS priority string for character devices +# +#chardev_tls_priority =3D "@SYSTEM" + + # The support for VxHS network block protocol was removed in qemu-5.2 and # thus also dropped from libvirt's qemu driver. The following options which # were used to configure the TLS certificates for VxHS are thus ignored. @@ -359,6 +381,11 @@ #nbd_tls_x509_secret_uuid =3D "00000000-0000-0000-0000-000000000000" =20 =20 +# Override QEMU default GNUTLS priority string for NBD +# +#nbd_tls_priority =3D "@SYSTEM" + + # In order to override the default TLS certificate location for migration # certificates, supply a valid path to the certificate directory. If the # provided path does not exist, libvirtd will fail to start. If the path is @@ -398,6 +425,11 @@ #migrate_tls_x509_secret_uuid =3D "00000000-0000-0000-0000-000000000000" =20 =20 +# Override QEMU default GNUTLS priority string for live migration +# +#migrate_tls_priority =3D "@SYSTEM" + + # By default TLS is requested using the VIR_MIGRATE_TLS flag, thus not req= uested # automatically. Setting 'migate_tls_force' to "1" will prevent any migrat= ion # which is not using VIR_MIGRATE_TLS to ensure higher level of security in @@ -443,6 +475,11 @@ #backup_tls_x509_secret_uuid =3D "00000000-0000-0000-0000-000000000000" =20 =20 +# Override QEMU default GNUTLS priority string for NBD backups +# +#backup_tls_priority =3D "@SYSTEM" + + # By default, if no graphical front end is configured, libvirt will disable # QEMU audio output since directly talking to alsa/pulseaudio may not work # with various security settings. If you know what you're doing, enable diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c index fb3558d280..1f43479b5e 100644 --- a/src/qemu/qemu_backup.c +++ b/src/qemu/qemu_backup.c @@ -728,8 +728,9 @@ qemuBackupBeginPrepareTLS(virDomainObj *vm, } =20 if (qemuBuildTLSx509BackendProps(cfg->backupTLSx509certdir, true, - cfg->backupTLSx509verify, tlsObjAlias, - tlsKeySecretAlias, + cfg->backupTLSx509verify, + cfg->backupTLSpriority, + tlsObjAlias, tlsKeySecretAlias, tlsProps) < 0) return -1; =20 diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index c7462e2838..315b742053 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -624,6 +624,7 @@ qemuBlockJobCleanStorageSourceRuntime(virStorageSource = *src) VIR_FREE(src->nodenameformat); VIR_FREE(src->tlsAlias); VIR_FREE(src->tlsCertdir); + VIR_FREE(src->tlsPriority); } =20 =20 diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7658cc4d39..a0a04ae1fc 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1263,6 +1263,7 @@ qemuBuildObjectSecretCommandLine(virCommand *cmd, * @tlspath: path to the TLS credentials * @listen: boolean listen for client or server setting * @verifypeer: boolean to enable peer verification (form of authorization) + * @priority: GNUTLS priority string override (optional) * @alias: alias for the TLS credentials object * @secalias: if one exists, the alias of the security object for password= id * @propsret: json properties to return @@ -1275,6 +1276,7 @@ int qemuBuildTLSx509BackendProps(const char *tlspath, bool isListen, bool verifypeer, + const char *priority, const char *alias, const char *secalias, virJSONValue **propsret) @@ -1283,6 +1285,7 @@ qemuBuildTLSx509BackendProps(const char *tlspath, "s:dir", tlspath, "s:endpoint", (isListen ? "server": "= client"), "b:verify-peer", (isListen ? verifype= er : true), + "S:priority", priority, "S:passwordid", secalias, NULL) < 0) return -1; @@ -1296,6 +1299,7 @@ qemuBuildTLSx509BackendProps(const char *tlspath, * @tlspath: path to the TLS credentials * @listen: boolean listen for client or server setting * @verifypeer: boolean to enable peer verification (form of authorization) + * @priority: GNUTLS priority string override (optional) * @certEncSecretAlias: alias of a 'secret' object for decrypting TLS priv= ate key * (optional) * @alias: TLS object alias @@ -1309,13 +1313,14 @@ qemuBuildTLSx509CommandLine(virCommand *cmd, const char *tlspath, bool isListen, bool verifypeer, + const char *priority, const char *certEncSecretAlias, const char *alias) { g_autoptr(virJSONValue) props =3D NULL; =20 - if (qemuBuildTLSx509BackendProps(tlspath, isListen, verifypeer, alias, - certEncSecretAlias, &props) < 0) + if (qemuBuildTLSx509BackendProps(tlspath, isListen, verifypeer, priori= ty, + alias, certEncSecretAlias, &props) < = 0) return -1; =20 if (qemuBuildObjectCommandlineFromJSON(cmd, props) < 0) @@ -1357,6 +1362,7 @@ qemuBuildChardevCommand(virCommand *cmd, if (qemuBuildTLSx509CommandLine(cmd, chrSourcePriv->tlsCertPat= h, dev->data.tcp.listen, chrSourcePriv->tlsVerify, + chrSourcePriv->tlsPriority, tlsCertEncSecAlias, objalias) < 0) { return -1; @@ -8348,6 +8354,7 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfig *= cfg, cfg->vncTLSx509certdir, true, cfg->vncTLSx509verify, + cfg->vncTLSpriority, secretAlias, gfxPriv->tlsAlias) < 0) return -1; @@ -11189,8 +11196,8 @@ qemuBuildStorageSourceAttachPrepareCommon(virStorag= eSource *src, } =20 if (src->haveTLS =3D=3D VIR_TRISTATE_BOOL_YES && - qemuBuildTLSx509BackendProps(src->tlsCertdir, false, true, src->tl= sAlias, - tlsKeySecretAlias, &data->tlsProps) <= 0) + qemuBuildTLSx509BackendProps(src->tlsCertdir, false, true, src->tl= sPriority, + src->tlsAlias, tlsKeySecretAlias, &da= ta->tlsProps) < 0) return -1; =20 return 0; diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 574dffdc96..ad068f1f16 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -67,6 +67,7 @@ int qemuBuildTLSx509BackendProps(const char *tlspath, bool isListen, bool verifypeer, + const char *priority, const char *alias, const char *secalias, virJSONValue **propsret); diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 482e19b502..088904eb12 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -454,6 +454,9 @@ virQEMUDriverConfigLoadDefaultTLSEntry(virQEMUDriverCon= fig *cfg, if (virConfGetValueString(conf, "default_tls_x509_secret_uuid", &cfg->defaultTLSx509secretUUID) < 0) return -1; + if (virConfGetValueString(conf, "default_tls_priority", + &cfg->defaultTLSpriority) < 0) + return -1; =20 return 0; } @@ -566,6 +569,9 @@ virQEMUDriverConfigLoadSpecificTLSEntry(virQEMUDriverCo= nfig *cfg, #val "_tls_x509_secret_uuid", \ &cfg->val## TLSx509secretUUID) < 0) \ return -1; \ + if ((rv =3D virConfGetValueString(conf, #val "_tls_priority", \ + &cfg->val## TLSpriority)) < 0) \ + return -1; \ } while (0) =20 #define GET_CONFIG_TLS_CERTINFO_SERVER(val) \ @@ -1441,6 +1447,22 @@ virQEMUDriverConfigSetDefaults(virQEMUDriverConfig *= cfg) =20 #undef SET_TLS_SECRET_UUID_DEFAULT =20 +#define SET_TLS_PRIORITY_DEFAULT(val) \ + do { \ + if (!cfg->val## TLSpriority && \ + cfg->defaultTLSpriority) { \ + cfg->val## TLSpriority =3D g_strdup(cfg->defaultTLSpriority); \ + } \ + } while (0) + + SET_TLS_PRIORITY_DEFAULT(vnc); + SET_TLS_PRIORITY_DEFAULT(chardev); + SET_TLS_PRIORITY_DEFAULT(migrate); + SET_TLS_PRIORITY_DEFAULT(backup); + SET_TLS_PRIORITY_DEFAULT(nbd); + +#undef SET_TLS_PRIORITY_DEFAULT + /* * If a "SYSCONFDIR" + "pki/libvirt-" exists, then assume someone * has created a val specific area to place service specific certifica= tes. diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index ff376aed4d..192ddd0cbd 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -117,6 +117,7 @@ struct _virQEMUDriverConfig { bool defaultTLSx509verify; bool defaultTLSx509verifyPresent; char *defaultTLSx509secretUUID; + char *defaultTLSpriority; =20 bool vncAutoUnixSocket; bool vncTLS; @@ -125,6 +126,7 @@ struct _virQEMUDriverConfig { bool vncSASL; char *vncTLSx509certdir; char *vncTLSx509secretUUID; + char *vncTLSpriority; char *vncListen; char *vncPassword; char *vncSASLdir; @@ -147,21 +149,25 @@ struct _virQEMUDriverConfig { bool chardevTLSx509verify; bool chardevTLSx509verifyPresent; char *chardevTLSx509secretUUID; + char *chardevTLSpriority; =20 char *migrateTLSx509certdir; bool migrateTLSx509verify; bool migrateTLSx509verifyPresent; char *migrateTLSx509secretUUID; + char *migrateTLSpriority; bool migrateTLSForce; =20 char *backupTLSx509certdir; bool backupTLSx509verify; bool backupTLSx509verifyPresent; char *backupTLSx509secretUUID; + char *backupTLSpriority; =20 bool nbdTLS; char *nbdTLSx509certdir; char *nbdTLSx509secretUUID; + char *nbdTLSpriority; =20 unsigned int remotePortMin; unsigned int remotePortMax; diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 4420940745..b4327f9a32 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -955,6 +955,7 @@ qemuDomainChrSourcePrivateDispose(void *obj) qemuDomainChrSourcePrivateClearFDPass(priv); =20 g_free(priv->tlsCertPath); + g_free(priv->tlsPriority); =20 g_free(priv->tlsCredsAlias); =20 @@ -8793,6 +8794,7 @@ qemuDomainPrepareChardevSourceOne(virDomainDeviceDef = *dev, =20 if (charsrc->data.tcp.haveTLS =3D=3D VIR_TRISTATE_BOOL_YES) { charpriv->tlsCertPath =3D g_strdup(data->cfg->chardevTLSx5= 09certdir); + charpriv->tlsPriority =3D g_strdup(data->cfg->chardevTLSpr= iority); charpriv->tlsVerify =3D data->cfg->chardevTLSx509verify; } } @@ -8858,6 +8860,7 @@ qemuProcessPrepareStorageSourceTLSNBD(virStorageSourc= e *src, =20 src->tlsAlias =3D qemuAliasTLSObjFromSrcAlias(parentAlias); src->tlsCertdir =3D g_strdup(cfg->nbdTLSx509certdir); + src->tlsPriority =3D g_strdup(cfg->nbdTLSpriority); =20 if (cfg->nbdTLSx509secretUUID) { qemuDomainStorageSourcePrivate *srcpriv =3D qemuDomainStorageS= ourcePrivateFetch(src); diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 49f83613e3..b53ebcb478 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -384,6 +384,7 @@ struct _qemuDomainChrSourcePrivate { =20 char *tlsCertPath; /* path to certificates if TLS is requested */ bool tlsVerify; /* whether server should verify client certificates */ + char *tlsPriority; /* optional GNUTLS priority string */ =20 char *tlsCredsAlias; /* alias of the x509 tls credentials object */ }; diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 073bd97d3a..e9568af125 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1749,6 +1749,7 @@ qemuDomainGetTLSObjects(qemuDomainSecretInfo *secinfo, const char *tlsCertdir, bool tlsListen, bool tlsVerify, + const char *tlsPriority, const char *alias, virJSONValue **tlsProps, virJSONValue **secProps) @@ -1762,7 +1763,7 @@ qemuDomainGetTLSObjects(qemuDomainSecretInfo *secinfo, secAlias =3D secinfo->alias; } =20 - if (qemuBuildTLSx509BackendProps(tlsCertdir, tlsListen, tlsVerify, + if (qemuBuildTLSx509BackendProps(tlsCertdir, tlsListen, tlsVerify, tls= Priority, alias, secAlias, tlsProps) < 0) return -1; =20 @@ -1806,6 +1807,7 @@ qemuDomainAddChardevTLSObjects(virQEMUDriver *driver, cfg->chardevTLSx509certdir, dev->data.tcp.listen, cfg->chardevTLSx509verify, + cfg->chardevTLSpriority, *tlsAlias, &tlsProps, &secProps) < 0) return -1; =20 diff --git a/src/qemu/qemu_hotplug.h b/src/qemu/qemu_hotplug.h index de75bf9225..fb0b5b6cd7 100644 --- a/src/qemu/qemu_hotplug.h +++ b/src/qemu/qemu_hotplug.h @@ -41,6 +41,7 @@ qemuDomainGetTLSObjects(qemuDomainSecretInfo *secinfo, const char *tlsCertdir, bool tlsListen, bool tlsVerify, + const char *tlsPriority, const char *alias, virJSONValue **tlsProps, virJSONValue **secProps); diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index 17d08f4aa5..b79bbad5c2 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -1208,6 +1208,7 @@ qemuMigrationParamsEnableTLS(virQEMUDriver *driver, if (qemuDomainGetTLSObjects(priv->migSecinfo, cfg->migrateTLSx509certdir, tlsListen, cfg->migrateTLSx509verify, + cfg->migrateTLSpriority, *tlsAlias, &tlsProps, &secProps) < 0) return -1; =20 diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qe= mu.aug.in index e461fcc9df..1fa0e2206e 100644 --- a/src/qemu/test_libvirtd_qemu.aug.in +++ b/src/qemu/test_libvirtd_qemu.aug.in @@ -5,12 +5,14 @@ module Test_libvirtd_qemu =3D { "default_tls_x509_cert_dir" =3D "/etc/pki/qemu" } { "default_tls_x509_verify" =3D "1" } { "default_tls_x509_secret_uuid" =3D "00000000-0000-0000-0000-000000000000= " } +{ "default_tls_priority" =3D "@SYSTEM" } { "vnc_listen" =3D "0.0.0.0" } { "vnc_auto_unix_socket" =3D "1" } { "vnc_tls" =3D "1" } { "vnc_tls_x509_cert_dir" =3D "/etc/pki/libvirt-vnc" } { "vnc_tls_x509_verify" =3D "1" } { "vnc_tls_x509_secret_uuid" =3D "00000000-0000-0000-0000-000000000000" } +{ "vnc_tls_priority" =3D "@SYSTEM" } { "vnc_password" =3D "XYZ12345" } { "vnc_sasl" =3D "1" } { "vnc_sasl_dir" =3D "/some/directory/sasl2" } @@ -30,19 +32,23 @@ module Test_libvirtd_qemu =3D { "chardev_tls_x509_cert_dir" =3D "/etc/pki/libvirt-chardev" } { "chardev_tls_x509_verify" =3D "1" } { "chardev_tls_x509_secret_uuid" =3D "00000000-0000-0000-0000-000000000000= " } +{ "chardev_tls_priority" =3D "@SYSTEM" } { "vxhs_tls" =3D "1" } { "vxhs_tls_x509_cert_dir" =3D "/etc/pki/libvirt-vxhs" } { "vxhs_tls_x509_secret_uuid" =3D "00000000-0000-0000-0000-000000000000" } { "nbd_tls" =3D "1" } { "nbd_tls_x509_cert_dir" =3D "/etc/pki/libvirt-nbd" } { "nbd_tls_x509_secret_uuid" =3D "00000000-0000-0000-0000-000000000000" } +{ "nbd_tls_priority" =3D "@SYSTEM" } { "migrate_tls_x509_cert_dir" =3D "/etc/pki/libvirt-migrate" } { "migrate_tls_x509_verify" =3D "1" } { "migrate_tls_x509_secret_uuid" =3D "00000000-0000-0000-0000-000000000000= " } +{ "migrate_tls_priority" =3D "@SYSTEM" } { "migrate_tls_force" =3D "0" } { "backup_tls_x509_cert_dir" =3D "/etc/pki/libvirt-backup" } { "backup_tls_x509_verify" =3D "1" } { "backup_tls_x509_secret_uuid" =3D "00000000-0000-0000-0000-000000000000"= } +{ "backup_tls_priority" =3D "@SYSTEM" } { "nographics_allow_host_audio" =3D "1" } { "remote_display_port_min" =3D "5900" } { "remote_display_port_max" =3D "65535" } diff --git a/tests/qemuxmlconfdata/disk-network-tlsx509-nbd-hostname.x86_64= -latest.args b/tests/qemuxmlconfdata/disk-network-tlsx509-nbd-hostname.x86_= 64-latest.args index 4ee9a0631b..77d38c3020 100644 --- a/tests/qemuxmlconfdata/disk-network-tlsx509-nbd-hostname.x86_64-latest= .args +++ b/tests/qemuxmlconfdata/disk-network-tlsx509-nbd-hostname.x86_64-latest= .args @@ -28,7 +28,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ -boot strict=3Don \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ -object '{"qom-type":"secret","id":"objlibvirt-1-storage_tls0-secret0","da= ta":"9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","key= id":"masterKey0","iv":"AAECAwQFBgcICQoLDA0ODw=3D=3D","format":"base64"}' \ --object '{"qom-type":"tls-creds-x509","id":"objlibvirt-1-storage_tls0","di= r":"/etc/pki/libvirt-nbd","endpoint":"client","verify-peer":true,"passwordi= d":"objlibvirt-1-storage_tls0-secret0"}' \ +-object '{"qom-type":"tls-creds-x509","id":"objlibvirt-1-storage_tls0","di= r":"/etc/pki/libvirt-nbd","endpoint":"client","verify-peer":true,"priority"= :"@SYSTEM:-VERS-TLS1.3","passwordid":"objlibvirt-1-storage_tls0-secret0"}' \ -blockdev '{"driver":"nbd","server":{"type":"inet","host":"example.com","p= ort":"1234"},"tls-creds":"objlibvirt-1-storage_tls0","tls-hostname":"test-h= ostname","node-name":"libvirt-1-storage","read-only":false,"cache":{"direct= ":true,"no-flush":false}}' \ -device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x7","drive":"li= bvirt-1-storage","id":"virtio-disk3","bootindex":1,"write-cache":"on"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ diff --git a/tests/qemuxmlconfdata/graphics-vnc-tls-secret.x86_64-latest.ar= gs b/tests/qemuxmlconfdata/graphics-vnc-tls-secret.x86_64-latest.args index 50cc8532d1..32d7be1d3b 100644 --- a/tests/qemuxmlconfdata/graphics-vnc-tls-secret.x86_64-latest.args +++ b/tests/qemuxmlconfdata/graphics-vnc-tls-secret.x86_64-latest.args @@ -29,7 +29,7 @@ SASL_CONF_PATH=3D/etc/sasl2 \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -object '{"qom-type":"secret","id":"vnc-tls-creds0-secret0","data":"9eao5F= 8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"master= Key0","iv":"AAECAwQFBgcICQoLDA0ODw=3D=3D","format":"base64"}' \ --object '{"qom-type":"tls-creds-x509","id":"vnc-tls-creds0","dir":"/etc/pk= i/libvirt-vnc","endpoint":"server","verify-peer":true,"passwordid":"vnc-tls= -creds0-secret0"}' \ +-object '{"qom-type":"tls-creds-x509","id":"vnc-tls-creds0","dir":"/etc/pk= i/libvirt-vnc","endpoint":"server","verify-peer":true,"priority":"@SYSTEM:-= VERS-TLS1.3","passwordid":"vnc-tls-creds0-secret0"}' \ -vnc 127.0.0.1:3,tls-creds=3Dvnc-tls-creds0,sasl=3Don,audiodev=3Daudio1 \ -device '{"driver":"cirrus-vga","id":"video0","bus":"pci.0","addr":"0x2"}'= \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ diff --git a/tests/qemuxmlconfdata/serial-tcp-tlsx509-secret-chardev.x86_64= -latest.args b/tests/qemuxmlconfdata/serial-tcp-tlsx509-secret-chardev.x86_= 64-latest.args index c227a04112..492d1be626 100644 --- a/tests/qemuxmlconfdata/serial-tcp-tlsx509-secret-chardev.x86_64-latest= .args +++ b/tests/qemuxmlconfdata/serial-tcp-tlsx509-secret-chardev.x86_64-latest= .args @@ -32,7 +32,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGue= st1/.config \ -chardev udp,id=3Dcharserial0,host=3D127.0.0.1,port=3D2222,localaddr=3D127= .0.0.1,localport=3D1111 \ -device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","in= dex":0}' \ -object '{"qom-type":"secret","id":"charserial1-secret0","data":"9eao5F8qt= kGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1","keyid":"masterKey= 0","iv":"AAECAwQFBgcICQoLDA0ODw=3D=3D","format":"base64"}' \ --object '{"qom-type":"tls-creds-x509","id":"objcharserial1_tls0","dir":"/e= tc/pki/libvirt-chardev","endpoint":"client","verify-peer":true,"passwordid"= :"charserial1-secret0"}' \ +-object '{"qom-type":"tls-creds-x509","id":"objcharserial1_tls0","dir":"/e= tc/pki/libvirt-chardev","endpoint":"client","verify-peer":true,"priority":"= @SYSTEM:-VERS-TLS1.3","passwordid":"charserial1-secret0"}' \ -chardev socket,id=3Dcharserial1,host=3D127.0.0.1,port=3D5555,tls-creds=3D= objcharserial1_tls0 \ -device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","in= dex":1}' \ -audiodev '{"id":"audio1","driver":"none"}' \ diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index 9fba984290..1b73e823ae 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -1596,7 +1596,9 @@ mymain(void) driver.config->nbdTLSx509secretUUID =3D g_strdup("6fd3f62d-9fe7-4a4e-a= 869-7acd6376d8ea"); DO_TEST_CAPS_LATEST("disk-network-tlsx509-nbd"); DO_TEST_CAPS_VER_PARSE_ERROR("disk-network-tlsx509-nbd-hostname", "6.2= .0"); + driver.config->nbdTLSpriority =3D g_strdup("@SYSTEM:-VERS-TLS1.3"); DO_TEST_CAPS_LATEST("disk-network-tlsx509-nbd-hostname"); + driver.config->nbdTLSpriority =3D NULL; DO_TEST_CAPS_LATEST("disk-network-http"); VIR_FREE(driver.config->nbdTLSx509secretUUID); DO_TEST_CAPS_LATEST("disk-network-ssh"); @@ -1729,8 +1731,10 @@ mymain(void) driver.config->vncTLS =3D 1; driver.config->vncTLSx509verify =3D 1; DO_TEST_CAPS_LATEST("graphics-vnc-tls"); + driver.config->vncTLSpriority =3D g_strdup("@SYSTEM:-VERS-TLS1.3"); driver.config->vncTLSx509secretUUID =3D g_strdup("6fd3f62d-9fe7-4a4e-a= 869-7acd6376d8ea"); DO_TEST_CAPS_LATEST("graphics-vnc-tls-secret"); + VIR_FREE(driver.config->vncTLSpriority); VIR_FREE(driver.config->vncTLSx509secretUUID); driver.config->vncSASL =3D driver.config->vncTLSx509verify =3D driver.= config->vncTLS =3D 0; DO_TEST_CAPS_LATEST("graphics-vnc-egl-headless"); @@ -1880,7 +1884,9 @@ mymain(void) driver.config->chardevTLSx509verify =3D 0; DO_TEST_CAPS_LATEST("serial-tcp-tlsx509-chardev-notls"); driver.config->chardevTLSx509secretUUID =3D g_strdup("6fd3f62d-9fe7-4a= 4e-a869-7acd6376d8ea"); + driver.config->chardevTLSpriority =3D g_strdup("@SYSTEM:-VERS-TLS1.3"); DO_TEST_CAPS_LATEST("serial-tcp-tlsx509-secret-chardev"); + VIR_FREE(driver.config->chardevTLSpriority); VIR_FREE(driver.config->chardevTLSx509secretUUID); driver.config->chardevTLS =3D 0; DO_TEST_CAPS_LATEST("serial-many-chardev"); --=20 2.50.1