Add support for the 'Wildcard' field to ACME library

This commit is contained in:
James Munnelly 2018-04-25 15:24:11 +01:00
parent d54278fee1
commit 7d83e0da2d

View File

@ -293,6 +293,9 @@ type Authorization struct {
// to prove posession of the identifier. For valid/invalid authorizations, // to prove posession of the identifier. For valid/invalid authorizations,
// this is the list of challenges that were used. // this is the list of challenges that were used.
Challenges []*Challenge Challenges []*Challenge
// Wildcard is set to true if this authorization is for a 'wildcard' dnsName.
Wildcard bool
} }
// AuthzID is an identifier that an account is authorized to represent. // AuthzID is an identifier that an account is authorized to represent.
@ -315,6 +318,7 @@ type wireAuthz struct {
Type string Type string
Value string Value string
} }
Wildcard bool
} }
func (z *wireAuthz) authorization(url string) *Authorization { func (z *wireAuthz) authorization(url string) *Authorization {
@ -324,6 +328,7 @@ func (z *wireAuthz) authorization(url string) *Authorization {
Expires: z.Expires, Expires: z.Expires,
Identifier: AuthzID{Type: z.Identifier.Type, Value: z.Identifier.Value}, Identifier: AuthzID{Type: z.Identifier.Type, Value: z.Identifier.Value},
Challenges: make([]*Challenge, len(z.Challenges)), Challenges: make([]*Challenge, len(z.Challenges)),
Wildcard: z.Wildcard,
} }
for i, v := range z.Challenges { for i, v := range z.Challenges {
a.Challenges[i] = v.challenge() a.Challenges[i] = v.challenge()