datatheorem / TrustKit

Easy SSL pinning validation and reporting for iOS, macOS, tvOS and watchOS.
MIT License
2.01k stars 362 forks source link

Expected error codes #280

Open blwinters opened 2 years ago

blwinters commented 2 years ago

Is there a list of expected error codes that could be returned when certificate pinning fails the check? I can't find any explicit errors in TrustKit documentation or source code, so I assume they are handled by NSURLSession. I found NSURLErrorClientCertificateRejected = -1205, are there others that I should be handling?

https://developer.apple.com/documentation/foundation/1508628-url_loading_system_error_codes/nsurlerrorclientcertificaterejected?language=occ