credential/cert: default display name

This commit is contained in:
Armon Dadgar 2015-04-24 10:52:17 -07:00
parent e17c11149f
commit b9a9c3677a

View file

@ -97,6 +97,11 @@ func (b *backend) pathCertWrite(
policies[i] = strings.TrimSpace(p)
}
// Default the display name to the certificate name if not given
if displayName == "" {
displayName = name
}
if len(policies) == 0 {
return logical.ErrorResponse("policies required"), nil
}