Replacing #ifdef macro check for Security to _AFNETWORKING_PIN_SSL_CERTIFICATES_
This commit is contained in:
parent
8cd63afe76
commit
0e18f85bfb
2 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue