diff options
author | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:37 -0500 |
---|---|---|
committer | Alex Pilon <apilon@hashicorp.com> | 2019-02-22 18:24:37 -0500 |
commit | 15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (patch) | |
tree | 255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/github.com/aws/aws-sdk-go/service/s3/sse.go | |
parent | 07971ca38143c5faf951d152fba370ddcbe26ad5 (diff) | |
download | terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.gz terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.zst terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.zip |
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
Updated via: go get github.com/hashicorp/terraform@sdk-v0.11-with-go-modules and go mod tidy
Diffstat (limited to 'vendor/github.com/aws/aws-sdk-go/service/s3/sse.go')
-rw-r--r-- | vendor/github.com/aws/aws-sdk-go/service/s3/sse.go | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go b/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go index 268ea2f..8010c4f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go | |||
@@ -5,17 +5,27 @@ import ( | |||
5 | "encoding/base64" | 5 | "encoding/base64" |
6 | 6 | ||
7 | "github.com/aws/aws-sdk-go/aws/awserr" | 7 | "github.com/aws/aws-sdk-go/aws/awserr" |
8 | "github.com/aws/aws-sdk-go/aws/awsutil" | ||
9 | "github.com/aws/aws-sdk-go/aws/request" | 8 | "github.com/aws/aws-sdk-go/aws/request" |
10 | ) | 9 | ) |
11 | 10 | ||
12 | var errSSERequiresSSL = awserr.New("ConfigError", "cannot send SSE keys over HTTP.", nil) | 11 | var errSSERequiresSSL = awserr.New("ConfigError", "cannot send SSE keys over HTTP.", nil) |
13 | 12 | ||
14 | func validateSSERequiresSSL(r *request.Request) { | 13 | func validateSSERequiresSSL(r *request.Request) { |
15 | if r.HTTPRequest.URL.Scheme != "https" { | 14 | if r.HTTPRequest.URL.Scheme == "https" { |
16 | p, _ := awsutil.ValuesAtPath(r.Params, "SSECustomerKey||CopySourceSSECustomerKey") | 15 | return |
17 | if len(p) > 0 { | 16 | } |
17 | |||
18 | if iface, ok := r.Params.(sseCustomerKeyGetter); ok { | ||
19 | if len(iface.getSSECustomerKey()) > 0 { | ||
20 | r.Error = errSSERequiresSSL | ||
21 | return | ||
22 | } | ||
23 | } | ||
24 | |||
25 | if iface, ok := r.Params.(copySourceSSECustomerKeyGetter); ok { | ||
26 | if len(iface.getCopySourceSSECustomerKey()) > 0 { | ||
18 | r.Error = errSSERequiresSSL | 27 | r.Error = errSSERequiresSSL |
28 | return | ||
19 | } | 29 | } |
20 | } | 30 | } |
21 | } | 31 | } |