Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
195a4d6f
Unverified
Commit
195a4d6f
authored
Nov 27, 2017
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include ServerName in tls transport cache key
parent
02a7c12c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
cache.go
staging/src/k8s.io/client-go/transport/cache.go
+1
-1
cache_test.go
staging/src/k8s.io/client-go/transport/cache_test.go
+14
-0
No files found.
staging/src/k8s.io/client-go/transport/cache.go
View file @
195a4d6f
...
...
@@ -88,5 +88,5 @@ func tlsConfigKey(c *Config) (string, error) {
return
""
,
err
}
// 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
}
staging/src/k8s.io/client-go/transport/cache_test.go
View file @
195a4d6f
...
...
@@ -62,6 +62,20 @@ func TestTLSConfigKey(t *testing.T) {
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"
:
{
TLS
:
TLSConfig
{
CertData
:
[]
byte
{
1
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment