Skip to content

Commit a0ba1b3

Browse files
Upgrade TLS in documentation and examples (#433) (#435)
Co-authored-by: Laurent Saint-Félix <[email protected]>
1 parent 2a10249 commit a0ba1b3

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ cfg := elasticsearch.Config{
159159
MaxIdleConnsPerHost: 10,
160160
ResponseHeaderTimeout: time.Second,
161161
TLSClientConfig: &tls.Config{
162-
MinVersion: tls.VersionTLS11,
162+
MinVersion: tls.VersionTLS12,
163163
// ...
164164
},
165165
// ...

_examples/configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func main() {
4444
ResponseHeaderTimeout: time.Millisecond,
4545
DialContext: (&net.Dialer{Timeout: time.Nanosecond}).DialContext,
4646
TLSClientConfig: &tls.Config{
47-
MinVersion: tls.VersionTLS11,
47+
MinVersion: tls.VersionTLS12,
4848
// ...
4949
},
5050
},

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ To configure the client, pass a Config object to the NewClient function:
3939
ResponseHeaderTimeout: time.Second,
4040
DialContext: (&net.Dialer{Timeout: time.Second}).DialContext,
4141
TLSClientConfig: &tls.Config{
42-
MinVersion: tls.VersionTLS11,
42+
MinVersion: tls.VersionTLS12,
4343
},
4444
},
4545
}

elasticsearch_example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func ExampleNewClient() {
6262
ResponseHeaderTimeout: time.Second,
6363
DialContext: (&net.Dialer{Timeout: time.Second}).DialContext,
6464
TLSClientConfig: &tls.Config{
65-
MinVersion: tls.VersionTLS11,
65+
MinVersion: tls.VersionTLS12,
6666
},
6767
},
6868
}

elasticsearch_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func TestClientTransport(t *testing.T) {
139139
ResponseHeaderTimeout: time.Second,
140140
DialContext: (&net.Dialer{Timeout: time.Nanosecond}).DialContext,
141141
TLSClientConfig: &tls.Config{
142-
MinVersion: tls.VersionTLS11,
142+
MinVersion: tls.VersionTLS12,
143143
InsecureSkipVerify: true,
144144
},
145145
},

0 commit comments

Comments
 (0)