diff --git a/agent/config/runtime.go b/agent/config/runtime.go index a850971a6..39e7a0877 100644 --- a/agent/config/runtime.go +++ b/agent/config/runtime.go @@ -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, diff --git a/agent/config/runtime_test.go b/agent/config/runtime_test.go index 6de42304e..a34866954 100644 --- a/agent/config/runtime_test.go +++ b/agent/config/runtime_test.go @@ -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)