@@ -162,11 +162,11 @@ def connect_client(self):
162162
163163 def test_handshake (self ):
164164 agent = self .start_daemon_with_agent ()
165- agent .handshake ()
165+ agent .handshake (protocol_version = 4 )
166166
167167 def test_trigger_service_refused (self ):
168168 agent = self .start_daemon_with_agent ()
169- agent .handshake ()
169+ agent .handshake (protocol_version = 4 )
170170
171171 target_domain_name = "target_domain"
172172 ident = "SOCKET42"
@@ -179,7 +179,7 @@ def test_trigger_service_refused(self):
179179
180180 def test_bad_request_id_1 (self ):
181181 agent = self .start_daemon_with_agent ()
182- agent .handshake ()
182+ agent .handshake (protocol_version = 4 )
183183
184184 target_domain_name = "target_domain"
185185 ident = "\1 \2 \3 "
@@ -193,7 +193,7 @@ def test_bad_request_id_1(self):
193193
194194 def test_bad_request_id_empty (self ):
195195 agent = self .start_daemon_with_agent ()
196- agent .handshake ()
196+ agent .handshake (protocol_version = 4 )
197197
198198 target_domain_name = "target_domain"
199199 ident = ""
@@ -207,7 +207,7 @@ def test_bad_request_id_empty(self):
207207
208208 def test_bad_request_id_bad_byte_after_nul_terminator (self ):
209209 agent = self .start_daemon_with_agent ()
210- agent .handshake ()
210+ agent .handshake (protocol_version = 4 )
211211
212212 target_domain_name = "target_domain"
213213 ident = "a\0 b"
@@ -229,7 +229,7 @@ def test_bad_old_style_request(self):
229229 message_type , data = agent .recv_message ()
230230 self .assertEqual (message_type , qrexec .MSG_HELLO )
231231 (ver ,) = struct .unpack ("<L" , data )
232- self .assertEqual (ver , 4 )
232+ self .assertEqual (ver , 2 )
233233
234234 target_domain_name = "target_domain"
235235 ident = b"ab"
@@ -262,7 +262,7 @@ def test_bad_new_style_request(self):
262262 Test that qrexec-daemon rejects various invalid requests.
263263 """
264264 agent = self .start_daemon_with_agent ()
265- agent .handshake ()
265+ agent .handshake (protocol_version = 4 )
266266
267267 target_domain_name = "target_domain"
268268 ident = "ab"
@@ -305,7 +305,7 @@ def test_new_style_request(self):
305305 Test that qrexec-daemon accepts request.
306306 """
307307 agent = self .start_daemon_with_agent ()
308- agent .handshake ()
308+ agent .handshake (protocol_version = 4 )
309309
310310 ident = "ab"
311311
@@ -374,7 +374,7 @@ def test_qsb_089(self):
374374 Test that qrexec-daemon doesn't corrupt memory on empty request
375375 """
376376 agent = self .start_daemon_with_agent ()
377- agent .handshake ()
377+ agent .handshake (protocol_version = 4 )
378378
379379 target_domain_name = "target_domain"
380380 ident = "ab"
@@ -432,14 +432,14 @@ def trigger_service(
432432
433433 def test_client_handshake (self ):
434434 agent = self .start_daemon_with_agent ()
435- agent .handshake ()
435+ agent .handshake (protocol_version = 4 )
436436
437437 client = self .connect_client ()
438438 client .handshake ()
439439
440440 def test_restart_agent (self ):
441441 agent = self .start_daemon_with_agent ()
442- agent .handshake ()
442+ agent .handshake (protocol_version = 4 )
443443
444444 agent .close ()
445445
@@ -452,15 +452,15 @@ def test_restart_agent(self):
452452
453453 agent = self .connect_agent ()
454454 agent .accept ()
455- agent .handshake ()
455+ agent .handshake (protocol_version = 4 )
456456
457457 # Now, new client should be able to connect
458458 client = self .connect_client ()
459459 client .handshake ()
460460
461461 def test_terminate_before_restart (self ):
462462 agent = self .start_daemon_with_agent ()
463- agent .handshake ()
463+ agent .handshake (protocol_version = 4 )
464464
465465 agent .close ()
466466
@@ -475,7 +475,7 @@ def test_terminate_before_restart(self):
475475
476476 def test_client_exec (self ):
477477 agent = self .start_daemon_with_agent ()
478- agent .handshake ()
478+ agent .handshake (protocol_version = 4 )
479479
480480 cmd = "user:echo Hello world"
481481 port = self .client_exec (0 , cmd , qrexec .MSG_JUST_EXEC )
@@ -508,7 +508,7 @@ def client_exec(
508508
509509 def test_client_exec_allocates_next_port (self ):
510510 agent = self .start_daemon_with_agent ()
511- agent .handshake ()
511+ agent .handshake (protocol_version = 4 )
512512
513513 domain1 = self .domain + 1
514514 domain2 = self .domain + 2
@@ -519,7 +519,7 @@ def test_client_exec_allocates_next_port(self):
519519
520520 def test_client_exec_connection_terminated (self ):
521521 agent = self .start_daemon_with_agent ()
522- agent .handshake ()
522+ agent .handshake (protocol_version = 4 )
523523
524524 domain1 = self .domain + 1
525525 domain2 = self .domain + 2
@@ -537,7 +537,7 @@ def test_client_exec_connection_terminated(self):
537537
538538 def test_client_service_connect (self ):
539539 agent = self .start_daemon_with_agent ()
540- agent .handshake ()
540+ agent .handshake (protocol_version = 4 )
541541
542542 target_domain = self .domain + 1
543543 target_domain_name = "target_domain"
@@ -571,7 +571,7 @@ def test_client_service_connect(self):
571571
572572 def test_client_service_connect_unexpected (self ):
573573 agent = self .start_daemon_with_agent ()
574- agent .handshake ()
574+ agent .handshake (protocol_version = 4 )
575575
576576 client = self .connect_client ()
577577 client .handshake ()
@@ -595,7 +595,7 @@ def test_client_service_connect_unexpected(self):
595595
596596 def test_client_service_connect_double (self ):
597597 agent = self .start_daemon_with_agent ()
598- agent .handshake ()
598+ agent .handshake (protocol_version = 4 )
599599
600600 target_domain = self .domain + 1
601601 target_domain_name = "target_domain"
@@ -750,7 +750,7 @@ def test_run_vm_command_from_dom0(self):
750750 )
751751
752752 target = self .connect_target (target_domain , target_port )
753- target .handshake ()
753+ target .handshake (protocol_version = 4 )
754754
755755 # select_loop
756756 target .send_message (qrexec .MSG_DATA_STDOUT , b"stdout data\n " )
@@ -790,7 +790,7 @@ def test_run_vm_command_from_dom0_reject_stdin(self):
790790 )
791791
792792 target = self .connect_target (target_domain , target_port )
793- target .handshake ()
793+ target .handshake (protocol_version = 4 )
794794
795795 self .client .send_signal (signal .SIGSTOP )
796796
@@ -850,7 +850,7 @@ def test_run_vm_command_from_dom0_with_local_command(self):
850850 )
851851
852852 target = self .connect_target (target_domain , target_port )
853- target .handshake ()
853+ target .handshake (protocol_version = 4 )
854854
855855 # select_loop
856856 target .send_message (qrexec .MSG_DATA_STDOUT , b"stdout data\n " )
@@ -957,7 +957,7 @@ def connect_service_request(self, cmd, timeout=None):
957957 )
958958
959959 source .accept ()
960- source .handshake ()
960+ source .handshake (protocol_version = 4 )
961961 self .assertEqual (source .recv_message (), (qrexec .MSG_DATA_STDERR , b"" ))
962962 return source
963963
0 commit comments