Skip to content
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

Merged
merged 19 commits into from
Apr 18, 2016
Merged

Conversation

colinmcardell
Copy link
Contributor

For reference: #109

@8W9aG
Copy link
Contributor

8W9aG commented Apr 8, 2016

👍 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;
Copy link
Contributor

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

@colinmcardell
Copy link
Contributor Author

Thanks for the comments @8W9aG. I will take a pass this weekend cleaning up and writing test coverage.

…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.
@coveralls
Copy link

Coverage Status

Coverage decreased (-9.1%) to 89.415% when pulling b25861f on colinmcardell:feature/ssl_pinning into 71f216d on spotify:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-9.1%) to 89.415% when pulling b25861f on colinmcardell:feature/ssl_pinning into 71f216d on spotify:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-9.1%) to 89.415% when pulling b25861f on colinmcardell:feature/ssl_pinning into 71f216d on spotify:master.

…ataLoaderServerTrustPolicy` to more gracefully fail when certificates / trusts are not properly loaded or built up.
…argument issues within `SPTDataLoaderServerTrustPolicyTest.m`
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 98.15% when pulling dd3113e on colinmcardell:feature/ssl_pinning into 71f216d on spotify:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 98.15% when pulling c2b39e7 on colinmcardell:feature/ssl_pinning into 71f216d on spotify:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 98.15% when pulling c2b39e7 on colinmcardell:feature/ssl_pinning into 71f216d on spotify:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 98.15% when pulling c2b39e7 on colinmcardell:feature/ssl_pinning into 71f216d on spotify:master.

@8W9aG
Copy link
Contributor

8W9aG commented Apr 17, 2016

👍 This is looking great, i think the only thing it needs is a rebase and then we can merge it

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 98.15% when pulling 32408ce on colinmcardell:feature/ssl_pinning into d1f27fa on spotify:master.

@colinmcardell
Copy link
Contributor Author

@8W9aG Awesome!
Did you want me to squash and force push down to a single commit??

@8W9aG
Copy link
Contributor

8W9aG commented Apr 17, 2016

Nah I think we should leave the history as is, if you are fine with this PR I'll merge it

@8W9aG 8W9aG merged commit 7c5342e into spotify:master Apr 18, 2016
@colinmcardell
Copy link
Contributor Author

I'm into it. Merge away! Thanks!

@rastersize rastersize mentioned this pull request Apr 18, 2016
@JensAyton JensAyton modified the milestone: beme Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants