Skip to content

Commit

Permalink
Use SSLv23 for ifmap clients. SSLv3 is no longer supported.
Browse files Browse the repository at this point in the history
Change-Id: Ia54d4b4fbacb06717dee62a561bfbed8224a9b90
Partial-Bug: 1414790
  • Loading branch information
Sachin Bansal authored and Sachin Bansal committed Feb 11, 2015
1 parent 969dbf3 commit f2c526c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ifmap-python-async.patch
Expand Up @@ -29,8 +29,8 @@

except HttpException, e:
+ log.error("HTTP Connection error in IF-MAP client: %s", e.reason)
+ except:
+ log.error("Uknown error sending IF-MAP message to server")
+ except Exception as e:
+ log.error("Uknown error sending IF-MAP message to server %s", str(e))
+ raise
+
+ def call_async_result(self, method, body):
Expand Down
8 changes: 4 additions & 4 deletions ifmap-python-patch1.diff
Expand Up @@ -18,7 +18,7 @@ index c0f748c..103caa6 100644
+
+import base64
+import cStringIO
+
+import sys
+
+
from logging import getLogger
Expand All @@ -29,7 +29,6 @@ index c0f748c..103caa6 100644
return f.info(), f.read()

+#import urllib2 as http_client_lib
+#HttpException = (http_client_lib.URLError, http_client_lib.HTTPError)
+#class Http(): # wrapper to use when httplib2 not available
+# def request(self, url, method, body, headers):
+# f = http_client_lib.urlopen(http_client_lib.Request(url, body, headers))
Expand All @@ -47,7 +46,6 @@ index c0f748c..103caa6 100644
IF-MAP client
"""
- http = Http()
+ #http = Http()
+
__url = None
__session_id = None
Expand All @@ -57,8 +55,10 @@ index c0f748c..103caa6 100644
__namespaces = None
+ __ssl_options = {
+ 'cert_reqs' : gevent.ssl.CERT_NONE,
+ 'ssl_version' : PROTOCOL_SSLv3
+ 'ssl_version' : PROTOCOL_SSLv23,
+ }
+ if sys.version_info >= (2,7):
+ __ssl_options['ciphers'] = "RC4-SHA"

__envelope ="""<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" %(ns)s>
Expand Down

0 comments on commit f2c526c

Please sign in to comment.