ssl - WSS/TLS websocket connection with Swift iOS -


solved (following answer)

i using starscream library create safe websocket wss in test server have self-signed certificate , find impossible make connection.

var socket = websocket(url: nsurl(scheme: "wss", host: "selfsignedserver.com", path: "/")!) 

log

2014-12-16 10:38:10.260 pruebasignin[2135:363455] cfnetwork sslhandshake failed (-9807) websocket disconnected: operation couldn’t completed. (osstatus error -9807.) 

and when try connect server certificate valid fails connect solved

var socket = websocket(url: nsurl(scheme: "wss", host: "production.com", path: "/")!) 

log

websocket disconnected: invalid http upgrade 

starscream supports flag can use self-signed certificates: https://github.com/daltoniam/starscream#self-signed-ssl-and-voip


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -