Removed invalid SSL macro from new 1.2.0 code

This commit is contained in:
Kevin Harwood 2013-03-25 17:15:43 -05:00
parent bcb8aea682
commit 48558d7b48

View file

@ -581,10 +581,11 @@ willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challe
break;
}
case AFSSLPinningModeNone: {
#ifdef _AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_
if(self.allowInvalidSSLCertificate == YES){
NSURLCredential *credential = [NSURLCredential credentialForTrust:serverTrust];
[[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];
#else
}
else {
SecTrustResultType result = 0;
OSStatus status = SecTrustEvaluate(serverTrust, &result);
NSAssert(status == noErr, @"SecTrustEvaluate error: %ld", (long int)status);
@ -595,7 +596,7 @@ willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challe
} else {
[[challenge sender] cancelAuthenticationChallenge:challenge];
}
#endif
}
break;
}
}