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

Class HttxCACertManager

source code

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

A subclass of HttxPassManager to hold the path to a file containing the root (chain of) certificate(s) to be used in server certificate validation

It stores the requirement on a per url basis by transforming the enumeration value into a string on storage and undoing the operation on retrieval

It is separate from the Validation Requirement storage because this file may be use for all servers, but validation may not be required for all servers

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

Instance Methods [hide private]
 
__init__(self)
Constructor.
source code
 
add_ca_cert(self, url, cacert)
Add a path to a file with a root (chain of) certificates for the given url
source code
str|None
find_ca_cert(self, url)
Retrieve the path to a file containing the root certificates for the 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_ca_cert(self, url, cacert)

source code 

Add a path to a file with a root (chain of) certificates for the given url

Parameters:
  • url (str) - url to be matched for certificate/private key files
  • cacert (str) - path to a file containing the certificates

find_ca_cert(self, url)

source code 

Retrieve the path to a file containing the root certificates for the given url

Parameters:
  • url (str) - url to be matched for certificate/private key files
Returns: str|None
the path to the file with the root certificates or None