@@ -208,22 +208,22 @@ + (NSArray *)pinnedPublicKeys {
208
208
209
209
for (NSData *data in pinnedCertificates) {
210
210
SecCertificateRef allowedCertificate = SecCertificateCreateWithData (NULL , (__bridge CFDataRef)data);
211
- NSCParameterAssert (allowedCertificate);
211
+ NSParameterAssert (allowedCertificate);
212
212
213
213
SecCertificateRef allowedCertificates[] = {allowedCertificate};
214
214
CFArrayRef certificates = CFArrayCreate (NULL , (const void **)allowedCertificates, 1 , NULL );
215
215
216
216
SecPolicyRef policy = SecPolicyCreateBasicX509 ();
217
217
SecTrustRef allowedTrust = NULL ;
218
218
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);
220
220
221
221
SecTrustResultType result = 0 ;
222
222
status = SecTrustEvaluate (allowedTrust, &result);
223
- NSAssert (status == noErr , @" SecTrustEvaluate error: %ld " , (long int )status);
223
+ NSAssert (status == errSecSuccess , @" SecTrustEvaluate error: %ld " , (long int )status);
224
224
225
225
SecKeyRef allowedPublicKey = SecTrustCopyPublicKey (allowedTrust);
226
- NSCParameterAssert (allowedPublicKey);
226
+ NSParameterAssert (allowedPublicKey);
227
227
[publicKeys addObject: (__bridge_transfer id )allowedPublicKey];
228
228
229
229
CFRelease (allowedTrust);
@@ -570,11 +570,11 @@ - (void)connection:(NSURLConnection *)connection
570
570
SecTrustRef trust = NULL ;
571
571
572
572
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);
574
574
575
575
SecTrustResultType result;
576
576
status = SecTrustEvaluate (trust, &result);
577
- NSAssert (status == noErr , @" SecTrustEvaluate error: %ld " , (long int )status);
577
+ NSAssert (status == errSecSuccess , @" SecTrustEvaluate error: %ld " , (long int )status);
578
578
579
579
[trustChain addObject: (__bridge_transfer id )SecTrustCopyPublicKey (trust)];
580
580
0 commit comments