Merge pull request #5 from cbroglie/master

Make key and extended usages output stable
This commit is contained in:
Kyle Isom 2017-11-22 16:24:57 -08:00 committed by GitHub
commit 411907c0ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import (
"fmt"
"io/ioutil"
"os"
"sort"
"strings"
"github.com/cloudflare/cfssl/helpers"
@ -83,6 +84,7 @@ func keyUsages(ku x509.KeyUsage) string {
uses = append(uses, s)
}
}
sort.Strings(uses)
return strings.Join(uses, ", ")
}
@ -92,6 +94,7 @@ func extUsage(ext []x509.ExtKeyUsage) string {
for i := range ext {
ns = append(ns, extKeyUsages[ext[i]])
}
sort.Strings(ns)
return strings.Join(ns, ", ")
}