Skip to content

Commit 349edae

Browse files
committed
Replace peer certificate parameter by peerCertFilesPaths (allow multiple certs) for some protocols.
1 parent 2008354 commit 349edae

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

src/lib60870.netcore/iec104client/Program.cs

-3
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ public class
101101
[BsonDefaultValue(new string[] { })]
102102
public string[] peerCertFilesPaths { get; set; }
103103
[BsonDefaultValue("")]
104-
public string peerCertFilePath { get; set; }
105-
[BsonDefaultValue("")]
106104
public string rootCertFilePath { get; set; }
107105
[BsonDefaultValue(false)]
108106
public bool allowOnlySpecificCertificates { get; set; }
@@ -369,7 +367,6 @@ static void Main(string[] args)
369367
secInfo = new TlsSecurityInformation(null, ownCertificate);
370368

371369
// Add allowed server certificates - not required when AllowOnlySpecificCertificates == false
372-
secInfo.AddAllowedCertificate(new X509Certificate2(srv.peerCertFilePath));
373370
foreach (string peerCertFilePath in srv.peerCertFilesPaths)
374371
secInfo.AddAllowedCertificate(new X509Certificate2(peerCertFilePath));
375372

src/lib60870.netcore/iec104server/Program.cs

-3
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ public class
109109
[BsonDefaultValue(new string[] { })]
110110
public string[] peerCertFilesPaths { get; set; }
111111
[BsonDefaultValue("")]
112-
public string peerCertFilePath { get; set; }
113-
[BsonDefaultValue("")]
114112
public string rootCertFilePath { get; set; }
115113
[BsonDefaultValue(false)]
116114
public bool allowOnlySpecificCertificates { get; set; }
@@ -369,7 +367,6 @@ static void Main(string[] args)
369367
secInfo = new TlsSecurityInformation(null, ownCertificate);
370368

371369
// Add allowed server certificates - not required when AllowOnlySpecificCertificates == false
372-
secInfo.AddAllowedCertificate(new X509Certificate2(srv.peerCertFilePath));
373370
foreach (string peerCertFilePath in srv.peerCertFilesPaths)
374371
secInfo.AddAllowedCertificate(new X509Certificate2(peerCertFilePath));
375372

src/libiec61850/dotnet/core/2.0/iec61850_client/Common_srv_cli.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public class
104104
[BsonDefaultValue("")]
105105
public string localCertFilePath { get; set; }
106106
[BsonDefaultValue("")]
107-
public string peerCertFilePath { get; set; }
107+
public string peerCertFilesPaths { get; set; }
108108
[BsonDefaultValue("")]
109109
public string rootCertFilePath { get; set; }
110110
[BsonDefaultValue(false)]

0 commit comments

Comments
 (0)