[go: up one dir, main page]

Skip to content

Commit

Permalink
修改
Browse files Browse the repository at this point in the history
  • Loading branch information
maikebing committed Nov 5, 2024
1 parent 55143b6 commit e5b4bb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion IoTSharp.Contracts/MqttBrokerSetting.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using System.Text.Json.Serialization;

namespace IoTSharp.Contracts
{
Expand All @@ -9,7 +10,6 @@ public class MqttBrokerSetting
public int TlsPort { get; set; } = 8883;
public bool EnableTls { get; set; } = false;
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls12;
public bool PersistRetainedMessages { get; set; }

X509Certificate2 _CACertificate;

Check warning on line 14 in IoTSharp.Contracts/MqttBrokerSetting.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field '_CACertificate' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 14 in IoTSharp.Contracts/MqttBrokerSetting.cs

View workflow job for this annotation

GitHub Actions / build (Release, linux-arm)

Non-nullable field '_CACertificate' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 14 in IoTSharp.Contracts/MqttBrokerSetting.cs

View workflow job for this annotation

GitHub Actions / build (Release, linux-arm64)

Non-nullable field '_CACertificate' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 14 in IoTSharp.Contracts/MqttBrokerSetting.cs

View workflow job for this annotation

GitHub Actions / build (Release, linux-x64)

Non-nullable field '_CACertificate' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 14 in IoTSharp.Contracts/MqttBrokerSetting.cs

View workflow job for this annotation

GitHub Actions / build (Release, osx-x64)

Non-nullable field '_CACertificate' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
public X509Certificate2 CACertificate
Expand Down
2 changes: 1 addition & 1 deletion IoTSharp.Extensions.X509/X509SelfExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static X509Certificate2 CreateTlsClientRSA(this X509Certificate2 issuer,
}
var notbefor = issuer.NotBefore;
var notAfter = issuer.NotAfter;
X509Certificate2 signedCert = request.Create(issuer, DateTimeOffset.Now, DateTimeOffset.Now.AddSeconds(notAfter.Subtract(DateTime.UtcNow).TotalSeconds), guid.ToByteArray());
X509Certificate2 signedCert = request.Create(issuer, DateTimeOffset.Now, notAfter, guid.ToByteArray());
return signedCert.CopyWithPrivateKey(ecdsa);
}
}
Expand Down

0 comments on commit e5b4bb6

Please sign in to comment.