|
@@ -102,12 +102,7 @@ public class QTTManager
|
|
|
#if (!UNITY_EDITOR && UNITY_WSA_10_0 && !ENABLE_IL2CPP)
|
|
|
client = new MqttClient(brokerAddress,brokerPort,isEncrypted, isEncrypted ? MqttSslProtocols.SSLv3 : MqttSslProtocols.None);
|
|
|
#else
|
|
|
- string folderPath;
|
|
|
- if (File.Exists(Application.streamingAssetsPath + "/emqxsl-ca.crt"))
|
|
|
- folderPath = Application.streamingAssetsPath + "/emqxsl-ca.crt";
|
|
|
- else
|
|
|
- folderPath = Path.Combine("Assets", "Samples", "MQTT", "1.0.0", "GHZMQTT", "StreamingAssets", "emqxsl-ca.crt");
|
|
|
- X509Certificate cert = new X509Certificate();
|
|
|
+ X509Certificate cert = new X509Certificate(bytes);
|
|
|
Debug.Log("IP地址或URL==>" + brokerAddress);
|
|
|
isEncrypted = false;
|
|
|
client = new MqttClient(brokerAddress, brokerPort, isEncrypted, cert, cert, isEncrypted ? MqttSslProtocols.SSLv3 : MqttSslProtocols.None);
|