File glanceclient-ssl-checks.patch of Package python-glanceclient

Binary files a/glanceclient/common/.http.py.swp and b/glanceclient/common/.http.py.swp differ
diff -ruN a/glanceclient/common/http.py b/glanceclient/common/http.py
--- a/glanceclient/common/http.py	2012-12-12 01:29:25.000000000 +0100
+++ b/glanceclient/common/http.py	2013-08-05 10:34:10.928399690 +0200
@@ -291,11 +291,13 @@
 
     def verify_callback(self, connection, x509, errnum,
                         depth, preverify_ok):
+        # NOTE(leaman): preverify_ok may be a non-boolean type
+        preverify_ok = bool(preverify_ok)
         if x509.has_expired():
             msg = "SSL Certificate expired on '%s'" % x509.get_notAfter()
             raise exc.SSLCertificateError(msg)
 
-        if depth == 0 and preverify_ok is True:
+        if depth == 0 and preverify_ok:
             # We verify that the host matches against the last
             # certificate in the chain
             return self.host_matches_cert(self.host, x509)
openSUSE Build Service is sponsored by