mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 16:30:31 +02:00
Put in dummy challenge
This commit is contained in:
@@ -34,6 +34,11 @@ class DVChallenge(Challenge): # pylint: disable=abstract-method
|
||||
"""Domain validation challenges."""
|
||||
|
||||
|
||||
class UnrecognizedChallenge(DVChallenge):
|
||||
"""Unrecognized challenge."""
|
||||
typ = "unknown"
|
||||
|
||||
|
||||
class ChallengeResponse(jose.TypedJSONObjectWithFields):
|
||||
# _fields_to_partial_json | pylint: disable=abstract-method
|
||||
"""ACME challenge response."""
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import collections
|
||||
|
||||
from acme import challenges
|
||||
from acme import errors
|
||||
from acme import fields
|
||||
from acme import jose
|
||||
from acme import util
|
||||
@@ -383,7 +382,9 @@ class Authorization(ResourceBody):
|
||||
try:
|
||||
challs.append(ChallengeBody.from_json(chall))
|
||||
except jose.UnrecognizedTypeError:
|
||||
continue
|
||||
challs.append(ChallengeBody(
|
||||
uri="UNKNOWN", chall=challenges.UnrecognizedChallenge,
|
||||
status=STATUS_UNKNOWN))
|
||||
return tuple(challs)
|
||||
|
||||
@property
|
||||
|
||||
@@ -275,8 +275,6 @@ class AuthorizationTest(unittest.TestCase):
|
||||
from acme.messages import ChallengeBody
|
||||
from acme.messages import STATUS_VALID
|
||||
|
||||
unknown_chall = mock.MagicMock()
|
||||
unknown_chall.to_json.side_effect = side_effect=jose.UnrecognizedTypeError
|
||||
self.challbs = (
|
||||
ChallengeBody(
|
||||
uri='http://challb1', status=STATUS_VALID,
|
||||
|
||||
Reference in New Issue
Block a user