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:
Scott Miller
2022-08-23 15:37:16 -04:00
committed by GitHub
parent 986e43b7f2
commit 0d6a42c79e
40 changed files with 406 additions and 288 deletions

View File

@@ -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)
}