mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
OSS portion of wrapper-v2 (#16811)
* OSS portion of wrapper-v2 * Prefetch barrier type to avoid encountering an error in the simple BarrierType() getter * Rename the OveriddenType to WrapperType and use it for the barrier type prefetch * Fix unit test
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
||||
wrapping "github.com/hashicorp/go-kms-wrapping"
|
||||
wrapping "github.com/hashicorp/go-kms-wrapping/v2"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
@@ -71,7 +71,7 @@ func EncryptDecrypt(rawStr string, decrypt, strip bool, wrapper wrapping.Wrapper
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("error decoding encrypted parameter: %w", err)
|
||||
}
|
||||
inBlob := new(wrapping.EncryptedBlobInfo)
|
||||
inBlob := new(wrapping.BlobInfo)
|
||||
if err := proto.Unmarshal(inMsg, inBlob); err != nil {
|
||||
return "", fmt.Errorf("error unmarshaling encrypted parameter: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user