I have a server with a self signed certificate . I want to connect my device with the server with https form .
I hear that I must just accept the connexion . But I don t know how .
I have a self signed certificate because it is a test server. But I want to access it with https form?
When I try to access with https I have an error :
SURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)
By default, Cocoa refuses all SSL connections when the certificate is invalid.
However, you can force them to accept also invalid certificates. The method depends on which library/framework you are using. For example:
The code above, to accept any kind of SSL certificate, even if invalid, is a serious security risk. Basically, it makes the whole SSL useless. As a consequence, you should use that code only during development, if you really need to test with SSL connections.
Please also note that Apple will reject any application submitted to the App Store that accepts invalid SSL certificates.