Skip to content

Commit

Permalink
More CE changes for hybrid wireup
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmiller committed Jan 3, 2025
1 parent 39365aa commit 598cc97
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions builtin/logical/transit/backend_ce.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
4 changes: 4 additions & 0 deletions builtin/logical/transit/path_export.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions sdk/helper/keysutil/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 598cc97

Please sign in to comment.