File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ public class NetworkConfig
142142 /// </summary>
143143 public bool SignKeyExchange = false ;
144144 [ TextArea ]
145- public string ServerCertificatePfx ;
145+ public string ServerBase64PfxCertificate ;
146146 public X509Certificate2 ServerX509Certificate
147147 {
148148 get
Original file line number Diff line number Diff line change @@ -298,7 +298,14 @@ private object Init(bool server)
298298
299299 try
300300 {
301- if ( server && ! string . IsNullOrEmpty ( NetworkConfig . ServerCertificatePfx ) ) NetworkConfig . ServerX509Certificate = new X509Certificate2 ( Convert . FromBase64String ( NetworkConfig . ServerCertificatePfx ) ) ;
301+ if ( server && ! string . IsNullOrEmpty ( NetworkConfig . ServerBase64PfxCertificate ) )
302+ {
303+ NetworkConfig . ServerX509Certificate = new X509Certificate2 ( Convert . FromBase64String ( NetworkConfig . ServerBase64PfxCertificate ) ) ;
304+ if ( ! NetworkConfig . ServerX509Certificate . HasPrivateKey )
305+ {
306+ if ( LogHelper . CurrentLogLevel <= LogLevel . Normal ) LogHelper . LogWarning ( "The imported PFX file did not have a private key" ) ;
307+ }
308+ }
302309 }
303310 catch ( CryptographicException ex )
304311 {
You can’t perform that action at this time.
0 commit comments