jonhoo / fantoccini

A high-level API for programmatically interacting with web pages through WebDriver.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Ignore TLS Errors

lowprivshighhopes opened this issue · comments

How would I configure the fantoccini Clientbuilder to ignore TLS Certificate errors like invalid hostname or certificate expiry. I currently get Hyper client errors when I come across those type of pages.

Thanks in advance.

Hi! To do that you'd want to use ClientBuilder::new directly, which you can pass anything that implements hyper::Connect. In your case, you can use something like hyper_tls::HttpsConnector::from to construct one from a tokio_native_tls::TlsConnectorBuilder, which lets you set things like how to handle certificates.

Awesome thanks! Closing my question.