Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a WithoutEnvelope option #281

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 62 additions & 50 deletions github.heygears.com.hashicorp.go.kms.wrapping.v2.types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading