Replace '-' with ':' when listing certificate serial numbers (#13468)

* CLI changes for new mount tune config parameter allowed_managed_keys

* Correct allowed_managed_keys description in auth and secrets

* Documentation update for secrets and removed changes for auth

* Add changelog and remove documentation changes for auth

* removed changelog

* Correct the field description

* Replace - with : when listing certificate serials
This commit is contained in:
divyapola5 2021-12-17 13:33:05 -06:00 committed by GitHub
parent 044a83400a
commit e8a8853fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -108,7 +108,9 @@ func (b *backend) pathFetchCertList(ctx context.Context, req *logical.Request, d
if err != nil {
return nil, err
}
for i := range entries {
entries[i] = denormalizeSerial(entries[i])
}
return logical.ListResponse(entries), nil
}

View File

@ -5,3 +5,7 @@ import "strings"
func normalizeSerial(serial string) string {
return strings.Replace(strings.ToLower(serial), ":", "-", -1)
}
func denormalizeSerial(serial string) string {
return strings.Replace(strings.ToLower(serial), "-", ":", -1)
}