Merge pull request #702 from rudacs/clientCertificate-is-null

X509Certificate convert to X509Certificate2 in ClientCertificate
This commit is contained in:
Christian
2019-07-15 19:18:03 +02:00
committed by GitHub
@@ -173,6 +173,11 @@ namespace MQTTnet.Implementations
stream = sslStream;
clientCertificate = sslStream.RemoteCertificate as X509Certificate2;
if (clientCertificate == null && sslStream.RemoteCertificate != null)
{
clientCertificate = new X509Certificate2(sslStream.RemoteCertificate.Export(X509ContentType.Cert));
}
}
var clientHandler = ClientHandler;