File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -365,13 +365,14 @@ func (va VAImpl) validateDNS01(task *vaTask) *core.ValidationRecord {
365
365
}
366
366
367
367
func (va VAImpl ) validateDNSAccount01 (task * vaTask ) * core.ValidationRecord {
368
+ // Compute the account-specific DNS label per draft-ietf-acme-dns-account-label-00 section 3.2
369
+ // "_" || base32(SHA-256(<ACCOUNT_URL>)[0:10]) || "._acme-challenge"
368
370
acctHash := sha256 .Sum256 ([]byte (task .AccountURL ))
369
- acctLabel := strings .ToLower (base32 .StdEncoding .EncodeToString (acctHash [0 :10 ]))
370
- scope := "host"
371
- if task .Wildcard {
372
- scope = "wildcard"
373
- }
374
- challengeSubdomain := fmt .Sprintf ("_%s._acme-%s-challenge.%s" , acctLabel , scope , task .Identifier .Value )
371
+ // Take first 10 bytes of hash as specified in section 3.2
372
+ // Use base32 encoding without padding per RFC4648
373
+ acctLabel := strings .ToLower (base32 .StdEncoding .WithPadding (base32 .NoPadding ).EncodeToString (acctHash [0 :10 ]))
374
+ // Construct validation domain name according to spec
375
+ challengeSubdomain := fmt .Sprintf ("_%s._acme-challenge.%s" , acctLabel , task .Identifier .Value )
375
376
376
377
result := & core.ValidationRecord {
377
378
URL : challengeSubdomain ,
You can’t perform that action at this time.
0 commit comments