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

UPD: changed 3.x .net, to 4.x in Unity(gamelift sdk build for 3.5) and it now works fine. As I heard gamelift doesnt support 4.x sdk yet, is it True?

I’m using unity for server and client.

I’ve build a server and client. Tested it localy. Pushed server to the gamelift servers and created fleet.

I’ve tested it using aws command line tool, I’ve created a gamesession.

Now I’m trying to connect to that fleet and get sessions list: https://codeshare.io/5D7Dvp

It freezed by DescribeGameSessions for several minutes and then breaking down with error:

TlsException: Invalid certificate received from server. Error code: 0xffffffff800b010a
Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.validateCertificates (Mono.Security.X509.X509CertificateCollection certificates)
Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.ProcessAsTls1 ()
Mono.Security.Protocol.Tls.Handshake.HandshakeMessage.Process ()
(wrapper remoting-invoke-with-check) Mono.Security.Protocol.Tls.Handshake.HandshakeMessage:Process ()
Mono.Security.Protocol.Tls.ClientRecordProtocol.ProcessHandshakeMessage (Mono.Security.Protocol.Tls.TlsStream handMsg)
Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult)
Rethrow as IOException: The authentication or decryption has failed.
Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult)
Rethrow as WebException: Error getting response stream (Write: The authentication or decryption has failed.): SendFailure
System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult)
System.Net.HttpWebRequest.GetRequestStream ()
Amazon.Runtime.Internal.HttpRequest.GetRequestContent ()
Amazon.Runtime.Internal.HttpHandler`1[System.IO.Stream].InvokeSync (IExecutionContext executionContext)
Rethrow as AmazonServiceException: A WebException with status SendFailure was thrown.
Amazon.Runtime.Internal.WebExceptionHandler.HandleException (IExecutionContext executionContext, System.Net.WebException exception)
Amazon.Runtime.Internal.ExceptionHandler`1[T].Handle (IExecutionContext executionContext, System.Exception exception)
Amazon.Runtime.Internal.ErrorHandler.ProcessException (IExecutionContext executionContext, System.Exception exception)
Amazon.Runtime.Internal.ErrorHandler.InvokeSync (IExecutionContext executionContext)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (IExecutionContext executionContext)
Amazon.Runtime.Internal.CallbackHandler.InvokeSync (IExecutionContext executionContext)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (IExecutionContext executionContext)
Amazon.Runtime.Internal.Signer.InvokeSync (IExecutionContext executionContext)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (IExecutionContext executionContext)
Amazon.Runtime.Internal.CredentialsRetriever.InvokeSync (IExecutionContext executionContext)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (IExecutionContext executionContext)
Amazon.Runtime.Internal.RetryHandler.InvokeSync (IExecutionContext executionContext)

Hi @Alekseeva, It sounds like updating to .NET 4.5 solved your certificate issue. However, we don’t recommend using the GameLift client API directly in your game client. Doing so requires shipping with your aws credentials, which can open you up to a security breach.

Take a look at the following post game architecture post.

Ben