Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Adopt App Transport Security on iOS 9 #1937

Closed
1ec5 opened this issue Jul 27, 2015 · 5 comments
Closed

Adopt App Transport Security on iOS 9 #1937

1ec5 opened this issue Jul 27, 2015 · 5 comments
Labels
bug iOS Mapbox Maps SDK for iOS telemetry Integration with Mapbox Telemetry libraries
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jul 27, 2015

All MGLMapboxEvents HTTP requests fail on iOS 9 with the following error:

Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x7fea5a771010>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorCodeKey=-9802, NSUnderlyingError=0x7fea5a5d03d0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x7fea5a771010>, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://cloudfront-staging.tilestream.net/events/v1?access_token=…, NSErrorFailingURLStringKey=https://cloudfront-staging.tilestream.net/events/v1?access_token=…, _kCFStreamErrorDomainKey=3}

Mapbox GL needs to adopt App Transport Security. See this blog post for details.

/cc @bleege @kkaefer @incanus

@1ec5 1ec5 added bug iOS Mapbox Maps SDK for iOS telemetry Integration with Mapbox Telemetry libraries prerelease-os labels Jul 27, 2015
@1ec5 1ec5 added this to the v0.6.0 milestone Jul 27, 2015
@bleege
Copy link
Contributor

bleege commented Jul 27, 2015

/cc @mapbox/mobiledata

@1ec5
Copy link
Contributor Author

1ec5 commented Jul 27, 2015

If I set NSExceptionRequiresForwardSecrecy=NO or NSExceptionAllowsInsecureHTTPLoads=YES for the cloudfront-staging.tilestream.net domain in the Info.plist, the errors go away.

@1ec5 1ec5 closed this as completed in 0178c94 Jul 27, 2015
@1ec5
Copy link
Contributor Author

1ec5 commented Jul 27, 2015

Whoops, forgot to open a PR on this. In any case, 0178c94 exempts the Metrics staging server from the App Transport Security’s PFS requirement. That server should never be used in production code anyways: applications developed using Mapbox GL will use the normal Mapbox API server.

@1ec5
Copy link
Contributor Author

1ec5 commented Jul 27, 2015

Also, to be clear, this issue only affected the staging server; the production server already supports PFS and needs no exemptions.

AndwareSsj pushed a commit to AndwareSsj/mapbox-gl-native that referenced this issue Nov 6, 2015
This server should not used in actual production code anyways.

Fixes mapbox#1937.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug iOS Mapbox Maps SDK for iOS telemetry Integration with Mapbox Telemetry libraries
Projects
None yet
Development

No branches or pull requests

2 participants