Hi Gary, ack code review only. A question, with this changes it looks as an arbitrary client can just connect to the TCP server and e.g. monitor the "connect state" of the TCP server, but to exchange any data an SSL session has to be established after the TCP connect, if so I think this change looks good./BR Hans
-----Original Message----- From: Gary Lee <[email protected]> Sent: den 11 oktober 2019 05:22 To: Hans Nordebäck <[email protected]>; Minh Hon Chau <[email protected]>; Thuan Tran <[email protected]> Cc: [email protected]; Gary Lee <[email protected]> Subject: [PATCH 1/1] osaf: perform handshake in tcp_server in new thread [#3099] --- src/osaf/consensus/plugins/tcp/tcp_server.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/osaf/consensus/plugins/tcp/tcp_server.py b/src/osaf/consensus/plugins/tcp/tcp_server.py index a7f22f2..c10859c 100755 --- a/src/osaf/consensus/plugins/tcp/tcp_server.py +++ b/src/osaf/consensus/plugins/tcp/tcp_server.py @@ -73,10 +73,15 @@ class ThreadedRPCServer(ThreadingMixIn, certfile=CERTFILE, keyfile=KEYFILE, cert_reqs=ssl.CERT_NONE, - ssl_version=ssl.PROTOCOL_TLSv1_2) + ssl_version=ssl.PROTOCOL_TLSv1_2, + do_handshake_on_connect=False) self.server_bind() self.server_activate() + def finish_request(self, request, client_address): + request.do_handshake() + return SimpleXMLRPCServer.finish_request(self, request, client_address) + class Arbitrator(object): """ Implementation of a simple arbitrator """ -- 2.7.4 _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
