def verify(self, pattern):
        """
        https://tools.ietf.org/search/rfc6125#section-6.5.2
        """
        if isinstance(pattern, self.pattern_class):
            return (
                pattern.protocol_pattern == self.protocol
                and self.dns_id.verify(pattern.dns_pattern)
            )
        else:
            return False

        https://tools.ietf.org/search/rfc6125#section-6.5.2
        
stackoverflow/venv/lib/python3.6/site-packages/service_identity/_common.py