Assert that no impossible pinning configuration exists
Assert that no impossible pinning configuration exists

If you use certificate pinning you MUST provide at least
one certificate/key file within the application bundle.
If you don't, you will not be able to preform any
successfull network requests.

I have been bitten several times by not correctly
including a Certificate/Key in the bundle and spend
far too much time debugging this.

This two assertations catch this programming error.
Not including a Certificate/Key in the bundle while
demanding pinning is obviously a programming error
and not a runtime issue.

Hope this helps a tiny bit to get more widespread
adoption of certificate pinning.

skillz/AFNetworking