qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ui: fix regression in x509verify parameter for


From: Gonglei
Subject: Re: [Qemu-devel] [PATCH] ui: fix regression in x509verify parameter for VNC server
Date: Wed, 11 Mar 2015 09:48:46 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 2015/3/11 0:27, Daniel P. Berrange wrote:
> 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 <address@hidden>
>   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 <address@hidden>
> ---
>  ui/vnc.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 10a2724..37290e7 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -3304,7 +3304,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,
> @@ -3391,9 +3391,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);

We still need to get the x509verify value, while both 'x509' and 'x509verify'
are configured, isn't it?

Regards,
-Gonglei

>          if (vnc_tls_set_x509_creds_dir(vs, path) < 0) {
>              error_setg(errp, "Failed to find x509 certificates/keys in %s",
>                         path);
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]