Renaming defaultPinMode -> defaultPinningMode, to match AFURLConnectionOperation

Moving setting of pinning mode to creation of operation rather than -enqueueHTTPRequestOperation
This commit is contained in:
Mattt Thompson 2013-03-24 02:09:08 -04:00
parent edebae2de6
commit 45c05caaa9
2 changed files with 4 additions and 5 deletions

View file

@ -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
///---------------------------------------------

View file

@ -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];
}