playMaker

Author Topic: certificate error on iOS  (Read 60 times)

elusiven

  • Full Member
  • ***
  • Posts: 204
  • Debt we all must pay...
    • View Profile
certificate error on iOS
« on: April 18, 2017, 06: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...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11713
    • View Profile
Re: certificate error on iOS
« Reply #1 on: April 19, 2017, 12: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

elusiven

  • Full Member
  • ***
  • Posts: 204
  • Debt we all must pay...
    • View Profile
Re: certificate error on iOS
« Reply #2 on: April 19, 2017, 07: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);
}
}

}

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 11713
    • View Profile
Re: certificate error on iOS
« Reply #3 on: April 21, 2017, 12: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