Starscream icon indicating copy to clipboard operation
Starscream copied to clipboard

connect to a server with tls ssl PEM cert file

Open Ganime422 opened this issue 3 years ago • 0 comments

Hello

How is it possible to connect using a cert file? I've tried to do like so:

var request = URLRequest(url: URL(string: "tls://host.com:1234")!)
request.timeoutInterval = 10
let pinner = FoundationSecurity(allowSelfSigned: true)
var socket = WebSocket(request: request, certPinner: pinner)
socket?.delegate = self
socket?.connect()

and I've also added a didRecieve func to recieve messages, but

  1. I didn't recieve anything
  2. I'm not using my certificate

is it possible to connect with a PEM cert file using this lib?

Ganime422 avatar Jan 26 '22 08:01 Ganime422