Dan Kenigsberg has submitted this change and it was merged.

Change subject: Explicitly shutdown  m2crypto socket
......................................................................


Explicitly shutdown  m2crypto socket

Aparently some versions of the m2crypto library don't shutdown correctly
underlying sockets when a SSL connection is closed.

In Python 2.6.6 (the version in RHEL6 and in CentOS6) when the XML RPC
server closes a connection it calls the shutdown method on that
connection with sock.SHUT_WR as the parameter. This works fine for plain
sockets, and works well also for SSL sockets using the builtin ssl
module as it translates the call to shutdown to a complete shutdown of
the SSL connection. But m2crypto does an different translation and the
net result is that the underlying SSL connection is not completely
closed.

In Python 2.7.3 (the version in Fedora 18) when the XML RPC server
closes a connection it calls the shutdown method on that connection with
sock.SHUT_RDWR, so no matter what SSL implementation is used the
underlying SSL connection is completely closed.

This patch changes the SSLSocket class so that it explicitly shuts down
and closes the underlying socket when  when the connection is closed.

Change-Id: Ie1a471aaccb32554b94340ebfb92b9d7ba14407a
Signed-off-by: Juan Hernandez <[email protected]>
---
M vdsm/SecureXMLRPCServer.py
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Dan Kenigsberg: Verified; Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/10972
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1a471aaccb32554b94340ebfb92b9d7ba14407a
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Andrey Gordeev <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to