I am developing a macOS App with Swift. Currently, the app can connect successfully to a server in local network with host and port only "XXX.XXX.XXX.XXX:YYYY" without any prefix of the host (eg: "http or https", "ws or wss").
let nwConnection = NWConnection(host: "10.1.xxx.xx", port: 1515, using: .tcp) nwConnection.start(queue: .global())
After connected to the server, the app will receive a message contains "TLS" from server for tls/ssl handshake operation.
how can I do tls/ssl handshake operation with a server certificate file to send a encrypted data to server or receive a decrypted data from server.