diff --git a/AFNetworking/AFHTTPClient.h b/AFNetworking/AFHTTPClient.h index 90694f5..8e1a67b 100644 --- a/AFNetworking/AFHTTPClient.h +++ b/AFNetworking/AFHTTPClient.h @@ -146,7 +146,7 @@ typedef enum { #endif /** - The flag to determine if each `AFHTTPRequestOperation` that will be enqueued with `enqueueHTTPRequestOperation:` should accept an invalid SSL certificate. If `_AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_` is set, this property defaults to YES for backwards compatibility support. Otherwise, this property defaults to NO. + The flag to determine if each `AFHTTPRequestOperation` is created in `HTTPRequestOperationWithRequest` should accept an invalid SSL certificate. If `_AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_` is set, this property defaults to YES for backwards compatibility support. Otherwise, this property defaults to NO. */ @property (nonatomic,assign) BOOL allowInvalidSSLCertificate; diff --git a/AFNetworking/AFHTTPClient.m b/AFNetworking/AFHTTPClient.m index 9c3cd3c..8ecf643 100644 --- a/AFNetworking/AFHTTPClient.m +++ b/AFNetworking/AFHTTPClient.m @@ -541,6 +541,7 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) { #ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ operation.SSLPinningMode = self.defaultSSLPinningMode; #endif + operation.allowInvalidSSLCertificate = self.allowInvalidSSLCertificate; return operation; }