Search code examples
iossslssl-certificatepinning

Public Key pinning with NSURLSession


I want to implement public key pinning with NSURLSession. From various posts i am getting certificate pinning but not any solid reference for public key pinning. I don't want to use certificate pinning to avoid future update in server side certificate and my app release.


Solution

  • You can have a look at https://github.com/datatheorem/TrustKit . It's an iOS library that makes it easy to do public key pinning, and it works with NSURLSession.