Post

Replies

Boosts

Views

Activity

Reply to watchOS 7 beta networking gives SSL error
Hi Matt, What I do not understand yet is that running on watchOS 6 the code runs OK and connects to the server. If I do it under whatchOS 7 beta it gives me the following error: PDTask <C109A177-0F66-4F87-876E-F5C104CC47BD>.<1> finished with error [-1200] Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorClientCertificateStateKey=0, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataPDTask <C109A177-0F66-4F87-876E-F5C104CC47BD>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=("LocalDataPDTask <C109A177-0F66-4F87-876E-F5C104CC47BD>.<1>",     "LocalDataTask <C109A177-0F66-4F87-876E-F5C104CC47BD>.<1>"), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802} What my code does is to save locally in the "fingerprints" array the "Fingerprint SHA256" of the server certificate and at runtime, obtain the server certificate, generate the SHA256 fingerprint and compare it to what I have saved on that variable. And it works OK. What I would also like to know if there is a need to put some kind of key in a .plist or something... If you discover that something need to be put there I would appreciate. I will follow your advice and continue my tests and wait for the final release. If I discover something or your discover something, please lets use this thread. Thank you again so much for your kind support.  Best Regards, Marcus.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’20
Reply to watchOS 7 beta networking gives SSL error
Hi Matt, how are you doing? I asked the infrastructure team of the company and they told me that the certificate they are using on this particular site was incorrectly revoked by the CA, but they still uses it until all apps that connects to this server are updated to use the newer certificates... So, the message: Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorClientCertificateStateKey=0, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?,&#9;NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made. I guess it is correct, but the fact remains that why this message does not appear running on watchOS 6.2.8 but appear when running under the watchOS 7 (final version). Also do you know how can I force it to connect programmatically bypassing this message on watchOS 7? Thank you in advance for your kind support. Best Regards, Marcus.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’20
Reply to watchOS 7 beta networking gives SSL error
Hi Matt! If I put this on .plist file it works on watchOS 7. Is this the correct way or there is another way to do this programmatically ?     <key>NSAppTransportSecurity</key>     <dict>       <key>NSExceptionDomains</key>       <dict>         <key><DOMAIN></key>         <dict>           <!--Include to allow subdomains-->           <key>NSIncludesSubdomains</key>           <true/>           <!--Include to allow HTTP requests-->           <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>           <true/>           <!--Include to specify minimum TLS version-->           <key>NSTemporaryExceptionMinimumTLSVersion</key>           <string>TLSv1.1</string>         </dict>       </dict>     </dict> Thank you again in advance. Best Regards.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’20