Package httxlib :: Module httxcertificates :: Class HttxCertKeyManager
[hide private]
[frames] | no frames]

Class HttxCertKeyManager

source code

                 object --+        
                          |        
      httxobject.HttxObject --+    
                              |    
httxpassmanager.HttxPassManager --+
                                  |
                                 HttxCertKeyManager

A subclass of HttxPassManager to hold paths to private key and certificate files to be used in client validation in https connections

Usually the certificate file contains the private key too, but if this is not the case, the path to the file containing the private key has to also be supplied

The class stores the cert_file/private_key_file tuple for a given url

A catch_all empty string can be used to validate against any url

The storage functionality is implemented by the HTTPPasswordManagerWithDefaultRealm used by HttxPassManager and using a default Realm of None

Instance Methods [hide private]
 
__init__(self)
Constructor.
source code
 
add_certkey(self, url, certfile, keyfile)
Add paths to the certificate and private key
source code
tuple
find_certkey(self, url)
Retrieves a tuple of (certfile, keyfile) for a given url
source code

Inherited from httxpassmanager.HttxPassManager: __deepcopy__, add_password, find_user_password

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

Instance Variables [hide private]

Inherited from httxpassmanager.HttxPassManager: passmanager

Inherited from httxobject.HttxObject: lock

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Constructor. It delegates construction to the base class HttxPassManager

Overrides: object.__init__

add_certkey(self, url, certfile, keyfile)

source code 

Add paths to the certificate and private key

Parameters:
  • url (str) - url to be matched for certificate/private key files
  • certfile (str) - path to the certificate file
  • keyfile (str) - path to the private key file if not contained in the certificate file

find_certkey(self, url)

source code 

Retrieves a tuple of (certfile, keyfile) for a given url

Parameters:
  • url (str) - url to be matched for certificate/private key files
Returns: tuple
tuple of (certfile, keyfile) that may be None