Renaming defaultPinMode -> defaultPinningMode, to match AFURLConnectionOperation
Moving setting of pinning mode to creation of operation rather than -enqueueHTTPRequestOperation
This commit is contained in:
parent
edebae2de6
commit
45c05caaa9
2 changed files with 4 additions and 5 deletions
|
|
@ -142,7 +142,7 @@ typedef enum {
|
||||||
Default SSL pinning mode for each `AFHTTPRequestOperation` which will be enqueued with `enqueueHTTPRequestOperation:`.
|
Default SSL pinning mode for each `AFHTTPRequestOperation` which will be enqueued with `enqueueHTTPRequestOperation:`.
|
||||||
*/
|
*/
|
||||||
#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_
|
#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_
|
||||||
@property (nonatomic, assign) AFURLConnectionOperationSSLPinningMode defaultSSLPinMode;
|
@property (nonatomic, assign) AFURLConnectionOperationSSLPinningMode defaultSSLPinningMode;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
///---------------------------------------------
|
///---------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -533,6 +533,9 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
|
||||||
[operation setCompletionBlockWithSuccess:success failure:failure];
|
[operation setCompletionBlockWithSuccess:success failure:failure];
|
||||||
|
|
||||||
operation.credential = self.defaultCredential;
|
operation.credential = self.defaultCredential;
|
||||||
|
#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_
|
||||||
|
operation.SSLPinningMode = self.defaultSSLPinningMode;
|
||||||
|
#endif
|
||||||
|
|
||||||
return operation;
|
return operation;
|
||||||
}
|
}
|
||||||
|
|
@ -540,10 +543,6 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
|
||||||
- (void)enqueueHTTPRequestOperation:(AFHTTPRequestOperation *)operation {
|
- (void)enqueueHTTPRequestOperation:(AFHTTPRequestOperation *)operation {
|
||||||
#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_
|
|
||||||
operation.SSLPinningMode = self.defaultSSLPinMode;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
[self.operationQueue addOperation:operation];
|
[self.operationQueue addOperation:operation];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue