Merge pull request #5 from cbroglie/master
Make key and extended usages output stable
This commit is contained in:
commit
411907c0ad
|
@ -14,6 +14,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/cloudflare/cfssl/helpers"
|
"github.com/cloudflare/cfssl/helpers"
|
||||||
|
@ -83,6 +84,7 @@ func keyUsages(ku x509.KeyUsage) string {
|
||||||
uses = append(uses, s)
|
uses = append(uses, s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sort.Strings(uses)
|
||||||
|
|
||||||
return strings.Join(uses, ", ")
|
return strings.Join(uses, ", ")
|
||||||
}
|
}
|
||||||
|
@ -92,6 +94,7 @@ func extUsage(ext []x509.ExtKeyUsage) string {
|
||||||
for i := range ext {
|
for i := range ext {
|
||||||
ns = append(ns, extKeyUsages[ext[i]])
|
ns = append(ns, extKeyUsages[ext[i]])
|
||||||
}
|
}
|
||||||
|
sort.Strings(ns)
|
||||||
|
|
||||||
return strings.Join(ns, ", ")
|
return strings.Join(ns, ", ")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue