-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SSL Pinning support #110
Conversation
👍 Looks really great, needs a couple of unit tests though. One thing I have been thinking about is restricting the certificate lookups to using NSBundle pathForResource, it might be advantageous to only allow certificates from a read-only directory on the device (however a minor point) |
|
||
@interface SPTDataLoaderServerTrustPolicy () | ||
|
||
@property (strong, nonatomic) NSDictionary<NSString *, NSArray<NSData *> *> *trustedHostsAndCertificates; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to switch around nonatomic/strong so it conforms to the style of the rest of the repository
Thanks for the comments @8W9aG. I will take a pass this weekend cleaning up and writing test coverage. |
…oaderServerTrustPolicy`
…es in a private category to allow for better testability.
…the private category to allow better test coverage.
- Includes mocks for `NSURLAuthenticationChallenge` & `NSURLProtectionSpace` - Adds tests for public interface, validation of `NSURLAuthenticationChallenge`
…attempting to run tests due to import of `XCTest`. `XCTest` introduces new stuff in iOS 9.0 which triggers the partial availability warning.
…s `Security` framework within podspec.
…`. This seems to make Travis cranky.
…ataLoaderServerTrustPolicy` to more gracefully fail when certificates / trusts are not properly loaded or built up.
…argument issues within `SPTDataLoaderServerTrustPolicyTest.m`
👍 This is looking great, i think the only thing it needs is a rebase and then we can merge it |
@8W9aG Awesome! |
Nah I think we should leave the history as is, if you are fine with this PR I'll merge it |
I'm into it. Merge away! Thanks! |
For reference: #109