You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if let certPath = Bundle.module.url(forResource: "theCert", withExtension: "cer") {
let certData = try! Data(contentsOf: certPath)
let cert = SSLCert(data: certData)
task.security = HTTPSecurity(certs: [cert], usePublicKeys: false)
}
task.run { (response) in
if let err = response.error {
print("error: \(err)")
return
}
// Do work
}
I have also tried using the SecKey initializer and even though I get back a valid value, pinning always fails. The task is canceled and I'm not sure why.
Can you lead me in the right direction?
Thank you for your time.
The text was updated successfully, but these errors were encountered:
What's the problem?
Trying to load a self signed certificate like so:
I have also tried using the SecKey initializer and even though I get back a valid value, pinning always fails. The task is canceled and I'm not sure why.
Can you lead me in the right direction?
Thank you for your time.
The text was updated successfully, but these errors were encountered: