-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
Hi there
I'm trying to connect and create an ssl socket using the following code snippet:
let fileCertURL = Bundle.main.url(forResource:"cert", withExtension: "pem")?.path
let fileKeyURL = Bundle.main.url(forResource:"key", withExtension: "pem")?.path
let myConfig = SSLService.Configuration(withCACertificateFilePath: nil, usingCertificateFile: fileCertURL, withKeyFile: fileKeyURL, usingSelfSignedCerts: true, cipherSuite: nil)
var socket = try Socket.create()
socket.delegate = try SSLService(usingConfiguration: myConfig)
try socket.connect(to: "******", port: ****)
But I keep getting this error:
ERROR: Socket error: PKCS12 file not specified.
I am running this code on my actual iPhone device (not macOS) and by the documentation it doesn't says that I need to add a .pkcs12 file anywhere
any help is appreciated
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels