Account for a possible error in Transit BYOK. (#17025)
This commit is contained in:
parent
10121fed37
commit
d50941ac85
|
@ -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…
Reference in New Issue