SwiftDDP
SwiftDDP copied to clipboard
Unencrypted connection (ws://) throws 'SSLHandshake failed'
Hi there,
While developing & debugging, it is convenient to use the meteor server 'out of the box' without further ssl proxy configuration.
But actually, the SwiftDDP refuses to connect when using the "ws:" scheme and logs SSL errors.
The 'Allow Arbitrary Loads' flag is enabled in the Xcode project settings.
Meteor.connect("ws://10.0.0.10:3000/websocket")
019-02-14 11:07:48.185595+0100 APP[2154:1017819] CFNetwork SSLHandshake failed (-9806)
2019-02-14 11:07:48.185617+0100 APP[2154:1017819] TCP Conn 0x28195fcc0 SSLHandshake failed (-9806)
[Error] [DDP] [SwiftWebSocket] [55] DDPEvents > websocket error Network(The operation couldn’t be completed. (OSStatus error -9806.))
[Info] [DDP] [main] [191] connect(_:callback:) > Web socket connection closed with code 0. Clean: false.
Well, as a workarround, make sure to never set Meteor.client.allowSelfSignedSSL = true
while using the "ws:" scheme