AFNetworking/AFNetworking — pull request #705 by OliverLetterer (2012-12-28 10:56:25+00:00)
Title: Adds more control for SSL pinning

Adds more control for SSL pinning by introducing:

``` objc
typedef enum {
AFURLConnectionOperationSSLPinningModeCertificate = 0,
AFURLConnectionOperationSSLPinningModePublicKey
} AFURLConnectionOperationSSLPinningMode;
```

with a property `@property (nonatomic, assign) AFURLConnectionOperationSSLPinningMode SSLPinningMode;` on `AFURLConnectionOperation`.

`AFURLConnectionOperationSSLPinningModeCertificate` verifies that the certificate matches 1-by-1 and `AFURLConnectionOperationSSLPinningModePublicKey` verifies that only the public key of the certificate matches as described [here](http://blog.lumberlabs.com/2012/04/why-app-developers-should-care-about.html?m=1).

There is also a new property on `AFHTTPClient` `@property (nonatomic, assign) AFURLConnectionOperationSSLPinningMode defaultSSLPinMode;`.