X.iOS Cycle7 seems to break SSL

2019-05-09 23:49发布

Yesterday I updated XS to the RC version in the Beta-channel, to cycle7. Now I'm experiencing problems when connecting to HTTPS-connections with iOS, error:

Error: SecureChannelFailure (The authentication or decryption has failed.)
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x0005e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.0.294/src/mono/mcs/class/System/System.Net/HttpWebRequest.cs:1005 
at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (IAsyncResult iar, System.Func`2 endFunction, System.Action`1 endAction, System.Threading.Tasks.Task`1 promise, Boolean requiresSynchronization) [0x00014] in /Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.0.294/src/mono/external/referencesource/mscorlib/system/threading/Tasks/FutureFactory.cs:550 

Further innerexception:

Object reference not set to an instance of an object
at Mono.Security.Protocol.Tls.CipherSuite.createEncryptionCipher () [0x0008a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.0.294/src/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs:489 
at Mono.Security.Protocol.Tls.CipherSuite.InitializeCipher () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.0.294/src/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs:278 
at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (IAsyncResult result) [0x001d6] in /Library/Frameworks/Xamarin.iOS.framework/Versions/9.8.0.294/src/mono/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs:468 

I'm using Refit for API communications. Connection is made to CloudFlare on a valid HTTPS certificate. The current app, which is build in the previous cycle, is still working fine.

I haven't changed anything at the code, which is working for months. I've tried to use the new "Apple TLS" implementation for SSL, which solved a bit, but gives me SSL issues when uploading an image. I'm not 100% sure if I already should file a bug-report. Anyone could give me some tips on what I could try? Or should I directly file a bug-report?

2条回答
Root(大扎)
2楼-- · 2019-05-10 00:24

This exception only happens when you have the "Xamarin Inspector" add-in enabled. As Sebastian here said here It's probably 'swapping assemblies'.

The solution is to disable the add-in in the Add-in manager of XS. After that the exception won't occur anymore.

查看更多
三岁会撩人
3楼-- · 2019-05-10 00:31

This might be normal, but we would need to know the exact URL you used to confirm it. The fact that it worked before could just means the server, or it's configuration, was recently updated.

Mono's default, managed SSL/TLS stack only supports SSLv3/TLSv1 and if the web site you're trying to access does not support it (e.g. requires TLS 1.1 or 1.2) or does not support any of Mono's supported cipher suites, then you'll end up with an exception.

There are no plans to add support for TLS 1.1 or 1.2 on the existing managed implementation as we now offer better, native alternatives.

If you have an issue with the AppleTLS implementation (when uploading an image) please open a bug report so we can investigate and fix this before cycle 7 goes to stable.

查看更多
登录 后发表回答