From: David E. K. <dek...@lb...> - 2006-09-26 21:47:57
|
Hi folks, Just recently I needed to talk to a web service (Condor SOAP) that requires the client to provide a certificate when using https URLs (SSL). For the edification of the list, here's a small fragment that shows how to provide a cert and key for the SSL connection: kw = {} kw['transport'] = httplib.HTTPSConnection ## only necessary if not specifying an https URL kw['transdict'] = {'key_file': '/home/portnoy/u5/dek/.globus/userkey.pem', 'cert_file': '/home/portnoy/u5/dek/.globus/usercert.pem'} self._collectorLocator = condorCollector_services.condorCollectorLocator() self._collector = self._collectorLocator.getcondorCollectorPortType(self._url, **kw) The 'transdict' is passed in as the keyword arguments to the transport, which in the https/SSL case will be an httplib.HTTPSConnection. I've successfully tested this with the Condor SOAP web service. Dave |