From 0e18f85bfb8ce731ff3d347e5b28a421f4cc6e5b Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Fri, 8 Feb 2013 14:21:52 +0100 Subject: [PATCH] Replacing #ifdef macro check for Security to _AFNETWORKING_PIN_SSL_CERTIFICATES_ --- AFNetworking/AFURLConnectionOperation.h | 4 ++-- AFNetworking/AFURLConnectionOperation.m | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AFNetworking/AFURLConnectionOperation.h b/AFNetworking/AFURLConnectionOperation.h index ef2a87a..16f815f 100644 --- a/AFNetworking/AFURLConnectionOperation.h +++ b/AFNetworking/AFURLConnectionOperation.h @@ -76,7 +76,7 @@ - Operation copies do not include `completionBlock`. `completionBlock` often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ operation when copied. */ -#ifdef _SECURITY_SECBASE_H_ +#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ typedef enum { AFSSLPinningModePublicKey, AFSSLPinningModeCertificate, @@ -162,7 +162,7 @@ NSCoding, NSCopying> /** The pinning mode which will be used for SSL connections. */ -#ifdef _SECURITY_SECBASE_H_ +#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ @property (nonatomic, assign) AFURLConnectionOperationSSLPinningMode SSLPinningMode; #endif diff --git a/AFNetworking/AFURLConnectionOperation.m b/AFNetworking/AFURLConnectionOperation.m index f4c7832..e273498 100644 --- a/AFNetworking/AFURLConnectionOperation.m +++ b/AFNetworking/AFURLConnectionOperation.m @@ -145,7 +145,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat @dynamic inputStream; @synthesize outputStream = _outputStream; @synthesize credential = _credential; -#ifdef _SECURITY_SECBASE_H_ +#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ @synthesize SSLPinningMode = _SSLPinningMode; #endif @synthesize shouldUseCredentialStorage = _shouldUseCredentialStorage; @@ -178,7 +178,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat return _networkRequestThread; } -#ifdef _SECURITY_SECBASE_H_ +#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ + (NSArray *)pinnedCertificates { static NSArray *_pinnedCertificates = nil; static dispatch_once_t onceToken; @@ -535,7 +535,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat #pragma mark - NSURLConnectionDelegate -#ifdef _SECURITY_SECBASE_H_ +#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ - (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {