def verify_jid_against_srv_name(self, jid, srv_type):
srv_prefix = "<STR_LIT:_>" + srv_type + "<STR_LIT:.>"<EOL>srv_prefix_l = len(srv_prefix)<EOL>for srv in self.alt_names.get("<STR_LIT>", []):<EOL><INDENT>logger.debug("<STR_LIT>".format(jid,<EOL>srv))<EOL>if not srv.startswith(srv_prefix):<EOL><INDENT>logger.debug("<STR_LIT>"<EOL>.format(srv, srv_prefix))<EOL>continue<EOL><DEDENT>try:<EOL><INDENT>srv_jid = JID(srv[srv_prefix_l:])<EOL><DEDENT>except ValueError:<EOL><INDENT>continue<EOL><DEDENT>if srv_jid == jid:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>return True<EOL><DEDENT><DEDENT>return False<EOL>
Check if the cerificate is valid for given domain-only JID
        and a service type.

        :Parameters:
            - `jid`: JID requested (domain part only)
            - `srv_type`: service type, e.g. 'xmpp-client'
        :Types:
            - `jid`: `JID`
            - `srv_type`: `unicode`
        :Returntype: `bool`