{"id":192,"date":"2015-12-30T17:38:18","date_gmt":"2015-12-30T17:38:18","guid":{"rendered":"http:\/\/www.josejavierfm.es\/blog\/?p=192"},"modified":"2016-02-11T09:31:02","modified_gmt":"2016-02-11T09:31:02","slug":"habilitar-conexiones-https-en-ios9-con-certificados-viejos","status":"publish","type":"post","link":"https:\/\/www.josejavierfm.es\/blog\/2015\/12\/30\/habilitar-conexiones-https-en-ios9-con-certificados-viejos\/","title":{"rendered":"Habilitar conexiones HTTPs en IOS9 con certificados viejos"},"content":{"rendered":"<p>En ios9 me encuentro con que las conexiones https que utilizaba han dejado de funcionar<\/p>\n<pre>NSURLSession\/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)2015-12-14 10:07:25.497 app[24699:660001] Error Domain=NSURLErrorDomain Code=-1200 \"An SSL error has occurred and a secure connection to the server cannot be made.\" UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=&lt;SecTrustRef: 0x7ff8f14a4080&gt;, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802,\r\n<\/pre>\n<p>Buscando por internet encuentro la siguiente informaci\u00f3n en pagina de soporte de <a href=\"https:\/\/forums.developer.apple.com\/thread\/4988\" target=\"_blank\">Apple<\/a>:<\/p>\n<blockquote><p>Exactly. iOS 9 forces connections that are using HTTPS to be TLS 1.2 to avoid recent vulnerabilities. In iOS 8 even unencrypted HTTP connections were supported, so that older versions of TLS didn&#8217;t make any problems either.<\/p><\/blockquote>\n<p>El problema entonces viene porque el certificado https no soporta TLS 1.2.<br \/>\nHay que configurar la aplicaci\u00f3n para que acepte conexiones con version del certificado anterior.<\/p>\n<p>Para ellos en el fichero info.plist a\u00f1adimos la siguiente entrada:<\/p>\n<pre><key>NSAppTransportSecurity<\/key> \r\n  <dict>  \r\n  <key>NSAllowsArbitraryLoads<\/key>  \r\n  <true\/> \r\n  <\/dict> \r\n    \r\n    \r\n<\/pre>\n<p>O de forma grafica:<\/p>\n<p><a href=\"http:\/\/www.josejavierfm.es\/blog\/wp-content\/uploads\/2015\/12\/Captura-de-pantalla-2015-12-14-a-las-9.16.54.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-193\" src=\"http:\/\/www.josejavierfm.es\/blog\/wp-content\/uploads\/2015\/12\/Captura-de-pantalla-2015-12-14-a-las-9.16.54-300x32.png\" alt=\"Captura de pantalla 2015-12-14 a las 9.16.54\" width=\"300\" height=\"32\" srcset=\"https:\/\/www.josejavierfm.es\/blog\/wp-content\/uploads\/2015\/12\/Captura-de-pantalla-2015-12-14-a-las-9.16.54-300x32.png 300w, https:\/\/www.josejavierfm.es\/blog\/wp-content\/uploads\/2015\/12\/Captura-de-pantalla-2015-12-14-a-las-9.16.54-1024x110.png 1024w, https:\/\/www.josejavierfm.es\/blog\/wp-content\/uploads\/2015\/12\/Captura-de-pantalla-2015-12-14-a-las-9.16.54.png 1116w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=josejavierfm\" class=\"twitter-share-button\">Twittear<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>En ios9 me encuentro con que las conexiones https que utilizaba han dejado de funcionar NSURLSession\/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)2015-12-14 10:07:25.497 app[24699:660001] Error Domain=NSURLErrorDomain Code=-1200 \u00abAn SSL error has occurred and a secure connection to the server cannot be made.\u00bb UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=&lt;SecTrustRef: 0x7ff8f14a4080&gt;, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, Buscando [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.josejavierfm.es\/blog\/wp-json\/wp\/v2\/posts\/192"}],"collection":[{"href":"https:\/\/www.josejavierfm.es\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.josejavierfm.es\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.josejavierfm.es\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.josejavierfm.es\/blog\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":2,"href":"https:\/\/www.josejavierfm.es\/blog\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":209,"href":"https:\/\/www.josejavierfm.es\/blog\/wp-json\/wp\/v2\/posts\/192\/revisions\/209"}],"wp:attachment":[{"href":"https:\/\/www.josejavierfm.es\/blog\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.josejavierfm.es\/blog\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.josejavierfm.es\/blog\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}