def getContext(self):
        default_options = self.control_credential._default_options(
            self.ca_certificate)

        def verify(conn, cert, errno, depth, preverify_ok):
            if 0 > depth:
                # Certificate authority chain:
                return preverify_ok
            # Now we're actually verifying certificate we care about:
            if not preverify_ok:
                return preverify_ok
            return cert.get_subject().commonName.startswith(self.prefix)
        context = default_options.getContext()
        context.set_verify(VERIFY_PEER | VERIFY_FAIL_IF_NO_PEER_CERT,
                           verify)
        return context
dataset/ETHPy150Open ClusterHQ/flocker/flocker/ca/_validation.py/_ControlServiceContextFactory.getContext/swapped operands of `>`