# evennia.server.portal.telnet_ssl

This allows for running the telnet communication over an encrypted SSL tunnel. To use it, requires a client supporting Telnet SSL.

The protocol will try to automatically create the private key and certificate on the server side when starting and will warn if this was not possible. These will appear as files ssl.key and ssl.cert in mygame/server/.

class `evennia.server.portal.telnet_ssl.``SSLProtocol`(*args, **kwargs)

  Bases: `evennia.server.portal.telnet.TelnetProtocol`

  Communication is the same as telnet, except data transfer is done with encryption set up by the portal at start time.

  `__init__`(*args, **kwargs)

    Initialize self. See help(type(self)) for accurate signature.

`evennia.server.portal.telnet_ssl.``verify_or_create_SSL_key_and_cert`(keyfile, certfile)

  Verify or create new key/certificate files.

  Parameters

    - keyfile (str) – Path to ssl.key file.

    - certfile (str) – Parth to ssl.cert file.

  Notes

  If files don’t already exist, they are created.

`evennia.server.portal.telnet_ssl.``getSSLContext`()

  This is called by the portal when creating the SSL context server-side.

  Returns

    ssl_context (tuple) –

    A key and certificate that is either

      existing previously or created on the fly.