[Spice-devel] [PATCH spice-gtk] session: correctly set and unset ssl-verify flags

Marc-André Lureau marcandre.lureau at gmail.com
Mon May 21 08:28:57 PDT 2012


ping

On Thu, May 17, 2012 at 2:46 PM, Marc-André Lureau
<marcandre.lureau at gmail.com> wrote:
> If no cert-subject or pubkey is provided, we should unset the corresponding flags.
> ---
>  gtk/spice-session.c |    8 ++++++--
>  spice-common        |    2 +-
>  2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/gtk/spice-session.c b/gtk/spice-session.c
> index b3c66ce..17b1fe8 100644
> --- a/gtk/spice-session.c
> +++ b/gtk/spice-session.c
> @@ -519,13 +519,17 @@ static void spice_session_set_property(GObject      *gobject,
>             g_byte_array_unref(s->pubkey);
>         s->pubkey = g_value_dup_boxed(value);
>         if (s->pubkey)
> -            s->verify = SPICE_SESSION_VERIFY_PUBKEY;
> +            s->verify |= SPICE_SESSION_VERIFY_PUBKEY;
> +        else
> +            s->verify &= ~SPICE_SESSION_VERIFY_PUBKEY;
>        break;
>     case PROP_CERT_SUBJECT:
>         g_free(s->cert_subject);
>         s->cert_subject = g_value_dup_string(value);
>         if (s->cert_subject)
> -            s->verify = SPICE_SESSION_VERIFY_SUBJECT;
> +            s->verify |= SPICE_SESSION_VERIFY_SUBJECT;
> +        else
> +            s->verify &= ~SPICE_SESSION_VERIFY_SUBJECT;
>         break;
>     case PROP_VERIFY:
>         s->verify = g_value_get_flags(value);
> diff --git a/spice-common b/spice-common
> index 22fc0b0..5f44094 160000
> --- a/spice-common
> +++ b/spice-common
> @@ -1 +1 @@
> -Subproject commit 22fc0b0145876b90385c1c88923bcd72a6380812
> +Subproject commit 5f4409494066b5f59df58d6207fdbb0441aa9e90
> --
> 1.7.10.1
>



-- 
Marc-André Lureau


More information about the Spice-devel mailing list