[appletls] Trust SecTrustResult.Proceed as well. Fixes #58411.
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Thu, 5 Oct 2017 09:46:45 +0000 (11:46 +0200)
committerMarek Safar <marek.safar@gmail.com>
Thu, 5 Oct 2017 21:43:34 +0000 (23:43 +0200)
Apple states clearly in their documentation about SecTrustResult.Proceed [1]:

    The user explicitly chose to trust a certificate in the chain (usually by
    clicking a button in a certificate trust panel).

    Your app should trust the chain.

This fixes bug #[58411][2], where SecTrustEvaluate returns
SecTrustResult.Proceed starting with iOS 11.

[1]: https://developer.apple.com/documentation/security/1394363-sectrustevaluate
[2]: https://bugzilla.xamarin.com/show_bug.cgi?id=58411

mcs/class/System/Mono.AppleTls/AppleCertificateHelper.cs

index 710433ef071619a21464d6a07c31f1eafc12cff0..073f16080044f4d5315b339ea99418573e80d51c 100644 (file)
@@ -149,7 +149,7 @@ namespace Mono.AppleTls
                                }
 
                                var result = trust.Evaluate ();
-                               if (result == SecTrustResult.Unspecified)
+                               if (result == SecTrustResult.Unspecified || result == SecTrustResult.Proceed)
                                        return true;
 
                                errors |= MonoSslPolicyErrors.RemoteCertificateChainErrors;