daltoniam / SwiftHTTP

Thin wrapper around NSURLSession in swift. Simplifies HTTP requests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pinning Trusted certs or keys

matiasgualino opened this issue · comments

Hi, I have to implement Cert Pinning in my application. I saved my certificate in my bundle, but certificateChainForTrust or publicKeyChainForTrust returns 3 values.

Library expects trustedCount == 3 to return true on both cases, but I have just one, so the library returns false.

I read different posts where people say something like "A validation is OK when you have at least one key."

Am I wrong? Can you help me or change the validation to trustedCount > 1?

Regards.

I thick you can change codes like this
2018-06-21 4 38 49

Are we sure this is the problem?