diff --git a/src/Miningcore/Program.cs b/src/Miningcore/Program.cs index e2f970b27..c9bb8c535 100644 --- a/src/Miningcore/Program.cs +++ b/src/Miningcore/Program.cs @@ -825,10 +825,10 @@ private static void ConfigurePostgres(PostgresConfig pgConfig, ContainerBuilder { connectionString.Append("SSL Mode=Require;"); - if(!string.IsNullOrEmpty(pgConfig.TlsCert.Trim())) + if(!string.IsNullOrEmpty(pgConfig.TlsCert?.Trim())) connectionString.Append($"SSL Certificate={pgConfig.TlsCert.Trim()};"); - if(!string.IsNullOrEmpty(pgConfig.TlsKey.Trim())) + if(!string.IsNullOrEmpty(pgConfig.TlsKey?.Trim())) connectionString.Append($"SSL Key={pgConfig.TlsKey.Trim()};"); if(!string.IsNullOrEmpty(pgConfig.TlsPassword))