Skip to content

Commit

Permalink
use old draft dns-account-01 until updates confirmed
Browse files Browse the repository at this point in the history
  • Loading branch information
sheurich committed Feb 6, 2024
1 parent ec2c3bc commit 73472a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions acme/acme/_internal/tests/challenges_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ def setUp(self):
from acme.challenges import DNSACCOUNT01
self.accountURI = "https://example.com/acme/acct/1234"
# "_" || base32(SHA-256(Account Resource URL)[0:9])
self.accountLabel = '_' + b32encode(
self.accountLabel = b32encode(
sha256(self.accountURI.encode()).digest()[:10]
).decode().lower()

def test_validation_domain_name(self):
assert self.accountLabel + '._acme-challenge.www.example.com' == \
assert '_acme-challenge_' + self.accountLabel + '.www.example.com' == \
self.msg.validation_domain_name(self.accountURI, 'www.example.com')

def test_validation(self):
Expand Down
2 changes: 1 addition & 1 deletion acme/acme/challenges.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def validation_domain_name(self, acctURI: str, name: str) -> str:
"""
acctLabel = b32encode(hashlib.sha256(
acctURI.encode()).digest()[:10]).decode().lower()
return f"_{acctLabel}.{self.LABEL}.{name}"
return f"{self.LABEL}_{acctLabel}.{name}"


@ChallengeResponse.register
Expand Down

0 comments on commit 73472a9

Please sign in to comment.