From d722c9e18da9daace339e26870de88c6f8dd7a77 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 27 Dec 2018 21:07:17 -0800 Subject: [PATCH] Use default auth handling if the pinning fails --- Limelight/Network/HttpManager.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Limelight/Network/HttpManager.m b/Limelight/Network/HttpManager.m index e910695e..432897bc 100644 --- a/Limelight/Network/HttpManager.m +++ b/Limelight/Network/HttpManager.m @@ -279,28 +279,28 @@ static const NSString* HTTPS_PORT = @"47984"; { if (SecTrustGetCertificateCount(challenge.protectionSpace.serverTrust) != 1) { Log(LOG_E, @"Server certificate count mismatch"); - completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, NULL); + completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, NULL); return; } SecCertificateRef actualCert = SecTrustGetCertificateAtIndex(challenge.protectionSpace.serverTrust, 0); if (actualCert == nil) { Log(LOG_E, @"Server certificate parsing error"); - completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, NULL); + completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, NULL); return; } CFDataRef actualCertData = SecCertificateCopyData(actualCert); if (actualCertData == nil) { Log(LOG_E, @"Server certificate data parsing error"); - completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, NULL); + completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, NULL); return; } if (!CFEqual(actualCertData, (__bridge CFDataRef)_serverCert)) { Log(LOG_E, @"Server certificate mismatch"); CFRelease(actualCertData); - completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, NULL); + completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, NULL); return; }