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 016ed8dd5e
commit a7b372b447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 {