From f974dcb647c98ca467057f13cff61f215175d313 Mon Sep 17 00:00:00 2001 From: cvellan <34144841+cvellan@users.noreply.github.com> Date: Tue, 5 Dec 2017 10:13:07 +1100 Subject: [PATCH] Serialized certificates loaded as X509Certificate2 Instances of X509Certificate2 passed into an MqttClientOptionsBuilder lose data and functionality by being loaded as an X509Certificate. --- .../MQTTnet.NetStandard/Implementations/MqttTcpChannel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.cs b/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.cs index ce9dcf6..8fa93ff 100644 --- a/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.cs +++ b/Frameworks/MQTTnet.NetStandard/Implementations/MqttTcpChannel.cs @@ -130,7 +130,7 @@ namespace MQTTnet.Implementations foreach (var certificate in options.TlsOptions.Certificates) { - certificates.Add(new X509Certificate(certificate)); + certificates.Add(new X509Certificate2(certificate)); } return certificates; @@ -155,4 +155,4 @@ namespace MQTTnet.Implementations } } -#endif \ No newline at end of file +#endif