allow multiple identical SANs in cert

This commit is contained in:
max furman 2019-01-31 11:20:21 -06:00
parent f0683c2e0a
commit e6e8443f3c
8 changed files with 95 additions and 75 deletions

View file

@ -94,6 +94,7 @@ func generateBootstrapToken(ca, subject, sha string) string {
cl := struct {
SHA string `json:"sha"`
jwt.Claims
SANS []string `json:"sans"`
}{
SHA: sha,
Claims: jwt.Claims{
@ -104,6 +105,7 @@ func generateBootstrapToken(ca, subject, sha string) string {
Expiry: jwt.NewNumericDate(now.Add(time.Minute)),
Audience: []string{ca + "/sign"},
},
SANS: []string{subject},
}
raw, err := jwt.Signed(sig).Claims(cl).CompactSerialize()
if err != nil {