diff --git a/services/federation/main.go b/services/federation/main.go index efcc3186a0..dd2d7f8a4b 100644 --- a/services/federation/main.go +++ b/services/federation/main.go @@ -30,8 +30,8 @@ type Config struct { ReverseFederation string `toml:"reverse-federation" valid:"optional"` } `valid:"required"` TLS struct { - CertificateFile string `toml:"certificate-file" valid:"optional"` - PrivateKeyFile string `toml:"private-key-file" valid:"optional"` + CertificateFile string `toml:"certificate-file" valid:"required"` + PrivateKeyFile string `toml:"private-key-file" valid:"required"` } `valid:"optional"` } diff --git a/support/config/main_test.go b/support/config/main_test.go index fc870f81e4..105e83c74b 100644 --- a/support/config/main_test.go +++ b/support/config/main_test.go @@ -88,8 +88,8 @@ func TestUndecoded(t *testing.T) { var val struct { Test string `toml:"test" valid:"optional"` TLS struct { - CertificateFile string `toml:"certificate-file" valid:"optional"` - PrivateKeyFile string `toml:"private-key-file" valid:"optional"` + CertificateFile string `toml:"certificate-file" valid:"required"` + PrivateKeyFile string `toml:"private-key-file" valid:"required"` } `valid:"optional"` } @@ -108,8 +108,8 @@ func TestCorrect(t *testing.T) { var val struct { Test string `toml:"test" valid:"optional"` TLS struct { - CertificateFile string `toml:"certificate-file" valid:"optional"` - PrivateKeyFile string `toml:"private-key-file" valid:"optional"` + CertificateFile string `toml:"certificate-file" valid:"required"` + PrivateKeyFile string `toml:"private-key-file" valid:"required"` } `valid:"optional"` }