mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
Fix two potential channel hangs in access.tryDecrypt (#24418)
* Fix two potential channel hangs in access.tryDecrypt * could also live here
This commit is contained in:
@@ -720,7 +720,7 @@ func (a *access) Decrypt(ctx context.Context, ciphertext *MultiWrapValue, option
|
||||
for _, sealWrapper := range wrappersByPriority {
|
||||
keyId, err := sealWrapper.Wrapper.KeyId(ctx)
|
||||
if err != nil {
|
||||
reportResult(sealWrapper.Name, nil, false, err)
|
||||
go reportResult(sealWrapper.Name, nil, false, err)
|
||||
continue
|
||||
}
|
||||
if keyId == k {
|
||||
@@ -765,6 +765,7 @@ GATHER_RESULTS:
|
||||
break GATHER_RESULTS
|
||||
}
|
||||
}
|
||||
close(resultCh)
|
||||
|
||||
// No wrapper was able to decrypt the value, return an error
|
||||
if len(errs) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user