Two minor changes not reflected OSS side (#11020)

This commit is contained in:
Scott Miller
2021-02-26 14:23:56 -06:00
committed by GitHub
parent 11038662db
commit 4f3e53432b
2 changed files with 2 additions and 0 deletions

View File

@@ -193,6 +193,7 @@ func printKeyStatus(ks *api.KeyStatus) string {
return columnOutput([]string{
fmt.Sprintf("Key Term | %d", ks.Term),
fmt.Sprintf("Install Time | %s", ks.InstallTime.UTC().Format(time.RFC822)),
fmt.Sprintf("Encryption Count | %d", ks.Encryptions),
}, nil)
}

View File

@@ -212,6 +212,7 @@ func DeserializeKeyring(buf []byte) (*Keyring, error) {
// Create a new keyring
k := NewKeyring()
k.masterKey = enc.MasterKey
k.rotationConfig = enc.RotationConfig
for _, key := range enc.Keys {
k.keys[key.Term] = key
if key.Term > k.activeTerm {