File osc-ssl-fix-hang-at-server-hello.patch of Package osc

From: Sebastian Parschauer <>
Date: Tue, 31 Jul 2018 18:13:37 +0200
Subject: SSL: Fix hang at server hello
References: boo#1068470
Patch-mainline: No, custom hack

An SSL_shutdown() is required to close the connection once a file is
downloaded from Otherwise resets (RST) are
visible in the tcpdump and it is possible that "osc co" hangs in
receiving the server hello as the client hello is continuously
repeated. This is timing related.

So add the missing close() method to class myHTTPSConnection and call
self.sock.close() in there which comes down to SSL_shutdown().
 osc/ |    4 ++++
 1 file changed, 4 insertions(+)

--- a/osc/
+++ b/osc/
@@ -300,6 +300,10 @@ class myHTTPSConnection(M2Crypto.httpsli
     def getPort(self):
         return self.port
+    # boo#1068470 - sparschauer hack
+    def close(self):
+        self.sock.close()
 class myProxyHTTPSConnection(M2Crypto.httpslib.ProxyHTTPSConnection, HTTPSConnection):
     def __init__(self, *args, **kwargs):
         self.appname = kwargs.pop('appname', 'generic')
openSUSE Build Service is sponsored by