Skip to content

Commit

Permalink
Updated AFNetworking security policy to disable certificate chain val…
Browse files Browse the repository at this point in the history
…idation
  • Loading branch information
Dunja Lalic authored and Dunja Lalic committed Feb 8, 2016
1 parent bd0ca97 commit 15700a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Pod/Classes/Controller/RFFeatureAPIClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ - (instancetype)initWithBaseURL:(NSURL *)url
AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate];
policy.allowInvalidCertificates = YES;
policy.validatesDomainName = NO;
policy.validatesCertificateChain = NO;
NSString *certificatePath = [[NSBundle mainBundle] pathForResource:certificateName ofType:@"cer"];
if (certificatePath) {
NSData *certificate = [NSData dataWithContentsOfFile:certificatePath];
Expand Down

0 comments on commit 15700a6

Please sign in to comment.