spug.io.SSLServer
index
/home/mmuller/w/spug/io/SSLServer.py

Proactor based SSLServer implementation.
 
The SSL data handler is designed to wrap another data handler, allowing you
to easily SSLify any protocol with a data handler.

 
Classes
       
spug.io.proactor.ConnectHandler
io.SSLServer.SSLConnectHandler
spug.io.proactor.DataHandler
io.SSLServer.SSLDataHandler

 
class SSLConnectHandler(spug.io.proactor.ConnectHandler)
    Simple SSL HTTP Server implementation.
 
  Methods defined here:
__init__(self, delegateFactory, keyFile, certFile)
parms:
   delegateFactory::
      [callable<>] function that returns a delegate DataHandler
      for a new connection.  This will actually be the final producer
      and consumer of data passed through an @SSLDataHandler.
   keyFile::
      [string] name of the SSL private key file
   certFile::
      [string] name of the SSL certificate file
handleConnect(self, connection)
readyToClose(self)
shutdown(self)

 
class SSLDataHandler(spug.io.proactor.DataHandler)
     Methods defined here:
__del__(self)
__init__(self, delegate, keyFile, certFile)
parms:
   delegate::
      [@DataHandler] we pass all method invocations to this object as
      soon as the SSL initialization sequence is established.
   keyFile::
      [string] name of the SSL private key file
   certFile::
      [string] name of the SSL certificate file
get(self, size)
handleConnect(self)
peek(self, size)
put(self, data)
readyToClose(self)
readyToGet(self)
readyToPut(self)

Data and other attributes defined here:
ACCEPTING = 'ACCEPTING'
CLOSED = 'CLOSED'
CONNECTED = 'CONNECTED'
SHUTDOWN_PENDING = 'SHUTDOWN_PENDING'

Methods inherited from spug.io.proactor.DataHandler:
handleDisconnect(self)
Called by Proactor when the connection disconnects.
 
The handler should not attempt to deregister the object from the
proactor - this will be done automatically by the proactor.
 
May be implemented by derived classes, base class implementation does
nothing.
handleError(self)
Called by Proactor when an error occurs on the stream.
 
May be implemented by derived classes, base class implementation
deregisters.

 
Functions
       
BIO_ctrl_pending(...)
BIO_free(...)
BIO_new(...)
BIO_readx(...)
BIO_s_mem(...)
BIO_write(...)
SSL_CTX_free(...)
SSL_CTX_new(...)
SSL_CTX_use_PrivateKey_file(...)
SSL_CTX_use_certificate_file(...)
SSL_accept(...)
SSL_free(...)
SSL_get_error(...)
SSL_library_init(...)
SSL_new(...)
SSL_readx(...)
SSL_set_accept_state(...)
SSL_set_bio(...)
SSL_shutdown(...)
SSL_write(...)
SSLv23_method(...)

 
Data
        SSL_ERROR_NONE = 0
SSL_ERROR_SSL = 1
SSL_ERROR_SYSCALL = 5
SSL_ERROR_WANT_ACCEPT = 8
SSL_ERROR_WANT_CONNECT = 7
SSL_ERROR_WANT_READ = 2
SSL_ERROR_WANT_WRITE = 3
SSL_ERROR_WANT_X509_LOOKUP = 4
SSL_ERROR_ZERO_RETURN = 6
SSL_FILETYPE_PEM = 1