404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.190.207.74: ~ $
"""Client annotated ACME challenges.

Please use names such as ``achall`` to distinguish from variables "of type"
:class:`acme.challenges.Challenge` (denoted by ``chall``)
and :class:`.ChallengeBody` (denoted by ``challb``)::

  from acme import challenges
  from acme import messages
  from certbot import achallenges

  chall = challenges.DNS(token='foo')
  challb = messages.ChallengeBody(chall=chall)
  achall = achallenges.DNS(chall=challb, domain='example.com')

Note, that all annotated challenges act as a proxy objects::

  achall.token == challb.token

"""
import logging

import josepy as jose

from acme import challenges


logger = logging.getLogger(__name__)


# pylint: disable=too-few-public-methods

class AnnotatedChallenge(jose.ImmutableMap):
    """Client annotated challenge.

    Wraps around server provided challenge and annotates with data
    useful for the client.

    :ivar challb: Wrapped `~.ChallengeBody`.

    """
    __slots__ = ('challb',)
    acme_type = NotImplemented

    def __getattr__(self, name):
        return getattr(self.challb, name)


class KeyAuthorizationAnnotatedChallenge(AnnotatedChallenge):
    """Client annotated `KeyAuthorizationChallenge` challenge."""
    __slots__ = ('challb', 'domain', 'account_key')

    def response_and_validation(self, *args, **kwargs):
        """Generate response and validation."""
        return self.challb.chall.response_and_validation(
            self.account_key, *args, **kwargs)


class DNS(AnnotatedChallenge):
    """Client annotated "dns" ACME challenge."""
    __slots__ = ('challb', 'domain')
    acme_type = challenges.DNS

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
display Folder 0755
plugins Folder 0755
tests Folder 0755
__init__.py File 114 B 0644
account.py File 13.98 KB 0644
achallenges.py File 1.59 KB 0644
auth_handler.py File 20.92 KB 0644
cert_manager.py File 15.1 KB 0644
cli.py File 71.49 KB 0644
client.py File 28.72 KB 0644
compat.py File 6.91 KB 0644
configuration.py File 5.66 KB 0644
constants.py File 6.54 KB 0644
crypto_util.py File 15.29 KB 0644
eff.py File 3.07 KB 0644
error_handler.py File 5.81 KB 0644
errors.py File 2.59 KB 0644
hooks.py File 8.44 KB 0644
interfaces.py File 22.02 KB 0644
lock.py File 3.56 KB 0644
log.py File 12.39 KB 0644
main.py File 48.47 KB 0644
notify.py File 1.04 KB 0644
ocsp.py File 4.1 KB 0644
renewal.py File 20.91 KB 0644
reporter.py File 3.46 KB 0644
reverter.py File 23.32 KB 0644
ssl-dhparams.pem File 424 B 0644
storage.py File 44.91 KB 0644
updater.py File 3.86 KB 0644
util.py File 20.35 KB 0644