httplib.HTTPSConnection with X.509 Key & Cert
I'm trying to do a HTTPSConnection to a server using a key and certificate:
connection = httplib.HTTPSConnection(host, 443, key_file, cert_file)
response = connection.getresponse()
print response.status, response.reason
print sys.exc_type, sys.exc_value
When I try and run this I get the mesage:
'socket.error Unsupported feature' from the request() call. I can, however, make the HTTPS request without the key and certificate.
Looking through the source for httplib.py and socket.py I can't seem to find why this is unsupported.
Can anyone tell me if this can be done? (or what I'm doing wrong?)