[Spice-devel] [PATCH spice-gtk] channel-main: Do not use not present protocol fields
Christophe Fergeau
cfergeau at redhat.com
Thu Feb 21 15:19:34 UTC 2019
On Thu, Feb 21, 2019 at 08:58:19AM -0500, Frediano Ziglio wrote:
> > On Wed, Feb 20, 2019 at 05:57:30PM +0000, Frediano Ziglio wrote:
> > > Commit 9cf6d39b369f9c22615fc329e307126721125ecd ("server,proto:
> > > tell the clients to connect to the migration target before migraton
> > > starts", dated 18th September 2011) removed these fields.
> > > Avoid to use them. If nobody complained in more than 7 years
> > > it means this path of the code is not used.
> >
> > Acked-by: Christophe Fergeau <cfergeau at redhat.com>
> >
> > This begs the question of what to do with the rest of the VERIFY_PUBKEY
> > code paths. Maybe they are used without migration, but my guess would be
> > that they aren't. It's probably enough to check when was the last time
> > ovirt used that, if ever.
> >
> > Christophe
> >
>
> I would start with some grep:
>
> $ cgrep '"pubkey"'
> ./src/spice-session.c: g_param_spec_boxed("pubkey",
> ./src/spice-session.c: "pubkey", &c->pubkey,
> ./src/spice-glib-enums.c: { SPICE_SESSION_VERIFY_PUBKEY, "SPICE_SESSION_VERIFY_PUBKEY", "pubkey" },
> $ cgrep SPICE_SESSION_VERIFY_PUBKEY
> ./src/spice-session.h: * @SPICE_SESSION_VERIFY_PUBKEY: verify certificate public key matching
> ./src/spice-session.h: SPICE_SESSION_VERIFY_PUBKEY = (1 << 0),
> ./src/spice-session.c: s->verify |= SPICE_SESSION_VERIFY_PUBKEY;
> ./src/spice-session.c: s->verify &= ~SPICE_SESSION_VERIFY_PUBKEY;
> ./src/spice-channel.c: if (verify & SPICE_SESSION_VERIFY_PUBKEY) {
> ./src/spice-channel.c: verify = SPICE_SESSION_VERIFY_PUBKEY;
> ./src/spice-glib-enums.c: { SPICE_SESSION_VERIFY_PUBKEY, "SPICE_SESSION_VERIFY_PUBKEY", "pubkey" },
>
> So looks like "pubkey" property is never set and so SPICE_SESSION_VERIFY_PUBKEY
> is also never set.
This could be set from a client application,
SpiceSession *session;
g_object_set(session, "pubkey", my_pubkey, NULL);
even though I doubt this happens
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190221/55752435/attachment.sig>
More information about the Spice-devel
mailing list