HTTPS request unable to parse
avisual opened this issue · comments
Cancelling Rendering - Optional("REQUEST\nhttps://192.168.0.1:12380/")
.2016-10-26 21:09:43.529 DYC[12587:442455] Unable to parse.
I can give you an external address to this if you need it, it is using a self sign cert just wondering how to get round this
Hi @avisual . I haven't tried it yet, but maybe this works:
browser.authenticationHandler = { (challenge) -> (URLSession.AuthChallengeDisposition, URLCredential?) in
return(.useCredential, URLCredential(trust: challenge.protectionSpace.serverTrust!))
}
Let me know. Thanks!
No Afraid that didn't work. same issue, tried increasing time out to 60 seconds just incase it was slow to respond.
I also added the suggested to info.plist
Hi @avisual . So, I finally found the time to test it myself. The code I've posted above should work, but only in combination with the NSAppTransportSecurity
setting in the Info.plist. For debugging, you can set NSAllowsArbitraryLoads
to YES
. A better way is to use NSExceptionDomains
like this:
I've added a test for self signed certificates in the authentication
-branch. Take a look.
Hope that helps.
REQUEST
https://xxx.xxx.xxx.xxx:12380
[.An SSL error has occurred and a secure connection to the server cannot be made.
]
There are issues with the site's certificate chain (net::ERR_CERT_AUTHORITY_INVALID).
View certificate
Hope that helped. Will close this ticket for now due to inactivity. Feel free to reopen it if you're still seeing this issue.