When I tried to login to the application using a webservice.
I also set my plist-file
like the following
I got the following error. This error showing on my console
TIC SSL Trust Error [5:0x1c017fbc0]: 3:0
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
Task <E0C414FF-98C7-4E6B-876F-B9006465C8FD>.<1> HTTP load failed (error code: -1200 [3:-9802]
Swift 5.1
Your class has to comply with URLSessionDelegate and implement the "didReceive Challenge" function.
These Apple Developer pages illustrates the issue and provides a lot of insight on how to securely fix this issue:
Handling an Authentication Challenge
Performing Manual Server Trust Authentication
Here is an example of how to fix this issue for Dev or QA environments:
The following code works for me. I implemented delegate method for NSURLSessionDelegate (didReceiveChallenge)
//NSURLSessionDelegate method
IKKA - s answer in Swift 4.2 version
You can input this in Appdelegate.m
Here is the code:
Guides by apple developer document.
ssl changes iOS 11 https://forums.developer.apple.com/thread/80197
The certificate viewer also has more specific messaging. In the screenshot below you can see that a warning is displayed for the specific trust error. In this case, the error reads “This certificate cannot be verified (weak digest algorithm)” because it is signed with SHA-1.
In some cases it's useful to connect to a server and issue it commands for testing purposes. For typical Internet protocols (HTTP, SMTP, NNTP, and so on) you can do this with the telnet tool. This does not work, however, if the protocol uses TLS. In that case your best option is the s_client subcommand of the openssl tool. Listing 1 shows how you can use this tool to manually get the contents of (remember that HTTPS uses port 443).
Listing 1 Using openssl s_client
The s_client subcommand supports a number of useful debugging options. For example:
You can supply the -cert argument to have it respond to client certificate requests. You can specify the -showcerts option to get the complete list of certificates provided by the server. The -debug and -msg options enable low-level debugging features. See the man page for more information about these options and more.