[Spice-commits] src/channel-main.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 21 13:59:49 UTC 2019


 src/channel-main.c |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

New commits:
commit 10f99472db97c10be6a2b35bf22c715533d242fe
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Mon Feb 18 18:21:33 2019 +0000

    channel-main: Do not use not present protocol fields
    
    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.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/src/channel-main.c b/src/channel-main.c
index f8be9ff..6274b59 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -2301,16 +2301,7 @@ static gboolean migrate_connect(gpointer data)
     sport = info->sport;
     host = (char*)info->host_data;
 
-    if (c->peer_hdr.major_version == 2 && c->peer_hdr.minor_version < 1) {
-        GByteArray *pubkey = g_byte_array_new();
-
-        g_byte_array_append(pubkey, info->pub_key_data, info->pub_key_size);
-        g_object_set(mig->session,
-                     "pubkey", pubkey,
-                     "verify", SPICE_SESSION_VERIFY_PUBKEY,
-                     NULL);
-        g_byte_array_unref(pubkey);
-    } else if (info->cert_subject_size == 0 ||
+    if (info->cert_subject_size == 0 ||
                strlen((const char*)info->cert_subject_data) == 0) {
         /* only verify hostname if no cert subject */
         g_object_set(mig->session, "verify", SPICE_SESSION_VERIFY_HOSTNAME, NULL);


More information about the Spice-commits mailing list