Package tlslite :: Module checker :: Class Checker |
[hide private]
[frames] | no frames]

# Class Checker

source code

    object --+
             |
            Checker

This class is passed to a handshake function to check the other party's certificate chain.

If a handshake function completes successfully, but the Checker judges the other party's certificate chain to be missing or inadequate, a subclass of tlslite.errors.TLSAuthenticationError will be raised.

Currently, the Checker can check an X.509 chain.

Instance Methods | [hide private]
__call__(self, connection) Check a TLSConnection. | source code
__init__(self, x509Fingerprint=None, checkResumedSession=False) Create a new Checker instance. | 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]

### __call__(self, connection) (Call operator) | source code
Check a TLSConnection. When a Checker is passed to a handshake function, this will be called at the end of the function. Parameters: `connection` (tlslite.tlsconnection.TLSConnection) - The TLSConnection to examine. Raises: `tlslite.errors.TLSAuthenticationError` - If the other party's certificate chain is missing or bad.

### __init__(self, x509Fingerprint=None, checkResumedSession=False) (Constructor) | source code
Create a new Checker instance. You must pass in one of these argument combinations: x509Fingerprint Parameters: `x509Fingerprint` (str) - A hex-encoded X.509 end-entity fingerprint which the other party's end-entity certificate must match. `checkResumedSession` (bool) - If resumed sessions should be checked. This defaults to False, on the theory that if the session was checked once, we don't need to bother re-checking it. Overrides: object.__init__