README.rst 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ========
  2. Examples
  3. ========
  4. certgen.py -- Certificate generation module
  5. ===========================================
  6. Example module with three functions:
  7. createKeyPair
  8. Create a public/private key pair.
  9. createCertRequest
  10. Create a certificate request.
  11. createCertificate
  12. Create a certificate given a cert request.
  13. In fact, I created the certificates and keys in the 'simple' directory with the script ``mk_simple_certs.py``.
  14. simple -- Simple client/server example
  15. ======================================
  16. Start the server with::
  17. python server.py PORT
  18. and start clients with::
  19. python client.py HOST PORT
  20. The server is a simple echo server, anything a client sends, it sends back.
  21. proxy.py -- Example of an SSL-enabled proxy
  22. ===========================================
  23. The proxy example demonstrate how to use set_connect_state to start talking SSL over an already connected socket.
  24. Usage::
  25. python proxy.py server[:port] proxy[:port]
  26. Contributed by Mihai Ibanescu
  27. SecureXMLRPCServer.py -- SSL-enabled version of SimpleXMLRPCServer
  28. ==================================================================
  29. Acts exactly like `SimpleXMLRPCServer <https://docs.python.org/3/library/xmlrpc.server.html>`_ from the Python standard library, but uses secure connections.
  30. The technique and classes should work for any SocketServer style server.
  31. However, the code has not been extensively tested.
  32. Contributed by Michal Wallace