Added invalidSSL flag to AFHTTPClient
This commit is contained in:
parent
a150b95f09
commit
f64ce9143d
2 changed files with 10 additions and 0 deletions
|
|
@ -145,6 +145,11 @@ typedef enum {
|
||||||
@property (nonatomic, assign) AFURLConnectionOperationSSLPinningMode defaultSSLPinningMode;
|
@property (nonatomic, assign) AFURLConnectionOperationSSLPinningMode defaultSSLPinningMode;
|
||||||
#endif
|
#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.
|
||||||
|
*/
|
||||||
|
@property (nonatomic,assign) BOOL allowInvalidSSLCertificate;
|
||||||
|
|
||||||
///---------------------------------------------
|
///---------------------------------------------
|
||||||
/// @name Creating and Initializing HTTP Clients
|
/// @name Creating and Initializing HTTP Clients
|
||||||
///---------------------------------------------
|
///---------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,11 @@ NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) {
|
||||||
self.operationQueue = [[NSOperationQueue alloc] init];
|
self.operationQueue = [[NSOperationQueue alloc] init];
|
||||||
[self.operationQueue setMaxConcurrentOperationCount:NSOperationQueueDefaultMaxConcurrentOperationCount];
|
[self.operationQueue setMaxConcurrentOperationCount:NSOperationQueueDefaultMaxConcurrentOperationCount];
|
||||||
|
|
||||||
|
//This ifdef has been added for backwards compatibility purposes
|
||||||
|
#ifdef _AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_
|
||||||
|
self.allowInvalidSSLCertificate = YES;
|
||||||
|
#endif
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue