diff --git a/AFNetworking/AFHTTPClient.h b/AFNetworking/AFHTTPClient.h index 398bb10..4c27c93 100644 --- a/AFNetworking/AFHTTPClient.h +++ b/AFNetworking/AFHTTPClient.h @@ -142,7 +142,7 @@ typedef enum { Default SSL pinning mode for each `AFHTTPRequestOperation` which will be enqueued with `enqueueHTTPRequestOperation:`. */ #ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ -@property (nonatomic, assign) AFURLConnectionOperationSSLPinningMode defaultSSLPinMode; +@property (nonatomic, assign) AFURLConnectionOperationSSLPinningMode defaultSSLPinningMode; #endif ///--------------------------------------------- diff --git a/AFNetworking/AFHTTPClient.m b/AFNetworking/AFHTTPClient.m index d4c4042..88ec1cb 100644 --- a/AFNetworking/AFHTTPClient.m +++ b/AFNetworking/AFHTTPClient.m @@ -533,6 +533,9 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { [operation setCompletionBlockWithSuccess:success failure:failure]; operation.credential = self.defaultCredential; +#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ + operation.SSLPinningMode = self.defaultSSLPinningMode; +#endif return operation; } @@ -540,10 +543,6 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { #pragma mark - - (void)enqueueHTTPRequestOperation:(AFHTTPRequestOperation *)operation { -#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ - operation.SSLPinningMode = self.defaultSSLPinMode; -#endif - [self.operationQueue addOperation:operation]; }