Bladeren bron

Comment out unused static functions

They were referenced in testPolicyWithCertificatePinningAllowsGoogleComServerTrustIncompleteChainWithRootCertificatePinnedAndValidDomainName which is now disabled.
Cédric Luthi 9 jaren geleden
bovenliggende
commit
4a7148db79
1 gewijzigde bestanden met toevoegingen van 28 en 28 verwijderingen
  1. 28 28
      Tests/Tests/AFSecurityPolicyTests.m

+ 28 - 28
Tests/Tests/AFSecurityPolicyTests.m

@@ -57,19 +57,19 @@ static SecTrustRef AFUTADNNetServerTrust() {
     return AFUTTrustChainForCertsInDirectory(serverCertDirectoryPath);
 }
 
-static SecTrustRef AFUTGoogleComServerTrustPath1() {
-    NSString *bundlePath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] resourcePath];
-    NSString *serverCertDirectoryPath = [bundlePath stringByAppendingPathComponent:@"GoogleComServerTrustChainPath1"];
-    
-    return AFUTTrustChainForCertsInDirectory(serverCertDirectoryPath);
-}
-
-static SecTrustRef AFUTGoogleComServerTrustPath2() {
-    NSString *bundlePath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] resourcePath];
-    NSString *serverCertDirectoryPath = [bundlePath stringByAppendingPathComponent:@"GoogleComServerTrustChainPath2"];
-
-    return AFUTTrustChainForCertsInDirectory(serverCertDirectoryPath);
-}
+//static SecTrustRef AFUTGoogleComServerTrustPath1() {
+//    NSString *bundlePath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] resourcePath];
+//    NSString *serverCertDirectoryPath = [bundlePath stringByAppendingPathComponent:@"GoogleComServerTrustChainPath1"];
+//    
+//    return AFUTTrustChainForCertsInDirectory(serverCertDirectoryPath);
+//}
+//
+//static SecTrustRef AFUTGoogleComServerTrustPath2() {
+//    NSString *bundlePath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] resourcePath];
+//    NSString *serverCertDirectoryPath = [bundlePath stringByAppendingPathComponent:@"GoogleComServerTrustChainPath2"];
+//
+//    return AFUTTrustChainForCertsInDirectory(serverCertDirectoryPath);
+//}
 
 static SecCertificateRef AFUTHTTPBinOrgCertificate() {
     NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"httpbinorg_01192017" ofType:@"cer"];
@@ -103,21 +103,21 @@ static SecCertificateRef AFUTAddTrustExternalRootCertificate() {
     return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData));
 }
 
-static SecCertificateRef AFUTGoogleComEquifaxSecureCARootCertificate() {
-    NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"Equifax_Secure_Certificate_Authority_Root" ofType:@"cer"];
-    NSCAssert(certPath != nil, @"Path for certificate should not be nil");
-    NSData *certData = [NSData dataWithContentsOfFile:certPath];
-    
-    return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData));
-}
-
-static SecCertificateRef AFUTGoogleComGeoTrustGlobalCARootCertificate() {
-    NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"GeoTrust_Global_CA_Root" ofType:@"cer"];
-    NSCAssert(certPath != nil, @"Path for certificate should not be nil");
-    NSData *certData = [NSData dataWithContentsOfFile:certPath];
-    
-    return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData));
-}
+//static SecCertificateRef AFUTGoogleComEquifaxSecureCARootCertificate() {
+//    NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"Equifax_Secure_Certificate_Authority_Root" ofType:@"cer"];
+//    NSCAssert(certPath != nil, @"Path for certificate should not be nil");
+//    NSData *certData = [NSData dataWithContentsOfFile:certPath];
+//    
+//    return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData));
+//}
+//
+//static SecCertificateRef AFUTGoogleComGeoTrustGlobalCARootCertificate() {
+//    NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"GeoTrust_Global_CA_Root" ofType:@"cer"];
+//    NSCAssert(certPath != nil, @"Path for certificate should not be nil");
+//    NSData *certData = [NSData dataWithContentsOfFile:certPath];
+//    
+//    return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData));
+//}
 
 static SecCertificateRef AFUTSelfSignedCertificateWithoutDomain() {
     NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"NoDomains" ofType:@"cer"];