The TLS is validated properly, but the credentials are sent even before (or right when?) the dialog shows up about the certificate error.
To be clear, here is what I did.
1. Settings->Add new account-> Exchange
2. Entered email ID (with @leakyx.com domain) and password and selected 'Next' (iOS 11 required hitting Next, and entering password on the next screen. iOS 9.3.5 has only one prompt for both email and password)
At this point, a dialog showed up about the cerficate not being valid. You have the option to continue and trust the certificate or hit 'cancel'
3. I hit cancel. (Which means, you don't trust the certificate)
The credentials still showed up. I did it twice to be sure.
On leakyx.com, ktta@leakyx.com is with iOS 9.3.5 and iOS11@leakyx.com is with iOS 11