7 class HTTPSCertConnection(httplib.HTTPSConnection):
8 def __init__(self, host):
9 httplib.HTTPSConnection.__init__(self, host, None, key_file, cert_file)
11 class HTTPSCertHandler(urllib2.HTTPSHandler):
12 def do_open(self, http_class, req):
13 if http_class is httplib.HTTPSConnection:
14 http_class = HTTPSCertConnection
15 return urllib2.HTTPSHandler.do_open(self, http_class, req)
17 opener = urllib2.build_opener(urllib2.HTTPRedirectHandler, HTTPSCertHandler)
18 urllib2.install_opener(opener)
20 #req = urllib2.Request(url='https://geofft.scripts.mit.edu:444/detect.php')
21 #f = urllib2.urlopen(req)
24 req = urllib2.Request(url='https://jira.mit.edu/jira/secure/mit_login.jsp?os_destination=/secure/Dashboard.jspa')
25 print urllib2.urlopen(req).read()