def _equals(
        self,
        other: 'TLSClientHelloSignature',
        allow_tls_permutation: bool = False
    ):
        """Check if another TLSClientHelloSignature is identical."""
        if self.record_version != other.record_version:
            msg = (f"TLS record versions differ: "
                      f"{self.record_version} != {other.record_version}")
            return False, msg

        if self.handshake_version != other.handshake_version:
            msg = (f"TLS handshake versions differ: "
                      f"{self.handshake_version} != "
                      f"{other.handshake_version}")
            return False, msg

        if self.session_id_length != other.session_id_length:
            msg = (f"TLS session ID lengths differ: "
                      f"{self.session_id_length} != {other.session_id_length}")
            return False, msg

        if self.ciphersuites != other.ciphersuites:
            msg = f"TLS ciphersuites differ in contents or order. "
            return False, msg

        if self.comp_methods != other.comp_methods:
            msg = f"TLS compression methods differ in contents or order. "
            return False, msg

        return self._compare_extensions(other, allow_tls_permutation)
Check if another TLSClientHelloSignature is identical.
tests/signature.py