From 06c7f8f42f4049090f83b08495fae849691557c8 Mon Sep 17 00:00:00 2001 From: Christopher Broglie Date: Tue, 21 Nov 2017 15:13:13 -0800 Subject: [PATCH] Make key and extended usages output stable --- cmd/certdump/certdump.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/certdump/certdump.go b/cmd/certdump/certdump.go index f9d8651..05d7e60 100644 --- a/cmd/certdump/certdump.go +++ b/cmd/certdump/certdump.go @@ -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, ", ") }