diff --git a/builtin/logical/transit/backend_ce.go b/builtin/logical/transit/backend_ce.go index 4c88fc30a35a..abdf9e2cc4cb 100644 --- a/builtin/logical/transit/backend_ce.go +++ b/builtin/logical/transit/backend_ce.go @@ -24,3 +24,5 @@ func (b *backend) periodicFuncEnt(_ context.Context, _ *logical.Request) error { func (b *backend) cleanupEnt(_ context.Context) {} func (b *backend) setupEnt() {} + +func entAugmentAsymKey(p *keysutil.Policy, k string, v keysutil.KeyEntry, key *asymKey) {} diff --git a/builtin/logical/transit/path_export.go b/builtin/logical/transit/path_export.go index 30735c2c749a..c629a77f9500 100644 --- a/builtin/logical/transit/path_export.go +++ b/builtin/logical/transit/path_export.go @@ -225,6 +225,8 @@ func getExportKey(policy *keysutil.Policy, key *keysutil.KeyEntry, exportType st return "", err } return rsaKey, nil + default: + return entEncodePrivateKey(exportType, policy, key) } case exportTypePublicKey: switch policy.Type { @@ -253,6 +255,8 @@ func getExportKey(policy *keysutil.Policy, key *keysutil.KeyEntry, exportType st return "", err } return rsaKey, nil + default: + return entEncodePublicKey(exportType, policy, key) } case exportTypeCertificateChain: if key.CertificateChain == nil { diff --git a/sdk/helper/keysutil/policy.go b/sdk/helper/keysutil/policy.go index f712322083d3..bd7de795fab6 100644 --- a/sdk/helper/keysutil/policy.go +++ b/sdk/helper/keysutil/policy.go @@ -493,8 +493,8 @@ type Policy struct { deleted uint32 Name string `json:"name"` - Key []byte `json:"key,omitempty"` // DEPRECATED - KeySize int `json:"key_size,omitempty"` // For algorithms with variable key sizes + Key []byte `json:"key"` // DEPRECATED + KeySize int `json:"key_size"` // For algorithms with variable key sizes Keys keyEntryMap `json:"keys"` // Derived keys MUST provide a context and the master underlying key is