mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 04:16:31 +02:00
Account for a possible error in Transit BYOK. (#17025)
This commit is contained in:
parent
59114c5cc1
commit
00eaf0727f
@ -258,6 +258,9 @@ func (b *backend) pathImportVersionWrite(ctx context.Context, req *logical.Reque
|
||||
return nil, err
|
||||
}
|
||||
importKey, err := b.decryptImportedKey(ctx, req.Storage, ciphertext, hashFn)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = p.Import(ctx, req.Storage, importKey, b.GetRandomReader())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user