I have Objective-C app with WebSocket server and WebView where javascript coects to this server through ws://. Server is ruing on 127.0.0.1:<port>. I am using PocketSocket.
I want to use wss:// protocol. As I understand, PocketSocket library supports this functionality:
PSWebSocketServer.m
...
+ (instancetype)serverWithHost:(NSString *)host port:(NSUInteger)port SSLCertificates:(NSArray *)SSLCertificates
Questions:
- What certificate I need to generate? Is it possible to done programmatically from Objective-C?
- How to install this certificate locally? Do I need user's agreement?
- Is it possible to send this certificate to the WebView using
evalauteJavascriptand then use it to create coection?
