Package ganeti :: Package http :: Class HttpBase
[hide private]
[frames] | no frames]

Class HttpBase

source code


Base class for HTTP server and client.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_CreateSocket(self, ssl_params, ssl_verify_peer, family)
Creates a TCP socket and initializes SSL if needed.
source code
 
GetSslCiphers(self)
Returns the ciphers string for SSL.
source code
 
_SSLVerifyCallback(self, conn, cert, errnum, errdepth, ok)
Verify the certificate provided by the peer
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

_CreateSocket(self, ssl_params, ssl_verify_peer, family)

source code 

Creates a TCP socket and initializes SSL if needed.

Parameters:
  • ssl_params (HttpSslParams) - SSL key and certificate
  • ssl_verify_peer (bool) - Whether to require client certificate and compare it with our certificate
  • family (int) - socket.AF_INET | socket.AF_INET6

_SSLVerifyCallback(self, conn, cert, errnum, errdepth, ok)

source code 

Verify the certificate provided by the peer

We only compare fingerprints. The client must use the same certificate as we do on our side.