From b9a9c3677a614f4532cdae2571bfe4c2b23879c9 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Fri, 24 Apr 2015 10:52:17 -0700 Subject: [PATCH] credential/cert: default display name --- builtin/credential/cert/path_certs.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builtin/credential/cert/path_certs.go b/builtin/credential/cert/path_certs.go index a56c5c8ae4..c793564a9e 100644 --- a/builtin/credential/cert/path_certs.go +++ b/builtin/credential/cert/path_certs.go @@ -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 }