python xmlrpc client with ssl client certificates and standard modules

News123 news123 at
Mon Jan 4 03:12:09 CET 2010


I was googling fot quite some time and was not really succesfull.

I found one solution, which I will try soon.
It is
(found in )

This will probably work, but it requires the module M2Crypto.

In order to avoid installing M2Crypto an all hosts that want to run the
script I wondered, whether there is no other solution.

I can do xmlrpc over ssl WITHOUT certificates with following code:

import xmlrpclib
server_url = 'https://myserver'
server = xmlrpclib.Server(server_url);

and I can perform a https get request WITH certificates with below snippet:

import httplib
conn = httplib.HTTPSConnection(
    	key_file = KEYFILE,
    	cert_file = CERTFILE
conn.putrequest('GET', '/')
response = conn.getresponse()

I'm just lost of how to 'combine' both.

Thanks in advance for any suggestions / hints


More information about the Python-list mailing list