diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2018-05-07 10:46:08 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2018-05-07 10:46:08 -0700 |
commit | ff4c5e12e1f17f216bb405eb18c6dc6ece8f556e (patch) | |
tree | c077261bfd898182516f3989ba4ad88d0406488b | |
parent | 61c17d0771d91d98645707216686d1b036909fef (diff) | |
download | qtlocation-mapboxgl-upstream/rclee-update-certs.tar.gz |
[ios] Avoid evaluating nil certificate dataupstream/rclee-update-certs
-rw-r--r-- | platform/ios/src/MGLAPIClient.m | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/ios/src/MGLAPIClient.m b/platform/ios/src/MGLAPIClient.m index a9c5679fb8..e29b419c07 100644 --- a/platform/ios/src/MGLAPIClient.m +++ b/platform/ios/src/MGLAPIClient.m @@ -22,7 +22,7 @@ static NSString * const MGLAPIClientHTTPMethodPost = @"POST"; @property (nonatomic, copy) NSData *digicertCert_2017; @property (nonatomic, copy) NSData *geoTrustCert_2017; @property (nonatomic, copy) NSData *digicertCert_cn_2018; -@property (nonatomic, copy) NSData *geoTrustCert_cn_2018; +//@property (nonatomic, copy) NSData *geoTrustCert_cn_2018; @property (nonatomic, copy) NSData *testServerCert; @property (nonatomic, copy) NSString *userAgent; @property (nonatomic) BOOL usesTestServer; @@ -180,7 +180,7 @@ static NSString * const MGLAPIClientHTTPMethodPost = @"POST"; // Look for a pinned certificate in the server's certificate chain CFIndex numKeys = SecTrustGetCertificateCount(serverTrust); - // Check certs in the following order: digicert 2016, digicert 2017, geotrust 2016, geotrust 2017 + // Check certs in the following order: digicert 2016, digicert 2017, digicert CN 2018, geotrust 2016, geotrust 2017, geotrust CN 2018 found = [self evaluateCertificateWithCertificateData:self.digicertCert_2016 keyCount:numKeys serverTrust:serverTrust challenge:challenge completionHandler:completionHandler]; if (!found) { found = [self evaluateCertificateWithCertificateData:self.digicertCert_2017 keyCount:numKeys serverTrust:serverTrust challenge:challenge completionHandler:completionHandler]; @@ -194,9 +194,9 @@ static NSString * const MGLAPIClientHTTPMethodPost = @"POST"; if (!found) { found = [self evaluateCertificateWithCertificateData:self.geoTrustCert_2017 keyCount:numKeys serverTrust:serverTrust challenge:challenge completionHandler:completionHandler]; } - if (!found) { - found = [self evaluateCertificateWithCertificateData:self.geoTrustCert_cn_2018 keyCount:numKeys serverTrust:serverTrust challenge:challenge completionHandler:completionHandler]; - } +// if (!found) { +// found = [self evaluateCertificateWithCertificateData:self.geoTrustCert_cn_2018 keyCount:numKeys serverTrust:serverTrust challenge:challenge completionHandler:completionHandler]; +// } // If challenge can't be completed with any of the above certs, then try the test server if the app is configured to use the test server if (!found && _usesTestServer) { |