'Perform a challenge on Nginx.
:returns: list of :class:`certbot.acme.challenges.TLSSNI01Response`
:rtype: list'

def perform(self):

    if (not self.achalls):
        return []
    addresses = []
    default_addr = '{0}    ssl'.format(self.configurator.config.tls_sni_01_port)
    for achall in self.achalls:
        vhost = self.configurator.choose_vhost(achall.domain)
        if (vhost is None):
            logger.error('No    nginx    vhost    exists    with    server_name    matching:    %s.    Please    specify    server_names    in    the    Nginx    config.', achall.domain)
            return None
        if vhost.addrs:
            addresses.append(list(vhost.addrs))
        else:
            addresses.append([obj.Addr.fromstring(default_addr)])
    responses = [self._setup_challenge_cert(x) for x in self.achalls]
    self._mod_config(addresses)
    self.configurator.save('SNI    Challenge', True)
    return responses
