Skip to content

Commit 50ea456

Browse files
Anaetheliongithub-actions[bot]
authored andcommitted
Upgrade TLS in documentation and examples (#433)
1 parent 08d09e5 commit 50ea456

5 files changed

+5
-5
lines changed

README.md

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func main() {
4545
ResponseHeaderTimeout: time.Millisecond,
4646
DialContext: (&net.Dialer{Timeout: time.Nanosecond}).DialContext,
4747
TLSClientConfig: &tls.Config{
48-
MinVersion: tls.VersionTLS11,
48+
MinVersion: tls.VersionTLS12,
4949
// ...
5050
},
5151
},

doc.go

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func ExampleNewClient() {
6363
ResponseHeaderTimeout: time.Second,
6464
DialContext: (&net.Dialer{Timeout: time.Second}).DialContext,
6565
TLSClientConfig: &tls.Config{
66-
MinVersion: tls.VersionTLS11,
66+
MinVersion: tls.VersionTLS12,
6767
},
6868
},
6969
}

elasticsearch_integration_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func TestClientTransport(t *testing.T) {
140140
ResponseHeaderTimeout: time.Second,
141141
DialContext: (&net.Dialer{Timeout: time.Nanosecond}).DialContext,
142142
TLSClientConfig: &tls.Config{
143-
MinVersion: tls.VersionTLS11,
143+
MinVersion: tls.VersionTLS12,
144144
InsecureSkipVerify: true,
145145
},
146146
},

0 commit comments

Comments
 (0)