I wanted to add, I really appreciate your responses. The communication is great. I know I have been pushing this issue for a while now and I am a bit of a pain about it. I am one of those developers who believes Unity can do MUCH more than make video games, and have demonstrated as much in the past few years. One of the key portions of that expanded development involves protecting sensitive data through TLS encryption. HIPAA compliance, PCI, PA-DSS all require the TLS v1.2 for both financial and medical industries, as well as others.
Just to clarify, all the new TLS bits and pieces are about 2018.2! There is nothing we did in 2018.1 except maybe āaccidentallyā by upgrading Mono. No guarantees on anything TLS in 2018.1
As for workarounds: The project you attached to the bugticket (which looked oddly familiar to me ;)) works fine for me in 2018.2 once you comment out all the lines where it logs the properties Iāve mentioned. (small disclaimer: Havenāt fully tested myself yet since the project looked so familiar and the exception seemed straight-forward to me)
I donāt think it will work until 2018.3. Eagerly waiting for the beta of that version. Until then Iām stuck in 2017 and donāt have the interest to rebuild mono to comment out lines.
Does that mean the public 2018.2.0b10 has working TLS support for Mono/net4.x/netstandard2.0? Can we expect this support to make it to the release candidates or final releases?
edit: I ended up with TlsException: Handshake failed - error code: UNITYTLS_INTERNAL_ERROR, verify result: UNITYTLS_X509VERIFY_FATAL_ERROR
edit2: That was with SecurityProtocolType.Tls. Switching to SecurityProtocolType.Tls12 and finally things work.
Yes, I was able to get it working. I had to revaluate how I was exporting my certificates but after that my servers and clients started talking perfectly.
I donāt know about the release question though. I assume it will, but I am not 100%.
Yep, everything TLS1.2 will land in the 2018.2 release. Also, all bug fixes for TLS things that were reported during the beta phase are making it to the final version
Yeah, itās a .Net thing, the default everywhere is SecurityProtocolType.Tls
A bit sad though that we give out such a poor error message, Iāll make a note to check if that can be fixed with reasonable effort.
Hey, if you get a chance can you check out FrogBugz ticket #1057764. Itās related to the WriteCallback, InvalidOperationException: invalid nested call. I submitted the bug this morning.
Just for for everyone else following this thread: This is an expected error for attempting interleaved asynchronous write calls on SslStream like BeginWrite and no bug in Unity. Using this advice Bhearus was able to fix the issue in his project.
So everything looks good for TLS in 2018.2 so far
Iām having an issue sending emails withing Unity and I think it might be relevant for this thread.
Using 2017.17f1 emails were sent properly in Editor on both Windows and OSX but not working on iOS (couldnāt quite figure out why but I think it had to do with stripping of libraries when building to IL2CPP).
Nevertheless, we have updated the project to use 2018.2.2f1 and now emails are not even working in editor on either platform.
Iām not sure about the cause of this issue. However, it looks like a bug (since it worked in earlier versions of Unity). Can you submit a bug report?