From b5d003451dc91ad6931f3d03bf86de39a3e221b4 Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Mon, 15 Jul 2013 09:43:27 -0700 Subject: [PATCH] Setting default SSL Pinning Mode in example to None only if host name does not match --- Example/Classes/AFAppDotNetAPIClient.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Example/Classes/AFAppDotNetAPIClient.m b/Example/Classes/AFAppDotNetAPIClient.m index 0ce976d..5db15d2 100644 --- a/Example/Classes/AFAppDotNetAPIClient.m +++ b/Example/Classes/AFAppDotNetAPIClient.m @@ -51,10 +51,10 @@ static NSString * const kAFAppDotNetAPIBaseURLString = @"https://alpha-api.app.n // By default, the example ships with SSL pinning enabled for the app.net API pinned against the public key of adn.cer file included with the example. In order to make it easier for developers who are new to AFNetworking, SSL pinning is automatically disabled if the base URL has been changed. This will allow developers to hack around with the example, without getting tripped up by SSL pinning. if ([[url scheme] isEqualToString:@"https"] && [[url host] isEqualToString:@"alpha-api.app.net"]) { - [self setDefaultSSLPinningMode:AFSSLPinningModePublicKey]; + self.defaultSSLPinningMode = AFSSLPinningModePublicKey; + } else { + self.defaultSSLPinningMode = AFSSLPinningModeNone; } - - self.defaultSSLPinningMode = AFSSLPinningModeNone; return self; }