iOS: trigger NSURLErrorServerCertificateUntrusted instead of NSURLErrorCancelled when failing the AuthenticationChallenge
问题 I'm handling the server trust authentication challenge in a custom way (comparing the public key from the server trust with a hashed local version) through the urlSessionDelegate, similarly to how it is done here: How do I accept a self-signed SSL certificate using iOS 7's NSURLSession and its family of delegate methods for development purposes? As described in the documentation, I need to cancel the challenge if I want to fail the server trust authentication myself. When doing this, my data