Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Source/Libraries/GSF.TimeSeries/ServiceHostBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ public ServiceHostBase(IContainer container) : this() =>
/// </summary>
protected ConfigurationType ConfigurationType { get; private set; }

/// <summary>
/// Gets or sets flag that determines if the local certificate's private key should be verified upon service start.
/// </summary>
protected bool VerifyLocalCertificatePrivateKey { get; set; } = true;

#endregion

#region [ Methods ]
Expand Down Expand Up @@ -774,7 +779,12 @@ private void GenerateLocalCertificate()
};

if (File.Exists(certificatePath))
certificate = new X509Certificate2(certificatePath);
{
if (VerifyLocalCertificatePrivateKey)
certificate = new X509Certificate2(certificatePath);
else
return;
}

if (Equals(certificate, certificateGenerator.GenerateCertificate()))
return;
Expand Down
Loading