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

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

amazon web services - When using Cognito credentials with AWS in a browser (javascript), keep getting "missing credentials" error -

c# - How to set the datatextfield value instead of the value on a drop down list? -