Ejemplo n.º 1
0
    def _safe_revoke(self, certs):
        """Confirm and revoke certificates.

        :param certs: certs intended to be revoked
        :type certs: :class:`list` of :class:`letsencrypt.revoker.Cert`

        :returns: certs successfully revoked
        :rtype: :class:`list` of :class:`letsencrypt.revoker.Cert`

        """
        success_list = []
        try:
            for cert in certs:
                if self.no_confirm or revocation.confirm_revocation(cert):
                    try:
                        self._acme_revoke(cert)
                    except errors.Error:
                        # TODO: Improve error handling when networking is set...
                        logger.error(
                            "Unable to revoke cert:%s%s", os.linesep, str(cert))
                    success_list.append(cert)
                    revocation.success_revocation(cert)
        finally:
            if success_list:
                self._remove_certs_keys(success_list)

        return success_list
Ejemplo n.º 2
0
    def _safe_revoke(self, certs):
        """Confirm and revoke certificates.

        :param certs: certs intended to be revoked
        :type certs: :class:`list` of :class:`letsencrypt.revoker.Cert`

        :returns: certs successfully revoked
        :rtype: :class:`list` of :class:`letsencrypt.revoker.Cert`

        """
        success_list = []
        try:
            for cert in certs:
                if self.no_confirm or revocation.confirm_revocation(cert):
                    try:
                        self._acme_revoke(cert)
                    except errors.Error:
                        # TODO: Improve error handling when networking is set...
                        logger.error("Unable to revoke cert:%s%s", os.linesep,
                                     str(cert))
                    success_list.append(cert)
                    revocation.success_revocation(cert)
        finally:
            if success_list:
                self._remove_certs_keys(success_list)

        return success_list
 def _call(cls, cert):
     from letsencrypt.display.revocation import confirm_revocation
     return confirm_revocation(cert)
Ejemplo n.º 4
0
 def _call(cls, cert):
     from letsencrypt.display.revocation import confirm_revocation
     return confirm_revocation(cert)