Skip to content

Commit 082e382

Browse files
committed
Merge pull request docker#4 from hopkings2008/master
add two new algos for tls connection from client side.
2 parents 4e42727 + 132aa0d commit 082e382

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

tlsconfig/config.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ var acceptedCBCCiphers = []uint16{
4141
tls.TLS_RSA_WITH_AES_128_CBC_SHA,
4242
}
4343

44-
// Client TLS cipher suites (dropping CBC ciphers for client preferred suite set)
45-
var clientCipherSuites = []uint16{
46-
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
47-
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
48-
}
49-
5044
// DefaultServerAcceptedCiphers should be uses by code which already has a crypto/tls
5145
// options struct but wants to use a commonly accepted set of TLS cipher suites, with
5246
// known weak algorithms removed.

tlsconfig/config_client_ciphers.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// +build go1.5
2+
3+
// Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers.
4+
//
5+
package tlsconfig
6+
7+
import (
8+
"crypto/tls"
9+
)
10+
11+
// Client TLS cipher suites (dropping CBC ciphers for client preferred suite set)
12+
var clientCipherSuites = []uint16{
13+
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
14+
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
15+
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
16+
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
17+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// +build !go1.5
2+
3+
// Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers.
4+
//
5+
package tlsconfig
6+
7+
import (
8+
"crypto/tls"
9+
)
10+
11+
// Client TLS cipher suites (dropping CBC ciphers for client preferred suite set)
12+
var clientCipherSuites = []uint16{
13+
tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
14+
tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
15+
}

0 commit comments

Comments
 (0)