Commit | Line | Data |
---|---|---|
684f97f8 EF |
1 | https://gitlab.gnome.org/GNOME/vinagre/merge_requests/4.patch |
2 | ||
3 | From 141f9383129795da267a8111897fb3a0a324b080 Mon Sep 17 00:00:00 2001 | |
4 | From: Ondrej Holy <oholy@redhat.com> | |
5 | Date: Thu, 22 Nov 2018 17:22:35 +0100 | |
6 | Subject: [PATCH 2/2] Handle new RDP certificate parameters | |
7 | ||
8 | The freerdp2 certificate callbacks contains more parameters, let's | |
9 | present some of them to user also. | |
10 | --- | |
11 | data/vinagre.ui | 80 ++++++++++++++++++++++++++++++----- | |
12 | plugins/rdp/vinagre-rdp-tab.c | 26 +++++------- | |
13 | 2 files changed, 80 insertions(+), 26 deletions(-) | |
14 | ||
15 | diff --git a/data/vinagre.ui b/data/vinagre.ui | |
16 | index 3135336..d7ce258 100644 | |
17 | --- a/data/vinagre.ui | |
18 | +++ b/data/vinagre.ui | |
19 | @@ -885,7 +885,7 @@ Do you trust the new certificate?</property> | |
20 | <property name="vexpand">True</property> | |
21 | <property name="xalign">0</property> | |
22 | <property name="xpad">12</property> | |
23 | - <property name="label" translatable="yes" comments="Subject of the certificate.">Subject:</property> | |
24 | + <property name="label" translatable="yes" comments="Subject of the certificate.">New subject:</property> | |
25 | </object> | |
26 | <packing> | |
27 | <property name="left_attach">0</property> | |
28 | @@ -901,7 +901,7 @@ Do you trust the new certificate?</property> | |
29 | <property name="vexpand">True</property> | |
30 | <property name="xalign">0</property> | |
31 | <property name="xpad">12</property> | |
32 | - <property name="label" translatable="yes" comments="Issuer of the certificate.">Issuer:</property> | |
33 | + <property name="label" translatable="yes" comments="Issuer of the certificate.">New issuer:</property> | |
34 | </object> | |
35 | <packing> | |
36 | <property name="left_attach">0</property> | |
37 | @@ -927,7 +927,55 @@ Do you trust the new certificate?</property> | |
38 | </packing> | |
39 | </child> | |
40 | <child> | |
41 | - <object class="GtkLabel" id="certificate_changed_subject"> | |
42 | + <object class="GtkLabel"> | |
43 | + <property name="visible">True</property> | |
44 | + <property name="can_focus">False</property> | |
45 | + <property name="vexpand">True</property> | |
46 | + <property name="xalign">0</property> | |
47 | + <property name="xpad">12</property> | |
48 | + <property name="label" translatable="yes" comments="Subject of the old certificate.">Old subject:</property> | |
49 | + </object> | |
50 | + <packing> | |
51 | + <property name="left_attach">0</property> | |
52 | + <property name="top_attach">3</property> | |
53 | + <property name="width">1</property> | |
54 | + <property name="height">1</property> | |
55 | + </packing> | |
56 | + </child> | |
57 | + <child> | |
58 | + <object class="GtkLabel"> | |
59 | + <property name="visible">True</property> | |
60 | + <property name="can_focus">False</property> | |
61 | + <property name="vexpand">True</property> | |
62 | + <property name="xalign">0</property> | |
63 | + <property name="xpad">12</property> | |
64 | + <property name="label" translatable="yes" comments="Issuer of the old certificate.">Old issuer:</property> | |
65 | + </object> | |
66 | + <packing> | |
67 | + <property name="left_attach">0</property> | |
68 | + <property name="top_attach">4</property> | |
69 | + <property name="width">1</property> | |
70 | + <property name="height">1</property> | |
71 | + </packing> | |
72 | + </child> | |
73 | + <child> | |
74 | + <object class="GtkLabel"> | |
75 | + <property name="visible">True</property> | |
76 | + <property name="can_focus">False</property> | |
77 | + <property name="vexpand">True</property> | |
78 | + <property name="xalign">0</property> | |
79 | + <property name="xpad">12</property> | |
80 | + <property name="label" translatable="yes" comments="Fingerprint of the old certificate.">Old fingerprint:</property> | |
81 | + </object> | |
82 | + <packing> | |
83 | + <property name="left_attach">0</property> | |
84 | + <property name="top_attach">5</property> | |
85 | + <property name="width">1</property> | |
86 | + <property name="height">1</property> | |
87 | + </packing> | |
88 | + </child> | |
89 | + <child> | |
90 | + <object class="GtkLabel" id="certificate_changed_new_subject"> | |
91 | <property name="visible">True</property> | |
92 | <property name="can_focus">False</property> | |
93 | <property name="hexpand">True</property> | |
94 | @@ -942,7 +990,7 @@ Do you trust the new certificate?</property> | |
95 | </packing> | |
96 | </child> | |
97 | <child> | |
98 | - <object class="GtkLabel" id="certificate_changed_issuer"> | |
99 | + <object class="GtkLabel" id="certificate_changed_new_issuer"> | |
100 | <property name="visible">True</property> | |
101 | <property name="can_focus">False</property> | |
102 | <property name="hexpand">True</property> | |
103 | @@ -972,21 +1020,33 @@ Do you trust the new certificate?</property> | |
104 | </packing> | |
105 | </child> | |
106 | <child> | |
107 | - <object class="GtkLabel" id="certificate_changed_old_fingerprint_label"> | |
108 | + <object class="GtkLabel" id="certificate_changed_old_subject"> | |
109 | <property name="visible">True</property> | |
110 | <property name="can_focus">False</property> | |
111 | - <property name="vexpand">True</property> | |
112 | + <property name="hexpand">True</property> | |
113 | <property name="xalign">0</property> | |
114 | - <property name="xpad">12</property> | |
115 | - <property name="label" translatable="yes" comments="Fingerprint of the old certificate.">Old fingerprint:</property> | |
116 | </object> | |
117 | <packing> | |
118 | - <property name="left_attach">0</property> | |
119 | + <property name="left_attach">1</property> | |
120 | <property name="top_attach">3</property> | |
121 | <property name="width">1</property> | |
122 | <property name="height">1</property> | |
123 | </packing> | |
124 | </child> | |
125 | + <child> | |
126 | + <object class="GtkLabel" id="certificate_changed_old_issuer"> | |
127 | + <property name="visible">True</property> | |
128 | + <property name="can_focus">False</property> | |
129 | + <property name="hexpand">True</property> | |
130 | + <property name="xalign">0</property> | |
131 | + </object> | |
132 | + <packing> | |
133 | + <property name="left_attach">1</property> | |
134 | + <property name="top_attach">4</property> | |
135 | + <property name="width">1</property> | |
136 | + <property name="height">1</property> | |
137 | + </packing> | |
138 | + </child> | |
139 | <child> | |
140 | <object class="GtkLabel" id="certificate_changed_old_fingerprint"> | |
141 | <property name="visible">True</property> | |
142 | @@ -997,7 +1057,7 @@ Do you trust the new certificate?</property> | |
143 | </object> | |
144 | <packing> | |
145 | <property name="left_attach">1</property> | |
146 | - <property name="top_attach">3</property> | |
147 | + <property name="top_attach">5</property> | |
148 | <property name="width">1</property> | |
149 | <property name="height">1</property> | |
150 | </packing> | |
151 | diff --git a/plugins/rdp/vinagre-rdp-tab.c b/plugins/rdp/vinagre-rdp-tab.c | |
152 | index 28e3eb6..30a8698 100644 | |
153 | --- a/plugins/rdp/vinagre-rdp-tab.c | |
154 | +++ b/plugins/rdp/vinagre-rdp-tab.c | |
155 | @@ -917,6 +917,7 @@ frdp_certificate_verify (freerdp *instance, | |
156 | widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_fingerprint")); | |
157 | gtk_label_set_text (GTK_LABEL (widget), fingerprint); | |
158 | ||
159 | + /* FIXME: Warn user in case of host_mismatch. */ | |
160 | ||
161 | response = gtk_dialog_run (GTK_DIALOG (dialog)); | |
162 | gtk_widget_hide (dialog); | |
163 | @@ -939,7 +940,6 @@ frdp_changed_certificate_verify (freerdp *instance, | |
164 | GtkBuilder *builder; | |
165 | GtkWidget *dialog; | |
166 | GtkWidget *widget; | |
167 | - GtkWidget *label; | |
168 | gint response; | |
169 | ||
170 | builder = vinagre_utils_get_builder (); | |
171 | @@ -950,29 +950,23 @@ frdp_changed_certificate_verify (freerdp *instance, | |
172 | _("Connect"), GTK_RESPONSE_YES, NULL); | |
173 | gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES); | |
174 | ||
175 | - widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_subject")); | |
176 | + widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_new_subject")); | |
177 | gtk_label_set_text (GTK_LABEL (widget), subject); | |
178 | ||
179 | - widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_issuer")); | |
180 | + widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_new_issuer")); | |
181 | gtk_label_set_text (GTK_LABEL (widget), issuer); | |
182 | ||
183 | widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_new_fingerprint")); | |
184 | gtk_label_set_text (GTK_LABEL (widget), new_fingerprint); | |
185 | ||
186 | - widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_fingerprint")); | |
187 | - label = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_fingerprint_label")); | |
188 | - if (old_fingerprint != NULL && old_fingerprint[0] != '\0') | |
189 | - { | |
190 | - gtk_label_set_text (GTK_LABEL (widget), old_fingerprint); | |
191 | - gtk_widget_show (widget); | |
192 | - gtk_widget_show (label); | |
193 | - } | |
194 | - else | |
195 | - { | |
196 | - gtk_widget_hide (widget); | |
197 | - gtk_widget_hide (label); | |
198 | - } | |
199 | + widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_subject")); | |
200 | + gtk_label_set_text (GTK_LABEL (widget), old_subject); | |
201 | ||
202 | + widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_issuer")); | |
203 | + gtk_label_set_text (GTK_LABEL (widget), old_issuer); | |
204 | + | |
205 | + widget = GTK_WIDGET (gtk_builder_get_object (builder, "certificate_changed_old_fingerprint")); | |
206 | + gtk_label_set_text (GTK_LABEL (widget), old_fingerprint); | |
207 | ||
208 | response = gtk_dialog_run (GTK_DIALOG (dialog)); | |
209 | gtk_widget_hide (dialog); | |
210 | -- | |
211 | 2.18.1 | |
212 |