Replacing #ifdef macro check for Security to _AFNETWORKING_PIN_SSL_CERTIFICATES_

This commit is contained in:
Mattt Thompson 2013-02-08 14:21:52 +01:00
parent 8cd63afe76
commit 0e18f85bfb
2 changed files with 5 additions and 5 deletions

View file

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

View file

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