Skip to content

Commit 22d6747

Browse files
committed
Merge branch 'master' into invalid-ssl
2 parents fa9fa6e + 0d49f73 commit 22d6747

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

AFNetworking/AFURLConnectionOperation.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,22 +208,22 @@ + (NSArray *)pinnedPublicKeys {
208208

209209
for (NSData *data in pinnedCertificates) {
210210
SecCertificateRef allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)data);
211-
NSCParameterAssert(allowedCertificate);
211+
NSParameterAssert(allowedCertificate);
212212

213213
SecCertificateRef allowedCertificates[] = {allowedCertificate};
214214
CFArrayRef certificates = CFArrayCreate(NULL, (const void **)allowedCertificates, 1, NULL);
215215

216216
SecPolicyRef policy = SecPolicyCreateBasicX509();
217217
SecTrustRef allowedTrust = NULL;
218218
OSStatus status = SecTrustCreateWithCertificates(certificates, policy, &allowedTrust);
219-
NSAssert(status == noErr, @"SecTrustCreateWithCertificates error: %ld", (long int)status);
219+
NSAssert(status == errSecSuccess, @"SecTrustCreateWithCertificates error: %ld", (long int)status);
220220

221221
SecTrustResultType result = 0;
222222
status = SecTrustEvaluate(allowedTrust, &result);
223-
NSAssert(status == noErr, @"SecTrustEvaluate error: %ld", (long int)status);
223+
NSAssert(status == errSecSuccess, @"SecTrustEvaluate error: %ld", (long int)status);
224224

225225
SecKeyRef allowedPublicKey = SecTrustCopyPublicKey(allowedTrust);
226-
NSCParameterAssert(allowedPublicKey);
226+
NSParameterAssert(allowedPublicKey);
227227
[publicKeys addObject:(__bridge_transfer id)allowedPublicKey];
228228

229229
CFRelease(allowedTrust);
@@ -570,11 +570,11 @@ - (void)connection:(NSURLConnection *)connection
570570
SecTrustRef trust = NULL;
571571

572572
OSStatus status = SecTrustCreateWithCertificates(certificates, policy, &trust);
573-
NSAssert(status == noErr, @"SecTrustCreateWithCertificates error: %ld", (long int)status);
573+
NSAssert(status == errSecSuccess, @"SecTrustCreateWithCertificates error: %ld", (long int)status);
574574

575575
SecTrustResultType result;
576576
status = SecTrustEvaluate(trust, &result);
577-
NSAssert(status == noErr, @"SecTrustEvaluate error: %ld", (long int)status);
577+
NSAssert(status == errSecSuccess, @"SecTrustEvaluate error: %ld", (long int)status);
578578

579579
[trustChain addObject:(__bridge_transfer id)SecTrustCopyPublicKey(trust)];
580580

0 commit comments

Comments
 (0)