agent: ensure the TLS hostname verification knows about the currently configured domain (#5513)
This commit is contained in:
parent
6617e3bf01
commit
5b1f66f818
|
@ -1592,6 +1592,7 @@ func (c *RuntimeConfig) ToTLSUtilConfig() tlsutil.Config {
|
|||
CertFile: c.CertFile,
|
||||
KeyFile: c.KeyFile,
|
||||
NodeName: c.NodeName,
|
||||
Domain: c.DNSDomain,
|
||||
ServerName: c.ServerName,
|
||||
TLSMinVersion: c.TLSMinVersion,
|
||||
CipherSuites: c.TLSCipherSuites,
|
||||
|
|
|
@ -5441,6 +5441,7 @@ func TestRuntime_ToTLSUtilConfig(t *testing.T) {
|
|||
KeyFile: "d",
|
||||
NodeName: "e",
|
||||
ServerName: "f",
|
||||
DNSDomain: "g",
|
||||
TLSMinVersion: "tls12",
|
||||
TLSCipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305},
|
||||
TLSPreferServerCipherSuites: true,
|
||||
|
@ -5458,6 +5459,7 @@ func TestRuntime_ToTLSUtilConfig(t *testing.T) {
|
|||
require.Equal(t, c.KeyFile, r.KeyFile)
|
||||
require.Equal(t, c.NodeName, r.NodeName)
|
||||
require.Equal(t, c.ServerName, r.ServerName)
|
||||
require.Equal(t, c.DNSDomain, r.Domain)
|
||||
require.Equal(t, c.TLSMinVersion, r.TLSMinVersion)
|
||||
require.Equal(t, c.TLSCipherSuites, r.CipherSuites)
|
||||
require.Equal(t, c.TLSPreferServerCipherSuites, r.PreferServerCipherSuites)
|
||||
|
|
Loading…
Reference in New Issue