Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: elusiven on April 18, 2017, 09:03:45 AM

Title: certificate error on iOS
Post by: elusiven on April 18, 2017, 09:03:45 AM
Hi,

When using the wwwPost mobile action with Amazon's S3 i'm getting the ssl certificate error

TlsException: Invalid certificate received from server. Error code: 0xffffffff800b010a

I'm aware that mono by default does not trust anything, I did import the certificates but error still persists. Anyone please? It's strange because few days ago it worked and now all of a sudden it doesn't...
Title: Re: certificate error on iOS
Post by: jeanfabre on April 19, 2017, 03:03:07 AM
Hi,

I would also ask on Unity forum, cause this looks like something we can't do much within PlayMaker unfortunatly.

 also, maybe could look into a dedicated asset to post data online? they will likel give you more options of headers.

though from the error it seems a problem with s3 setup and ssl, not with the post per say.


 Bye,

 Jean
Title: Re: certificate error on iOS
Post by: elusiven on April 19, 2017, 10:14:54 AM
Would it have anything to do with using XmlTextReader?

Am I doing this wrong?

Code: [Select]
private void ReadLine(string url)
{
try {
XmlTextReader reader = new XmlTextReader (url);
if(reader.Value.Length > 0) {
while (reader.ReadToFollowing("root")) {
switch (reader.NodeType) {
case XmlNodeType.Element:
NewVersion.Value = reader.GetAttribute ("version");
break;
}
}
} else {
Debug.LogWarning("Reader is empty... Possibly no internet connection");
}
}
catch(XmlException ex) {
Fsm.Event (Failed);
Debug.LogError ("Error ocurred while fetching new XML data, ex: " + ex);
}

}

private void CompareVersion()
{
try {

var oldxmlData = FsmVariables.GlobalVariables.FindFsmString ("xmlData");

if (oldxmlData.Value.Length > 0) {
XmlDocument doc = new XmlDocument ();
doc.LoadXml (oldxmlData.Value);
OldVersion.Value = doc.SelectSingleNode("//root/@version").Value;
} else {
Fsm.Event(noData);
}
}
catch(XmlException ex) {
Fsm.Event (Failed);
Debug.LogError ("Error has occurred while fetching old version of xml data, ex: " + ex);
}

if (OldVersion.Value == NewVersion.Value) {
Fsm.Event (isEqual);
} else {
Fsm.Event (notEqual);
}
}

}
Title: Re: certificate error on iOS
Post by: jeanfabre on April 21, 2017, 03:50:49 AM
Hi,

 I don't think the content you are sending matters, to make sure of that, try to send a dummy string like "hello", if then it works you know the content is not the issue.

 Bye,

 Jean