Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.216.68
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
acme /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-08-28 00:25
__init__.py
726
B
-rw-r--r--
2021-11-03 06:27
challenges.py
21.19
KB
-rw-r--r--
2021-11-03 06:27
client.py
52.86
KB
-rw-r--r--
2021-11-03 06:27
crypto_util.py
16.39
KB
-rw-r--r--
2023-05-02 05:17
errors.py
4.21
KB
-rw-r--r--
2021-11-03 06:27
fields.py
1.84
KB
-rw-r--r--
2021-11-03 06:27
jws.py
2.33
KB
-rw-r--r--
2021-11-03 06:27
magic_typing.py
595
B
-rw-r--r--
2021-11-03 06:27
messages.py
24.75
KB
-rw-r--r--
2021-11-03 06:27
mixins.py
2.78
KB
-rw-r--r--
2021-11-03 06:27
standalone.py
12.83
KB
-rw-r--r--
2021-11-03 06:27
util.py
303
B
-rw-r--r--
2021-11-03 06:27
Save
Rename
"""Useful mixins for Challenge and Resource objects""" from typing import Any from typing import Dict class VersionedLEACMEMixin: """This mixin stores the version of Let's Encrypt's endpoint being used.""" @property def le_acme_version(self) -> int: """Define the version of ACME protocol to use""" return getattr(self, '_le_acme_version', 1) @le_acme_version.setter def le_acme_version(self, version: int) -> None: # We need to use object.__setattr__ to not depend on the specific implementation of # __setattr__ in current class (eg. jose.TypedJSONObjectWithFields raises AttributeError # for any attempt to set an attribute to make objects immutable). object.__setattr__(self, '_le_acme_version', version) def __setattr__(self, key: str, value: Any) -> None: if key == 'le_acme_version': # Required for @property to operate properly. See comment above. object.__setattr__(self, key, value) else: super().__setattr__(key, value) # pragma: no cover class ResourceMixin(VersionedLEACMEMixin): """ This mixin generates a RFC8555 compliant JWS payload by removing the `resource` field if needed (eg. ACME v2 protocol). """ def to_partial_json(self) -> Dict[str, Any]: """See josepy.JSONDeserializable.to_partial_json()""" return _safe_jobj_compliance(super(), 'to_partial_json', 'resource') def fields_to_partial_json(self) -> Dict[str, Any]: """See josepy.JSONObjectWithFields.fields_to_partial_json()""" return _safe_jobj_compliance(super(), 'fields_to_partial_json', 'resource') class TypeMixin(VersionedLEACMEMixin): """ This mixin allows generation of a RFC8555 compliant JWS payload by removing the `type` field if needed (eg. ACME v2 protocol). """ def to_partial_json(self) -> Dict[str, Any]: """See josepy.JSONDeserializable.to_partial_json()""" return _safe_jobj_compliance(super(), 'to_partial_json', 'type') def fields_to_partial_json(self) -> Dict[str, Any]: """See josepy.JSONObjectWithFields.fields_to_partial_json()""" return _safe_jobj_compliance(super(), 'fields_to_partial_json', 'type') def _safe_jobj_compliance(instance: Any, jobj_method: str, uncompliant_field: str) -> Dict[str, Any]: if hasattr(instance, jobj_method): jobj: Dict[str, Any] = getattr(instance, jobj_method)() if instance.le_acme_version == 2: jobj.pop(uncompliant_field, None) return jobj raise AttributeError('Method {0}() is not implemented.'.format(jobj_method)) # pragma: no cover