diff --git a/github.com.hashicorp.go.kms.wrapping.v2.types.pb.go b/github.com.hashicorp.go.kms.wrapping.v2.types.pb.go index 94383df..a994029 100644 --- a/github.com.hashicorp.go.kms.wrapping.v2.types.pb.go +++ b/github.com.hashicorp.go.kms.wrapping.v2.types.pb.go @@ -696,6 +696,8 @@ type Options struct { WithDisallowEnvVars bool `protobuf:"varint,90,opt,name=with_disallow_env_vars,json=withDisallowEnvVars,proto3" json:"with_disallow_env_vars,omitempty"` // WithoutHmac specifies that an HMAC is not necessary for the mechanism, even if marked as "required" WithoutHmac bool `protobuf:"varint,100,opt,name=without_hmac,json=withoutHmac,proto3" json:"without_hmac,omitempty"` + // WithoutEnvelope specifies that encryption should be over the plaintext rather than using an envelope encryption pattern + WithoutEnvelope bool `protobuf:"varint,110,opt,name=without_envelope,json=withoutEnvelope,proto3" json:"without_envelope,omitempty"` } func (x *Options) Reset() { @@ -807,6 +809,13 @@ func (x *Options) GetWithoutHmac() bool { return false } +func (x *Options) GetWithoutEnvelope() bool { + if x != nil { + return x.WithoutEnvelope + } + return false +} + // SigInfo contains information about a cryptographic signature type SigInfo struct { state protoimpl.MessageState @@ -959,7 +968,7 @@ var file_github_com_hashicorp_go_kms_wrapping_v2_types_proto_rawDesc = []byte{ 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x77, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x4b, 0x65, 0x79, 0x45, - 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0xb8, 0x06, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0xe3, 0x06, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x77, 0x69, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x61, 0x61, 0x64, 0x18, @@ -1007,55 +1016,58 @@ var file_github_com_hashicorp_go_kms_wrapping_v2_types_proto_rawDesc = []byte{ 0x73, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x6d, 0x61, 0x63, 0x18, 0x64, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x48, 0x6d, 0x61, 0x63, - 0x1a, 0x40, 0x0a, 0x12, 0x57, 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, - 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0xe3, 0x01, 0x0a, 0x07, 0x53, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, - 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x36, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x67, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x77, - 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x14, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, - 0x59, 0x0a, 0x09, 0x68, 0x6d, 0x61, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x1e, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x67, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, - 0x2e, 0x77, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x48, 0x6d, 0x61, 0x63, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x68, - 0x6d, 0x61, 0x63, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, - 0x6d, 0x61, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2a, 0x50, 0x0a, 0x08, 0x48, 0x6d, 0x61, 0x63, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, - 0x48, 0x6d, 0x61, 0x63, 0x54, 0x79, 0x70, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x68, - 0x61, 0x32, 0x32, 0x34, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, - 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x68, 0x61, 0x33, 0x38, 0x34, 0x10, 0x03, 0x12, 0x0a, - 0x0a, 0x06, 0x53, 0x68, 0x61, 0x35, 0x31, 0x32, 0x10, 0x04, 0x2a, 0x92, 0x01, 0x0a, 0x07, 0x4b, - 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, - 0x6e, 0x5f, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, - 0x73, 0x61, 0x32, 0x30, 0x34, 0x38, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x73, 0x61, 0x33, - 0x30, 0x37, 0x32, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x73, 0x61, 0x34, 0x30, 0x39, 0x36, - 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x65, 0x73, 0x32, 0x35, 0x36, 0x10, 0x04, 0x12, 0x0c, - 0x0a, 0x08, 0x45, 0x64, 0x73, 0x61, 0x50, 0x32, 0x35, 0x36, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, - 0x45, 0x64, 0x73, 0x61, 0x50, 0x33, 0x38, 0x34, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x64, - 0x73, 0x61, 0x50, 0x35, 0x32, 0x31, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4d, 0x41, 0x43, - 0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x09, 0x2a, - 0x46, 0x0a, 0x0b, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x17, - 0x0a, 0x13, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, - 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x6b, 0x69, 0x78, 0x10, - 0x01, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x6b, 0x63, 0x73, 0x38, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, - 0x42, 0x79, 0x74, 0x65, 0x73, 0x10, 0x03, 0x2a, 0x73, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x50, 0x75, - 0x72, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x65, 0x79, 0x50, 0x75, 0x72, 0x70, - 0x6f, 0x73, 0x65, 0x5f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0b, 0x0a, - 0x07, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x10, - 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x10, 0x04, 0x12, 0x08, 0x0a, - 0x04, 0x57, 0x72, 0x61, 0x70, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x6e, 0x77, 0x72, 0x61, - 0x70, 0x10, 0x06, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x41, 0x43, 0x10, 0x07, 0x42, 0x32, 0x5a, 0x30, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x67, 0x6f, 0x2d, 0x6b, 0x6d, 0x73, 0x2d, 0x77, 0x72, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x32, 0x3b, 0x77, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x29, 0x0a, 0x10, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x5f, 0x65, 0x6e, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x65, 0x18, 0x6e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x77, 0x69, 0x74, 0x68, + 0x6f, 0x75, 0x74, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x1a, 0x40, 0x0a, 0x12, 0x57, + 0x69, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe3, 0x01, + 0x0a, 0x07, 0x53, 0x69, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x2e, 0x67, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x77, 0x72, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x59, 0x0a, 0x09, 0x68, 0x6d, + 0x61, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x67, 0x6f, 0x2e, 0x6b, 0x6d, 0x73, 0x2e, 0x77, 0x72, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x48, 0x6d, + 0x61, 0x63, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6d, 0x61, 0x63, 0x54, 0x79, + 0x70, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x6d, 0x61, 0x63, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x2a, 0x50, 0x0a, 0x08, 0x48, 0x6d, 0x61, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x10, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x48, 0x6d, 0x61, 0x63, 0x54, + 0x79, 0x70, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x68, 0x61, 0x32, 0x32, 0x34, 0x10, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x68, 0x61, 0x32, 0x35, 0x36, 0x10, 0x02, 0x12, 0x0a, 0x0a, + 0x06, 0x53, 0x68, 0x61, 0x33, 0x38, 0x34, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x68, 0x61, + 0x35, 0x31, 0x32, 0x10, 0x04, 0x2a, 0x92, 0x01, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x4b, 0x65, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x73, 0x61, 0x32, 0x30, 0x34, + 0x38, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x73, 0x61, 0x33, 0x30, 0x37, 0x32, 0x10, 0x02, + 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x73, 0x61, 0x34, 0x30, 0x39, 0x36, 0x10, 0x03, 0x12, 0x0a, 0x0a, + 0x06, 0x41, 0x65, 0x73, 0x32, 0x35, 0x36, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x64, 0x73, + 0x61, 0x50, 0x32, 0x35, 0x36, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x64, 0x73, 0x61, 0x50, + 0x33, 0x38, 0x34, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x64, 0x73, 0x61, 0x50, 0x35, 0x32, + 0x31, 0x10, 0x07, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4d, 0x41, 0x43, 0x10, 0x08, 0x12, 0x0b, 0x0a, + 0x07, 0x45, 0x64, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x09, 0x2a, 0x46, 0x0a, 0x0b, 0x4b, 0x65, + 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x6e, 0x6b, + 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x50, 0x6b, 0x69, 0x78, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x50, 0x6b, 0x63, 0x73, 0x38, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x10, 0x03, 0x2a, 0x73, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x50, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, + 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x65, 0x79, 0x50, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x55, + 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, + 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x72, 0x61, 0x70, + 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x6e, 0x77, 0x72, 0x61, 0x70, 0x10, 0x06, 0x12, 0x07, + 0x0a, 0x03, 0x4d, 0x41, 0x43, 0x10, 0x07, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, + 0x67, 0x6f, 0x2d, 0x6b, 0x6d, 0x73, 0x2d, 0x77, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2f, + 0x76, 0x32, 0x3b, 0x77, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/github.com.hashicorp.go.kms.wrapping.v2.types.proto b/github.com.hashicorp.go.kms.wrapping.v2.types.proto index bee01a9..851a0f7 100644 --- a/github.com.hashicorp.go.kms.wrapping.v2.types.proto +++ b/github.com.hashicorp.go.kms.wrapping.v2.types.proto @@ -146,6 +146,9 @@ message Options { // WithoutHmac specifies that an HMAC is not necessary for the mechanism, even if marked as "required" bool without_hmac = 100; + + // WithoutEnvelope specifies that encryption should be over the plaintext rather than using an envelope encryption pattern + bool without_envelope = 110; } // SigInfo contains information about a cryptographic signature diff --git a/options.go b/options.go index f63199a..08a17b0 100644 --- a/options.go +++ b/options.go @@ -156,6 +156,16 @@ func WithoutHMAC() Option { } } +// WithoutEnvelope requests a 'raw' encryption, rather than an envelope encryption +func WithoutEnvelope() Option { + return func() interface{} { + return OptionFunc(func(o *Options) error { + o.WithoutEnvelope = true + return nil + }) + } +} + // ParsePaths is a helper function to take each string pointer argument and call parseutil.ParsePath, // replacing the contents of the target string with the result if no error occurs. The function exits // early if it encounters an error. In that case no passed fields will have been modified.