@staticmethod<EOL><INDENT>def is_certificate_valid(stream, cert):<DEDENT>
try:<EOL><INDENT>logger.debug("<STR_LIT>".format(cert))<EOL>if not cert:<EOL><INDENT>logger.warning("<STR_LIT>")<EOL>return False<EOL><DEDENT>if not cert.validated:<EOL><INDENT>logger.warning("<STR_LIT>")<EOL>return False<EOL><DEDENT>srv_type = stream.transport._dst_service <EOL>if cert.verify_server(stream.peer, srv_type):<EOL><INDENT>logger.debug("<STR_LIT>"<EOL>.format(stream.peer))<EOL>return True<EOL><DEDENT>else:<EOL><INDENT>logger.debug("<STR_LIT>"<EOL>.format(stream.peer))<EOL>return False<EOL><DEDENT><DEDENT>except:<EOL><INDENT>logger.exception("<STR_LIT>")<EOL>raise<EOL><DEDENT>
Default certificate verification callback for TLS connections.

        :Parameters:
            - `cert`: certificate information
        :Types:
            - `cert`: `CertificateData`

        :return: computed verification result.