Reputation: 123
Im getting these errors
[] nw_coretls_callback_handshake_message_block_invoke_3 tls_handshake_continue: [-9812]
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)
when trying to load images from a webservice that has an untrusted certificate. I already configured my projects info.plist to this and it DOES WORK for "normal" requests to the webservice. But as soon as Kingfisher-Lib does the request, i get this error. Why is that?
Upvotes: 1
Views: 968
Reputation: 123
Kingfisher seems to use a custom way for accessing the url. The solution was to manually configure the host as trusted in the downlaoder:
let downloader = KingfisherManager.shared.downloader //Downloader needs to be configured to accept untrusted certificates
downloader.trustedHosts = Set(["your_untrusted_certificate_host"])
imageView.kf.setImage(with: URL(string: "\(applicationSession.environment.systemUrl!)\(path)"), placeholder: #imageLiteral(resourceName: "noImageImage"), options: [.requestModifier(modifier), .downloader(downloader)])
Upvotes: 5