.net 4.6 support

Is Unity with .net 4.6 supported? If no, are there any plans on supporting it?

When connecting to FlexMatch I get an error that is related to TLS. Most likely because our version of .net has different encryption algorithm than FlexMatch’s.

Code for connecting to FlexMatch:

   AmazonGameLiftConfig config = new AmazonGameLiftConfig
{
RegionEndpoint = Amazon.RegionEndpoint.GetBySystemName("eu-central-1")
//we have also tried ServiceURL = "https://gamelift.eu-central-1.amazonaws.com"
};
var _amazonGlClient = new AmazonGameLiftClient(config);
var request = new StartMatchmakingRequest
{
ConfigurationName = "myconfig",
Players = {new Player{PlayerId = System.Guid.NewGuid().ToString()}}
};
var response = _amazonGlClient.StartMatchmaking(request);

And after a while (about 40 seconds) we get following error (both when using 3.5 AWS SDK and 4.5):

TlsException: Invalid certificate received from server. Error code: 0xffffffff800b010a
Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord (System.IAsyncResult asyncResult) (at <eb1224ae7b184cd09343d47f8a05481b>:0)
Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (System.IAsyncResult ar, System.Boolean ignoreEmpty) (at <eb1224ae7b184cd09343d47f8a05481b>:0)
Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (System.IAsyncResult result) (at <eb1224ae7b184cd09343d47f8a05481b>:0)
Rethrow as IOException: The authentication or decryption has failed.
Mono.Security.Protocol.Tls.SslClientStream.EndNegotiateHandshake (System.IAsyncResult result) (at <eb1224ae7b184cd09343d47f8a05481b>:0)
Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (System.IAsyncResult asyncResult) (at <eb1224ae7b184cd09343d47f8a05481b>:0)
Rethrow as IOException: The authentication or decryption has failed.
Mono.Security.Protocol.Tls.SslStreamBase.EndRead (System.IAsyncResult asyncResult) (at <eb1224ae7b184cd09343d47f8a05481b>:0)
Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsClient (System.IAsyncResult asyncResult) (at <3649452ae23840d49bd323a708498f78>:0)
Mono.Net.Security.Private.LegacySslStream.AuthenticateAsClient (System.String targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, System.Security.Authentication.SslProtocols enabledSslProtocols, System.Boolean checkCertificateRevocation) (at <3649452ae23840d49bd323a708498f78>:0)
Mono.Net.Security.MonoTlsStream.CreateStream (System.Byte[] buffer) (at <3649452ae23840d49bd323a708498f78>:0)
System.Net.WebConnection.CreateStream (System.Net.HttpWebRequest request) (at <3649452ae23840d49bd323a708498f78>:0)
Rethrow as WebException: Error: TrustFailure (The authentication or decryption has failed.)
System.Net.HttpWebRequest.EndGetRequestStream (System.IAsyncResult asyncResult) (at <3649452ae23840d49bd323a708498f78>:0)
System.Net.HttpWebRequest.GetRequestStream () (at <3649452ae23840d49bd323a708498f78>:0)
Amazon.Runtime.Internal.HttpRequest.GetRequestContent () (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.HttpHandler`1[TRequestContent].InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.Unmarshaller.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.ErrorHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Rethrow as AmazonServiceException: A WebException with status TrustFailure was thrown.
Amazon.Runtime.Internal.WebExceptionHandler.HandleException (Amazon.Runtime.IExecutionContext executionContext, System.Net.WebException exception) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.ExceptionHandler`1[T].Handle (Amazon.Runtime.IExecutionContext executionContext, System.Exception exception) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.ErrorHandler.ProcessException (Amazon.Runtime.IExecutionContext executionContext, System.Exception exception) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.ErrorHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.CallbackHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.Signer.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.CredentialsRetriever.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.RetryHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.CallbackHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.EndpointResolver.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.Marshaller.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.CallbackHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.PipelineHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.MetricsHandler.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.Internal.RuntimePipeline.InvokeSync (Amazon.Runtime.IExecutionContext executionContext) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.Runtime.AmazonServiceClient.Invoke[TRequest,TResponse] (TRequest request, Amazon.Runtime.Internal.Transform.IMarshaller`2[T,R] marshaller, Amazon.Runtime.Internal.Transform.ResponseUnmarshaller unmarshaller) (at <0030dd285d1f47228b3cdd4917b641fe>:0)
Amazon.GameLift.AmazonGameLiftClient.StartMatchmaking (Amazon.GameLift.Model.StartMatchmakingRequest request) (at <91a6ffba14194244975d9aece83c7658>:0)<br>

Update: I’ve tryed Unity with .net 3.5 and have same problem. May be problem in config?

Hi @FedorPrivivkin, I’m unable to reproduce the error you’re seeing with (almost) the same code. The only change I made was to the matchmaking configuration name. Have you tried it from multiple machines? Your matchmaking config wouldn’t cause a certificate error, but it could be something else on your machine, like a proxy.

I think we’ll need a bit more information to dig into this. Can you create a fiddler trace of the call? Then we can verify the endpoints and look at our logs for that particular call.

Ben

Can it be problem with AWS Credentials configuration?

Unity sleep about 100 seconds at StartMatchmaking function and show TlsException.

I’ve tried and get:


CONNECT gamelift.eu-central-1.amazonaws.com:443 HTTP/1.0
Host: gamelift.eu-central-1.amazonaws.com
A SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.
Version: 3.1 (TLS/1.0)
Random: 5A 85 8C CD 62 39 D5 FB AE 93 FE 42 D0 1E FB F6 BB 3B 75 A9 0F 19 C1 AE D9 BE 54 EA 0A 77 2E 95
"Time": 12.04.2079 18:20:58
SessionID: empty
Extensions: server_name	gamelift.eu-central-1.amazonaws.com
Ciphers: [0035]	TLS_RSA_AES_256_SHA
[002F]	TLS_RSA_AES_128_SHA
[000A]	SSL_RSA_WITH_3DES_EDE_SHA
[0005]	SSL_RSA_WITH_RC4_128_SHA
[0004]	SSL_RSA_WITH_RC4_128_MD5
[0009]	SSL_RSA_WITH_DES_SHA
Compression: [00]	NO_COMPRESSION
HTTP/1.0 200 Connection Established
FiddlerGateway: Direct
StartTime: 16:36:13.445
Connection: close
EndTime: 16:36:13.850
ClientToServerBytes: 120
ServerToClientBytes: 4682
This is a CONNECT tunnel, through which encrypted HTTPS traffic flows.
To view the encrypted sessions inside this tunnel, enable the Tools > Options > HTTPS > Decrypt HTTPS traffic option.
A SSLv3-compatible ServerHello handshake was found. Fiddler extracted the parameters below.
Version: 3.1 (TLS/1.0)
SessionID:	4C 04 9B 38 18 F8 12 01 84 73 C1 01 59 38 28 EC 4A DD 91 42 5E 3C 77 37 35 54 EC 75 5C B5 47 83
Random: 3B 76 7A E3 36 4B 88 A4 15 18 17 F9 97 DE 54 19 F5 35 D5 4C B5 48 6E 52 0A E0 19 7C 56 1B 3C 53
Cipher: TLS_RSA_AES_128_SHA [0x002F]
CompressionSuite:	NO_COMPRESSION [0x00]
Extensions:
none

and with Decrypt HTTPS traffic have problem:
!SecureClientPipeDirect failed: System.Security.Authentication.AuthenticationException Call error SSPI, <An unknown error occurred while processing the certificate for pipe (CN=gamelift.eu-central-1.amazonaws.com, O=DO_NOT_TRUST, OU=Created by http://www.fiddler2.com).

And this:


CONNECT gamelift.eu-central-1.amazonaws.com:443 HTTP/1.0
Host: gamelift.eu-central-1.amazonaws.com
A SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.
Version: 3.1 (TLS/1.0)
Random: 5A 85 8D CF E4 E1 B9 D5 74 4E 23 4F 0C 14 95 42 AE 60 44 34 02 32 89 C6 E9 2C 44 54 D1 FB E3 02
"Time": 05.05.2080 21:13:46
SessionID: empty
Extensions: server_name	gamelift.eu-central-1.amazonaws.com
Ciphers: [0035]	TLS_RSA_AES_256_SHA
[002F]	TLS_RSA_AES_128_SHA
[000A]	SSL_RSA_WITH_3DES_EDE_SHA
[0005]	SSL_RSA_WITH_RC4_128_SHA
[0004]	SSL_RSA_WITH_RC4_128_MD5
[0009]	SSL_RSA_WITH_DES_SHA
Compression: [00]	NO_COMPRESSION
HTTP/1.0 200 Connection Established
FiddlerGateway: Direct
StartTime: 16:40:30.996
Connection: close