@@ -1597,30 +1597,27 @@ func (wfe *WebFrontEndImpl) makeChallenge(
1597
1597
func (wfe * WebFrontEndImpl ) makeChallenges (authz * core.Authorization , request * http.Request ) error {
1598
1598
var chals []* core.Challenge
1599
1599
1600
- // Authorizations for a wildcard identifier only get a DNS-01 challenges to
1601
- // match Boulder/Let's Encrypt wildcard issuance policy
1600
+ // Determine which challenge types are enabled for this identifier
1601
+ var enabledChallenges [] string
1602
1602
if strings .HasPrefix (authz .Identifier .Value , "*." ) {
1603
- chal , err := wfe .makeChallenge (acme .ChallengeDNS01 , authz , request )
1604
- if err != nil {
1605
- return err
1606
- }
1607
- chals = []* core.Challenge {chal }
1603
+ // Authorizations for a wildcard identifier get DNS-based challenges to
1604
+ // match Boulder/Let's Encrypt wildcard issuance policy
1605
+ enabledChallenges = []string {acme .ChallengeDNS01 , acme .ChallengeDNSAccount01 }
1608
1606
} else {
1609
1607
// IP addresses get HTTP-01 and TLS-ALPN challenges
1610
- var enabledChallenges []string
1611
1608
if authz .Identifier .Type == acme .IdentifierIP {
1612
1609
enabledChallenges = []string {acme .ChallengeHTTP01 , acme .ChallengeTLSALPN01 }
1613
1610
} else {
1614
1611
// Non-wildcard, non-IP identifier authorizations get all of the enabled challenge types
1615
- enabledChallenges = []string {acme .ChallengeHTTP01 , acme .ChallengeTLSALPN01 , acme .ChallengeDNS01 }
1612
+ enabledChallenges = []string {acme .ChallengeHTTP01 , acme .ChallengeTLSALPN01 , acme .ChallengeDNS01 , acme . ChallengeDNSAccount01 }
1616
1613
}
1617
- for _ , chalType := range enabledChallenges {
1618
- chal , err := wfe .makeChallenge (chalType , authz , request )
1619
- if err != nil {
1620
- return err
1621
- }
1622
- chals = append (chals , chal )
1614
+ }
1615
+ for _ , chalType := range enabledChallenges {
1616
+ chal , err := wfe .makeChallenge (chalType , authz , request )
1617
+ if err != nil {
1618
+ return err
1623
1619
}
1620
+ chals = append (chals , chal )
1624
1621
}
1625
1622
1626
1623
// Lock the authorization for writing to update the challenges
@@ -2377,8 +2374,12 @@ func (wfe *WebFrontEndImpl) updateChallenge(
2377
2374
2378
2375
// If the identifier value is for a wildcard domain then strip the wildcard
2379
2376
// prefix before dispatching the validation to ensure the base domain is
2380
- // validated.
2381
- ident .Value = strings .TrimPrefix (ident .Value , "*." )
2377
+ // validated. Set a flag to indicate validation scope.
2378
+ wildcard := false
2379
+ if strings .HasPrefix (ident .Value , "*." ) {
2380
+ ident .Value = strings .TrimPrefix (ident .Value , "*." )
2381
+ wildcard = true
2382
+ }
2382
2383
2383
2384
// Confirm challenge status again and update it immediately before sending it to the VA
2384
2385
prob = nil
@@ -2395,8 +2396,11 @@ func (wfe *WebFrontEndImpl) updateChallenge(
2395
2396
return
2396
2397
}
2397
2398
2399
+ // Reconstruct account URL for use in scoped validation methods
2400
+ acctURL := wfe .relativeEndpoint (request , fmt .Sprintf ("%s%s" , acctPath , existingAcct .ID ))
2401
+
2398
2402
// Submit a validation job to the VA, this will be processed asynchronously
2399
- wfe .va .ValidateChallenge (ident , existingChal , existingAcct )
2403
+ wfe .va .ValidateChallenge (ident , existingChal , existingAcct , acctURL , wildcard )
2400
2404
2401
2405
// Lock the challenge for reading in order to write the response
2402
2406
existingChal .RLock ()
0 commit comments