mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-27 07:28:14 +00:00
Merge pull request #56415 from liggitt/tls-cache-key
Automatic merge from submit-queue (batch tested with PRs 56094, 52910, 55953, 56405, 56415). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Include ServerName in tls transport cache key Fixes #56385 ```release-note Fixes server name verification of aggregated API servers and webhook admission endpoints ``` Kubernetes-commit: a46153e2f988382535aaf27a5a90b13b6c10712b
This commit is contained in:
commit
84b6352f98
1416
Godeps/Godeps.json
generated
1416
Godeps/Godeps.json
generated
File diff suppressed because it is too large
Load Diff
@ -88,5 +88,5 @@ func tlsConfigKey(c *Config) (string, error) {
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
// Only include the things that actually affect the tls.Config
|
// Only include the things that actually affect the tls.Config
|
||||||
return fmt.Sprintf("%v/%x/%x/%x", c.TLS.Insecure, c.TLS.CAData, c.TLS.CertData, c.TLS.KeyData), nil
|
return fmt.Sprintf("%v/%x/%x/%x/%v", c.TLS.Insecure, c.TLS.CAData, c.TLS.CertData, c.TLS.KeyData, c.TLS.ServerName), nil
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,20 @@ func TestTLSConfigKey(t *testing.T) {
|
|||||||
KeyData: []byte{1},
|
KeyData: []byte{1},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"cert 1, key 1, servername 1": {
|
||||||
|
TLS: TLSConfig{
|
||||||
|
CertData: []byte{1},
|
||||||
|
KeyData: []byte{1},
|
||||||
|
ServerName: "1",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"cert 1, key 1, servername 2": {
|
||||||
|
TLS: TLSConfig{
|
||||||
|
CertData: []byte{1},
|
||||||
|
KeyData: []byte{1},
|
||||||
|
ServerName: "2",
|
||||||
|
},
|
||||||
|
},
|
||||||
"cert 1, key 2": {
|
"cert 1, key 2": {
|
||||||
TLS: TLSConfig{
|
TLS: TLSConfig{
|
||||||
CertData: []byte{1},
|
CertData: []byte{1},
|
||||||
|
Loading…
Reference in New Issue
Block a user