--- xmlrpclib.py.orig 2007-12-10 17:00:49.000000000 -0200 +++ xmlrpclib.py 2007-12-10 17:37:55.000000000 -0200 @@ -1185,6 +1185,7 @@ errcode, errmsg, headers = h.getreply() if errcode != 200: + host, extra, x509 = self.get_host_info(host) raise ProtocolError( host + handler, errcode, errmsg, @@ -1382,7 +1383,8 @@ """uri [,options] -> a logical connection to an XML-RPC server uri is the connection point on the server, given as - scheme://host/target. + scheme://host/target. It can also be a tuple of the form (uri,x509_dict) + where x509_dict is a dictionary specifying files for SSL key and certificate. The standard implementation always supports the "http" scheme. If SSL socket support is available (Python 2.0), it also supports @@ -1404,12 +1406,17 @@ allow_none=0, use_datetime=0): # establish a "logical" server connection + x509 = {} # get the url import urllib + if isinstance(uri, TupleType): + uri, x509 = uri type, uri = urllib.splittype(uri) if type not in ("http", "https"): raise IOError, "unsupported XML-RPC protocol" self.__host, self.__handler = urllib.splithost(uri) + if x509: + self.__host = (self.__host, x509) if not self.__handler: self.__handler = "/RPC2"