Jean-Paul Calderone | 897bc25 | 2008-02-18 20:50:23 -0500 | [diff] [blame^] | 1 | I've finally gotten around to writing some examples :-) |
| 2 | |
| 3 | They aren't many, but at least it's something. If you write any, feel free to |
| 4 | send them to me and I will add themn. |
| 5 | |
| 6 | |
| 7 | certgen.py - Certificate generation module |
| 8 | ========================================== |
| 9 | |
| 10 | Example module with three functions: |
| 11 | createKeyPair - Create a public/private key pair |
| 12 | createCertRequest - Create a certificate request |
| 13 | createCertificate - Create a certificate given a cert request |
| 14 | In fact, I created the certificates and keys in the 'simple' directory with |
| 15 | the script mk_simple_certs.py |
| 16 | |
| 17 | |
| 18 | simple - Simple client/server example |
| 19 | ===================================== |
| 20 | |
| 21 | Start the server with |
| 22 | python server.py PORT |
| 23 | and start clients with |
| 24 | python client.py HOST PORT |
| 25 | |
| 26 | The server is a simple echo server, anything a client sends, it sends back. |
| 27 | |
| 28 | |
| 29 | proxy.py - Example of an SSL-enabled proxy |
| 30 | ========================================== |
| 31 | |
| 32 | The proxy example demonstrate how to use set_connect_state to start |
| 33 | talking SSL over an already connected socket. |
| 34 | |
| 35 | Usage: python proxy.py server[:port] proxy[:port] |
| 36 | |
| 37 | Contributed by Mihai Ibanescu |
| 38 | |
| 39 | |
| 40 | SecureXMLRPCServer.py - SSL-enabled version of SimpleXMLRPCServer |
| 41 | ================================================================= |
| 42 | |
| 43 | This acts exactly like SimpleXMLRPCServer from the standard python library, |
| 44 | but uses secure connections. The technique and classes should work for any |
| 45 | SocketServer style server. However, the code has not been extensively tested. |
| 46 | |
| 47 | Contributed by Michal Wallace |
| 48 | |