I am try to integrate AWS S3 .NET SDK with Unity. But keep getting below error:
TlsException: Invalid certificate received from server. Error code: 0xffffffff80092012 Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.validateCertificates (Mono.Security.X509.X509CertificateCollection certificates) Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.ProcessAsTls1 ()
My javascript code:
function Start (){
client = Amazon.AWSClientFactory.CreateAmazonS3Client(Conf.AWSAccessKey, Conf.AWSSecretKey);
var response:ListBucketsResponse = client.ListBuckets();
}
I have searching whole day and probably find the reason: “It turns out that Mono installs with no root certs, so by default Mono refuses to trust any SSL-protected web services. The Mono Security FAQ (Redirecting…) has a couple suggestions for how to handle the issue.”
I have tried below methods:
mcs am1.cs
mono am1.exe https://www.amazonaws.com
When I run compiled am1.exe, it gives me a lot of exception erros
2 Use the mozroots.exe tool to download and install all Mozilla’s root certificates.
C:\Program Files (x86)\Mono-2.6.7\lib\mono\1.0>mozroots --import --machine --sync
Although the output said the certs have successfully imported. But in Unity3D it still prompts “Invalid certificate received from server”
I have been working on this whole day and can’t get it solved, hope someone can help me. Thank you