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:
parent
044a83400a
commit
e8a8853fcc
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue