pkyeck/socket.IO-objc — pull request #205 by hongkongkiwi (2014-08-18 09:00:13+00:00)
Title: Added in SSL Certificate Pinning using RNPinnedCertValidator library

I've added SSL certificate pinning into the library, it relies on a new submodule [RNPinnedCertValidator](https://github.com/rnapier/RNPinnedCertValidator).

What is SSL pinning? It essentially adds an extra layer of security by checking a chain of trust against a local set of public certificate files (the files are stored in the bundle). This is useful to prevent Man in the middle attacks.

[Here are some steps for setting up pinning in AFNetworking](http://initwithfunk.com/blog/2014/03/12/afnetworking-ssl-pinning-with-self-signed-certificates). The steps are the same to produce the cer file.

Once you have a .cer file, simply put it in your bundle and setup the library like this before connect

```objective-c
self.socketIO.useSSLPinning = YES;
self.socketIO.sslPinningCert = @"ca-file"; // Without the .cer extension
```

That's it!