

def __call__(self, connection):
    "Check a TLSConnection.\n\n        When a Checker is passed to a handshake function, this will\n        be called at the end of the function.\n\n        @type connection: L{tlslite.tlsconnection.TLSConnection}\n        @param connection: The TLSConnection to examine.\n\n        @raise tlslite.errors.TLSAuthenticationError: If the other\n        party's certificate chain is missing or bad.\n        "
    if ((not self.checkResumedSession) and connection.resumed):
        return
    if self.x509Fingerprint:
        if connection._client:
            chain = connection.session.serverCertChain
        else:
            chain = connection.session.clientCertChain
        if self.x509Fingerprint:
            if isinstance(chain, X509CertChain):
                if chain.x509Fingerprint:
                    if (chain.getFingerprint() != self.x509Fingerprint):
                        raise TLSFingerprintError(('X.509 fingerprint mismatch: %s, %s' % (chain.getFingerprint(), self.x509Fingerprint)))
            elif chain:
                raise TLSAuthenticationTypeError()
            else:
                raise TLSNoAuthenticationError()

dataset/ETHPy150Open splunk/splunk-webframework/contrib/tlslite/tlslite/checker.py Checker.__call__/VarMisuse@87/253 `self`->`chain`