__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
"""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
from typing import Any
from typing import Type
import josepy as jose
from acme import challenges
from acme.challenges import Challenge
logger = logging.getLogger(__name__)
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: Type[Challenge] = NotImplemented
def __getattr__(self, name: str) -> Any:
return getattr(self.challb, name)
class KeyAuthorizationAnnotatedChallenge(AnnotatedChallenge):
"""Client annotated `KeyAuthorizationChallenge` challenge."""
__slots__ = ('challb', 'domain', 'account_key') # pylint: disable=redefined-slots-in-subclass
def response_and_validation(self, *args: Any, **kwargs: Any) -> Any:
"""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') # pylint: disable=redefined-slots-in-subclass
acme_type = challenges.DNS
class Other(AnnotatedChallenge):
"""Client annotated ACME challenge of an unknown type."""
__slots__ = ('challb', 'domain') # pylint: disable=redefined-slots-in-subclass
acme_type = challenges.Challenge
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| _internal | Folder | 0755 |
|
|
| compat | Folder | 0755 |
|
|
| display | Folder | 0755 |
|
|
| plugins | Folder | 0755 |
|
|
| tests | Folder | 0755 |
|
|
| __init__.py | File | 113 B | 0644 |
|
| achallenges.py | File | 1.98 KB | 0644 |
|
| configuration.py | File | 18.67 KB | 0644 |
|
| crypto_util.py | File | 24.01 KB | 0644 |
|
| errors.py | File | 2.72 KB | 0644 |
|
| interfaces.py | File | 15.22 KB | 0644 |
|
| main.py | File | 535 B | 0644 |
|
| ocsp.py | File | 14.7 KB | 0644 |
|
| py.typed | File | 0 B | 0644 |
|
| reverter.py | File | 21.55 KB | 0644 |
|
| ssl-dhparams.pem | File | 424 B | 0644 |
|
| util.py | File | 25.07 KB | 0644 |
|