File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Source/Libraries/GSF.TimeSeries Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,11 @@ public ServiceHostBase(IContainer container) : this() =>
220220 /// </summary>
221221 protected ConfigurationType ConfigurationType { get ; private set ; }
222222
223+ /// <summary>
224+ /// Gets or sets flag that determines if the local certificate's private key should be verified upon service start.
225+ /// </summary>
226+ protected bool VerifyLocalCertificatePrivateKey { get ; set ; } = true ;
227+
223228 #endregion
224229
225230 #region [ Methods ]
@@ -774,7 +779,12 @@ private void GenerateLocalCertificate()
774779 } ;
775780
776781 if ( File . Exists ( certificatePath ) )
777- certificate = new X509Certificate2 ( certificatePath ) ;
782+ {
783+ if ( VerifyLocalCertificatePrivateKey )
784+ certificate = new X509Certificate2 ( certificatePath ) ;
785+ else
786+ return ;
787+ }
778788
779789 if ( Equals ( certificate , certificateGenerator . GenerateCertificate ( ) ) )
780790 return ;
You can’t perform that action at this time.
0 commit comments