SSL wrap around iphone application

I have an application that connects to an internal game server. I want to wrap traffic in SSL so that hackers do not grab passwords and what not. Anyway, how can I do this using the iphone app? I use CFNetwork to communicate with the server, and everything is in our own internal protocol instead of using http or something like that.

thank

+3
source share
1 answer

Before opening streams you need to set the corresponding CFStream properties . You do this by first creating a dictionary using the appropriate keys kCFStreamSSL*and corresponding values, and then calling CFWriteStreamSetProperty()to set this dictionary as a property kCFStreamPropertySSLSettings. The property must be shared between both threads in a pair of connections.

If your server is trying to negotiate an SSL connection, I believe that threads will interact in default negotiations. You may have less work than you think.

+1
source

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


All Articles