I have an application that displays a warning to the user when trying to contact the server with a self-signed or otherwise untrusted SSL certificate. If they decide to continue, we use the connection: didReceiveAuthenticationChallenge to continue the HTTPS request, creating credentials for the server trust. This is the usual way to connect to untrusted servers on iOS.
What interests me is if there is a way to create this trust only for a specific connection, or if it is possible to cancel the trust later. We found that trust in the server is maintained as long as the application is running. We would like to request the user again to make sure that they still want to continue. Is it possible? Is there a way to trust only the "last" for one connection or find trust and somehow remove it so that we go through the process for the same server again?
source share