SSL error when calling Parse.com cloud functions using iOS 8

Sometimes I get an error on iOS 8 when calling CloudCode functions. Sometimes this happens, and I have no idea why:

Error: Error Domain=Parse Code=100 "The operation couldn't be completed. (Parse error 100.)" UserInfo=0x17ed2150 { Code=100, error=Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo=0x19d0c750 { 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?, _kCFStreamErrorCodeKey=-9824, NSErrorFailingURLStringKey=https://api.parse.com/1/functions/weshread, _kCFStreamErrorDomainKey=3, NSUnderlyingError=0x19de4f40 "An SSL error has occurred and a secure connection to the server cannot be made.", NSErrorFailingURLKey=https://api.parse.com/1/functions/weshread } ... } 
+6
source share
2 answers

As Jack Cox noted, Parse TLS does not reach tobacco. But you just need to add an exception for the api.parse.com domain, and the exception should only accept less secure ciphers. See This Apple Tech Note on Vehicle Security.

Here's what you need to add to your Info.plist :

 <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>api.parse.com</key> <dict> <key>NSExceptionRequiresForwardSecrecy</key> <false/> </dict> </dict> </dict> 

UPDATE:. Parsing sent a message yesterday that they will renew their certificates on 8/11/2015, which should get rid of the need for this. I will update the answer when this happens.

+4
source

It appears that the Analytics servers do not yet support TLSv2. To get around this temporarily, you need to tell iOS 9 that it must make insecure connections.

Add the following entry to the info.plist file for your application:

 <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict> 
0
source

Source: https://habr.com/ru/post/984614/


All Articles