I am using AFNetworking 2.3.1, I have a trusted certificate for which I would like to bind a public key.
I have crt , key , pfx , so I assume I should add them to my package.
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@"Success"); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { return [self processError:[operation response]]; }]; [operation start];
Now, how can I tell AFNetworking to use AFSSLPinningModePublicKey mode?
(I do not see the setSSLPinningMode method from AFHTTPRequestOperation )
And how do I tell AFNetworking to use the added key? I can not find any example in the documentation.
source share