| |
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><title>Python: module gdata.tlslite.integration.XMLRPCTransport</title> |
| </head><body bgcolor="#f0f0f8"> |
| |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
| <tr bgcolor="#7799ee"> |
| <td valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="gdata.html"><font color="#ffffff">gdata</font></a>.<a href="gdata.tlslite.html"><font color="#ffffff">tlslite</font></a>.<a href="gdata.tlslite.integration.html"><font color="#ffffff">integration</font></a>.XMLRPCTransport</strong></big></big></font></td |
| ><td align=right valign=bottom |
| ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/google/home/afshar/src/external-gdata-release/google3/src/gdata/tlslite/integration/XMLRPCTransport.py">/usr/local/google/home/afshar/src/external-gdata-release/google3/src/gdata/tlslite/integration/XMLRPCTransport.py</a></font></td></tr></table> |
| <p><tt>TLS Lite + xmlrpclib.</tt></p> |
| <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#aa55cc"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> |
| <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="httplib.html">httplib</a><br> |
| </td><td width="25%" valign=top><a href="xmlrpclib.html">xmlrpclib</a><br> |
| </td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ee77aa"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> |
| <td width="100%"><dl> |
| <dt><font face="helvetica, arial"><a href="gdata.tlslite.integration.ClientHelper.html#ClientHelper">gdata.tlslite.integration.ClientHelper.ClientHelper</a> |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="gdata.tlslite.integration.XMLRPCTransport.html#XMLRPCTransport">XMLRPCTransport</a>(<a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a>, <a href="gdata.tlslite.integration.ClientHelper.html#ClientHelper">gdata.tlslite.integration.ClientHelper.ClientHelper</a>) |
| </font></dt></dl> |
| </dd> |
| <dt><font face="helvetica, arial"><a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a> |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="gdata.tlslite.integration.XMLRPCTransport.html#XMLRPCTransport">XMLRPCTransport</a>(<a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a>, <a href="gdata.tlslite.integration.ClientHelper.html#ClientHelper">gdata.tlslite.integration.ClientHelper.ClientHelper</a>) |
| </font></dt></dl> |
| </dd> |
| </dl> |
| <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="XMLRPCTransport">class <strong>XMLRPCTransport</strong></a>(<a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a>, <a href="gdata.tlslite.integration.ClientHelper.html#ClientHelper">gdata.tlslite.integration.ClientHelper.ClientHelper</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>Handles an HTTPS transaction to an XML-RPC server.<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%"><dl><dt>Method resolution order:</dt> |
| <dd><a href="gdata.tlslite.integration.XMLRPCTransport.html#XMLRPCTransport">XMLRPCTransport</a></dd> |
| <dd><a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a></dd> |
| <dd><a href="gdata.tlslite.integration.ClientHelper.html#ClientHelper">gdata.tlslite.integration.ClientHelper.ClientHelper</a></dd> |
| </dl> |
| <hr> |
| Methods defined here:<br> |
| <dl><dt><a name="XMLRPCTransport-__init__"><strong>__init__</strong></a>(self, username<font color="#909090">=None</font>, password<font color="#909090">=None</font>, sharedKey<font color="#909090">=None</font>, certChain<font color="#909090">=None</font>, privateKey<font color="#909090">=None</font>, cryptoID<font color="#909090">=None</font>, protocol<font color="#909090">=None</font>, x509Fingerprint<font color="#909090">=None</font>, x509TrustList<font color="#909090">=None</font>, x509CommonName<font color="#909090">=None</font>, settings<font color="#909090">=None</font>)</dt><dd><tt>Create a new <a href="#XMLRPCTransport">XMLRPCTransport</a>.<br> |
| <br> |
| An instance of this class can be passed to L{xmlrpclib.ServerProxy}<br> |
| to use TLS with XML-RPC calls::<br> |
| <br> |
| from tlslite.api import <a href="#XMLRPCTransport">XMLRPCTransport</a><br> |
| from xmlrpclib import ServerProxy<br> |
| <br> |
| transport = <a href="#XMLRPCTransport">XMLRPCTransport</a>(user="alice", password="abra123")<br> |
| server = ServerProxy("https://localhost", transport)<br> |
| <br> |
| For client authentication, use one of these argument<br> |
| combinations:<br> |
| - username, password (SRP)<br> |
| - username, sharedKey (shared-key)<br> |
| - certChain, privateKey (certificate)<br> |
| <br> |
| For server authentication, you can either rely on the<br> |
| implicit mutual authentication performed by SRP or<br> |
| shared-keys, or you can do certificate-based server<br> |
| authentication with one of these argument combinations:<br> |
| - cryptoID[, protocol] (requires cryptoIDlib)<br> |
| - x509Fingerprint<br> |
| - x509TrustList[, x509CommonName] (requires cryptlib_py)<br> |
| <br> |
| Certificate-based server authentication is compatible with<br> |
| SRP or certificate-based client authentication. It is<br> |
| not compatible with shared-keys.<br> |
| <br> |
| The constructor does not perform the TLS handshake itself, but<br> |
| simply stores these arguments for later. The handshake is<br> |
| performed only when this class needs to connect with the<br> |
| server. Thus you should be prepared to handle TLS-specific<br> |
| exceptions when calling methods of L{xmlrpclib.ServerProxy}. See the<br> |
| client handshake functions in<br> |
| L{tlslite.TLSConnection.TLSConnection} for details on which<br> |
| exceptions might be raised.<br> |
| <br> |
| @type username: str<br> |
| @param username: SRP or shared-key username. Requires the<br> |
| 'password' or 'sharedKey' argument.<br> |
| <br> |
| @type password: str<br> |
| @param password: SRP password for mutual authentication.<br> |
| Requires the 'username' argument.<br> |
| <br> |
| @type sharedKey: str<br> |
| @param sharedKey: Shared key for mutual authentication.<br> |
| Requires the 'username' argument.<br> |
| <br> |
| @type certChain: L{tlslite.X509CertChain.X509CertChain} or<br> |
| L{cryptoIDlib.CertChain.CertChain}<br> |
| @param certChain: Certificate chain for client authentication.<br> |
| Requires the 'privateKey' argument. Excludes the SRP or<br> |
| shared-key related arguments.<br> |
| <br> |
| @type privateKey: L{tlslite.utils.RSAKey.RSAKey}<br> |
| @param privateKey: Private key for client authentication.<br> |
| Requires the 'certChain' argument. Excludes the SRP or<br> |
| shared-key related arguments.<br> |
| <br> |
| @type cryptoID: str<br> |
| @param cryptoID: cryptoID for server authentication. Mutually<br> |
| exclusive with the 'x509...' arguments.<br> |
| <br> |
| @type protocol: str<br> |
| @param protocol: cryptoID protocol URI for server<br> |
| authentication. Requires the 'cryptoID' argument.<br> |
| <br> |
| @type x509Fingerprint: str<br> |
| @param x509Fingerprint: Hex-encoded X.509 fingerprint for<br> |
| server authentication. Mutually exclusive with the 'cryptoID'<br> |
| and 'x509TrustList' arguments.<br> |
| <br> |
| @type x509TrustList: list of L{tlslite.X509.X509}<br> |
| @param x509TrustList: A list of trusted root certificates. The<br> |
| other party must present a certificate chain which extends to<br> |
| one of these root certificates. The cryptlib_py module must be<br> |
| installed to use this parameter. Mutually exclusive with the<br> |
| 'cryptoID' and 'x509Fingerprint' arguments.<br> |
| <br> |
| @type x509CommonName: str<br> |
| @param x509CommonName: The end-entity certificate's 'CN' field<br> |
| must match this value. For a web server, this is typically a<br> |
| server name such as 'www.amazon.com'. Mutually exclusive with<br> |
| the 'cryptoID' and 'x509Fingerprint' arguments. Requires the<br> |
| 'x509TrustList' argument.<br> |
| <br> |
| @type settings: L{tlslite.HandshakeSettings.HandshakeSettings}<br> |
| @param settings: Various settings which can be used to control<br> |
| the ciphersuites, certificate types, and SSL/TLS versions<br> |
| offered by the client.</tt></dd></dl> |
| |
| <dl><dt><a name="XMLRPCTransport-make_connection"><strong>make_connection</strong></a>(self, host)</dt></dl> |
| |
| <hr> |
| Methods inherited from <a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a>:<br> |
| <dl><dt><a name="XMLRPCTransport-close"><strong>close</strong></a>(self)</dt><dd><tt>##<br> |
| # Clear any cached connection object.<br> |
| # Used in the event of socket errors.</tt></dd></dl> |
| |
| <dl><dt><a name="XMLRPCTransport-get_host_info"><strong>get_host_info</strong></a>(self, host)</dt></dl> |
| |
| <dl><dt><a name="XMLRPCTransport-getparser"><strong>getparser</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="XMLRPCTransport-parse_response"><strong>parse_response</strong></a>(self, response)</dt></dl> |
| |
| <dl><dt><a name="XMLRPCTransport-request"><strong>request</strong></a>(self, host, handler, request_body, verbose<font color="#909090">=0</font>)</dt></dl> |
| |
| <dl><dt><a name="XMLRPCTransport-send_content"><strong>send_content</strong></a>(self, connection, request_body)</dt></dl> |
| |
| <dl><dt><a name="XMLRPCTransport-send_host"><strong>send_host</strong></a>(self, connection, host)</dt></dl> |
| |
| <dl><dt><a name="XMLRPCTransport-send_request"><strong>send_request</strong></a>(self, connection, handler, request_body)</dt></dl> |
| |
| <dl><dt><a name="XMLRPCTransport-send_user_agent"><strong>send_user_agent</strong></a>(self, connection)</dt></dl> |
| |
| <dl><dt><a name="XMLRPCTransport-single_request"><strong>single_request</strong></a>(self, host, handler, request_body, verbose<font color="#909090">=0</font>)</dt></dl> |
| |
| <hr> |
| Data and other attributes inherited from <a href="xmlrpclib.html#Transport">xmlrpclib.Transport</a>:<br> |
| <dl><dt><strong>accept_gzip_encoding</strong> = True</dl> |
| |
| <dl><dt><strong>encode_threshold</strong> = None</dl> |
| |
| <dl><dt><strong>user_agent</strong> = 'xmlrpclib.py/1.0.1 (by www.pythonware.com)'</dl> |
| |
| </td></tr></table></td></tr></table> |
| </body></html> |