Assistance de TMDB

I'm working on an app that will launch on iOS 9, and in order to talk to the TMDb API, I need to disable App Transport Security (a new security feature). It looks (from the headers CURL returns) that your servers support TLSv1.2, correct? That's the main requirement that's catching people. I'm connecting over https, and this is the error I get back:

Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x7fe438442330>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, NSErrorPeerCertificateChainKey=<CFArray 0x7fe43a406250 [0x10c1447b0]>{type = immutable, count = 3, values = (
    0 : <cert(0x7fe438436890) s: *.themoviedb.org i: RapidSSL CA>
    1 : <cert(0x7fe4384364b0) s: RapidSSL CA i: GeoTrust Global CA>
    2 : <cert(0x7fe438441870) s: GeoTrust Global CA i: Equifax Secure Certificate Authority>
)}, NSUnderlyingError=0x7fe43a2026b0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x7fe438442330>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, kCFStreamPropertySSLPeerCertificates=<CFArray 0x7fe43a406250 [0x10c1447b0]>{type = immutable, count = 3, values = (
    0 : <cert(0x7fe438436890) s: *.themoviedb.org i: RapidSSL CA>
    1 : <cert(0x7fe4384364b0) s: RapidSSL CA i: GeoTrust Global CA>
    2 : <cert(0x7fe438441870) s: GeoTrust Global CA i: Equifax Secure Certificate Authority>
)}}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://api.themoviedb.org/3/person/287?api_key=9e***********************9faa, NSErrorFailingURLStringKey=https://api.themoviedb.org/3/person/287?api_key=9e*************************9faa, NSErrorClientCertificateStateKey=0}

Any ideas what is wrong? Has a certificate expired or something?

11 réponses (sur la page 1 sur 1)

Jump to last post

Hi dovfrankel,

I've heard about this, it was discussed a here. I don't think it's TLS 1.2 (we do support this) but rather the signing of the certificate. Ours was signed using SHA-1 where I believe Chrome and now the new transport in iOS wants it to be SHA-2.

We do have plans to re-sign/renew our certificates but haven't yet. I am not sure on an exact timeline.

Oh okay, thanks for the prompt reply. It would be awesome if you could re-sign before iOS 9 goes public, as it may break any apps that haven't been updated. As for myself, I'll temporarily be exempting your domain from App Transport Security. If anyone else is looking into how to do this, add this to your app's plist:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>themoviedb.org</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
</dict>

Yes, that was going to be my next suggestion. Exempting our domain should work too 😉

We will get to it.

Thanks.

Any update on this issue as iOS 9 goes public today?

Hi Alex,

No updates right now, re-signing our SSL certificates hasn't been something that is very high on our priority list. As per Apple's own technote, adding the domain as an exemption is the only way to get around it in iOS 9 for now.

Cheers.

Yeah, i know how to whitelist and have already done it... but as long as you sign the cert using SHA-2 before Apple one day decides to turn off the whitelist option then Im happy! Thanks for the quick answer.

Hi all, I'm working on a iOS app and it's the first time I try to connect to API via HTTPS. This is the error I get back:

NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSUnderlyingError=0x7bb6ad20 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorCodeKey=-9802, _kCFStreamErrorDomainKey=3, kCFStreamPropertySSLPeerTrust=, …

I've resolved with the domain exception, as suggested by the useful Dov's post.

I'm just asking if someone know others solution. I'm working with Swift 2 and Xcode 7.3.

Tks, Alessio.

Alessio, there is no other way until he has time to re-sign their SSL certificates. Whitelisting (domain exception) is the only way.

Hi Alex, ok, it's clear.

Thank you for your rapid answer.

Alessio.

P.S. We rolled out SHA2 SSL last night, the domain exception shouldn't be necessary anymore.

I've just tried with Xcode Simulator (no real iPhone) and it seems to be working.

Thank you, Alessio.

Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.

Général

s Mettre le curseur dans la barre de recherche
p Ouvrir le menu du profil
esc Fermer une fenêtre ouverte
? Ouvrir la fenêtre des raccourcis clavier

Sur les pages des médias

b Retour (ou vers le parent si faisable)
e Afficher la page de modification

Sur les pages des saisons des émissions télévisées

Afficher la saison suivante (flèche droite)
Afficher la saison précédente (flèche gauche)

Sur les pages des épisodes des émissions télévisées

Afficher l'épisode suivant (flèche droite)
Afficher l'épisode précédent (flèche gauche)

Sur toutes les pages des images / photos

a Ouvrir la fenêtre d'ajout d'image / photo

Sur toutes les pages de modifications

t Ouvrir le sélecteur de traduction
ctrl+ s Envoyer le formulaire

Sur les pages des discussions

n Créer une nouvelle discussion
w Basculer le statut de suivi
p Basculer publique / privée
c Basculer fermer / ouvrir
a Ouvrir l'activité
r Répondre à la discussion
l Afficher la dernière réponse
ctrl+ enter Envoyer votre message
Page suivante (flèche droite)
Page précédente (flèche gauche)

Paramètres

Vous souhaitez évaluer ou ajouter cet élément à une liste ?

Connexion