Changed return type for "ChallengesFor".
This commit is contained in:
parent
8a173b1208
commit
01cee65079
|
@ -88,7 +88,7 @@ type CertificateAuthority interface {
|
|||
// PolicyAuthority defines the public interface for the Boulder PA
|
||||
type PolicyAuthority interface {
|
||||
WillingToIssue(id AcmeIdentifier, regID int64) error
|
||||
ChallengesFor(AcmeIdentifier, *jose.JsonWebKey) ([]Challenge, [][]int, error)
|
||||
ChallengesFor(AcmeIdentifier, *jose.JsonWebKey) ([]Challenge, [][]int)
|
||||
}
|
||||
|
||||
// StorageGetter are the Boulder SA's read-only methods
|
||||
|
|
|
@ -212,7 +212,7 @@ func (pa PolicyAuthorityImpl) WillingToIssue(id core.AcmeIdentifier, regID int64
|
|||
// acceptable for the given identifier.
|
||||
//
|
||||
// Note: Current implementation is static, but future versions may not be.
|
||||
func (pa PolicyAuthorityImpl) ChallengesFor(identifier core.AcmeIdentifier, accountKey *jose.JsonWebKey) ([]core.Challenge, [][]int, error) {
|
||||
func (pa PolicyAuthorityImpl) ChallengesFor(identifier core.AcmeIdentifier, accountKey *jose.JsonWebKey) ([]core.Challenge, [][]int) {
|
||||
challenges := []core.Challenge{}
|
||||
|
||||
if pa.enabledChallenges[core.ChallengeTypeHTTP01] {
|
||||
|
@ -242,5 +242,5 @@ func (pa PolicyAuthorityImpl) ChallengesFor(identifier core.AcmeIdentifier, acco
|
|||
shuffledCombos[i] = combinations[comboIdx]
|
||||
}
|
||||
|
||||
return shuffled, shuffledCombos, nil
|
||||
return shuffled, shuffledCombos
|
||||
}
|
||||
|
|
|
@ -196,10 +196,7 @@ func TestChallengesFor(t *testing.T) {
|
|||
t.Errorf("Error unmarshaling JWK: %v", err)
|
||||
}
|
||||
|
||||
challenges, combinations, err := pa.ChallengesFor(core.AcmeIdentifier{}, accountKey)
|
||||
if err != nil {
|
||||
t.Errorf("Error generating challenges: %v", err)
|
||||
}
|
||||
challenges, combinations := pa.ChallengesFor(core.AcmeIdentifier{}, accountKey)
|
||||
|
||||
test.Assert(t, len(challenges) == len(enabledChallenges), "Wrong number of challenges returned")
|
||||
test.Assert(t, len(combinations) == len(enabledChallenges), "Wrong number of combinations returned")
|
||||
|
|
|
@ -330,7 +330,7 @@ func (ra *RegistrationAuthorityImpl) NewAuthorization(request core.Authorization
|
|||
}
|
||||
|
||||
// Create validations. The WFE will update them with URIs before sending them out.
|
||||
challenges, combinations, err := ra.PA.ChallengesFor(identifier, ®.Key)
|
||||
challenges, combinations := ra.PA.ChallengesFor(identifier, ®.Key)
|
||||
|
||||
expires := ra.clk.Now().Add(ra.pendingAuthorizationLifetime)
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ func initAuthorities(t *testing.T) (*DummyValidationAuthority, *sa.SQLStorageAut
|
|||
|
||||
AuthzInitial.RegistrationID = Registration.ID
|
||||
|
||||
challenges, combinations, err := pa.ChallengesFor(AuthzInitial.Identifier, &Registration.Key)
|
||||
challenges, combinations := pa.ChallengesFor(AuthzInitial.Identifier, &Registration.Key)
|
||||
AuthzInitial.Challenges = challenges
|
||||
AuthzInitial.Combinations = combinations
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ func (ca *MockCA) RevokeCertificate(serial string, reasonCode core.RevocationCod
|
|||
|
||||
type MockPA struct{}
|
||||
|
||||
func (pa *MockPA) ChallengesFor(identifier core.AcmeIdentifier, key *jose.JsonWebKey) (challenges []core.Challenge, combinations [][]int, err error) {
|
||||
func (pa *MockPA) ChallengesFor(identifier core.AcmeIdentifier, key *jose.JsonWebKey) (challenges []core.Challenge, combinations [][]int) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue