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
142
142
/// </summary>
143
143
public bool SignKeyExchange = false ;
144
144
[ TextArea ]
145
- public string ServerCertificatePfx ;
145
+ public string ServerBase64PfxCertificate ;
146
146
public X509Certificate2 ServerX509Certificate
147
147
{
148
148
get
Original file line number Diff line number Diff line change @@ -298,7 +298,14 @@ private object Init(bool server)
298
298
299
299
try
300
300
{
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
+ }
302
309
}
303
310
catch ( CryptographicException ex )
304
311
{
You can’t perform that action at this time.
0 commit comments