-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need To Avoid SSL Problems #4
Comments
Facing the same issue :( |
To @gordonbeijing . Finally, I solved this issue. You should implement extension EONET: URLSessionDelegate {
func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
//accept all certs when testing, perform default handling otherwise
completionHandler(.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!))
}
} and you should create your URLSession request like this: return URLSession(configuration: .ephemeral,
delegate: EONET(), delegateQueue: nil).rx.response(request: request) I hope you can solve this problem smoothly. :) |
To @loinsir . Thanks a lot ! It works well. At first it didn't work after I modifying the codes according to your solution. I checked the error message, it was not the same as before. So I doubt it may be caused by some mysterious strength , and after I enabling the proxy, it works as expected 🥳 Anyway, thanks again! |
In Chapter 10, net.sci.gsfc.nasa.gov api has a ssl problem.
The text was updated successfully, but these errors were encountered: