Selenium-wire certificate is not valid

See original GitHub issue

I’m using Chrome 84, selenium-wire 2.0.0, python 3.7, Mac OS Catalina I need to connect to the website with https connection, but Chrome tells me, that certificate is not trusted (not valid) and changes https connection to http. I had tried all ways from #31 , but there’re no results yet. Could anyone help me?

This is my simple code example

from seleniumwire import webdriver import time

browser = webdriver.Chrome(executable_path='./drivers/chromedriver') browser.get('https://google.com') time.sleep(20) browser.close()

Results in Chrome (In Russian, sorry)

Снимок экрана 2020-07-21 в 11 54 34 Снимок экрана 2020-07-21 в 11 54 44

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
ofafacommented, Jan 15, 2022

I found it could be fixed by changing the configuration in keychain like below: Screen Shot 2022-01-14 at 11 36 04 PM

  1. go to keychain and find the certificate
  2. double click on it
  3. click on the right arrow of Trust section
  4. adjust the trust settings according your scenario

In my case, I need to have https connection to the site I’m scraping to work, so I need to enable SSL, other setting are not important.

2reactions
wkeelingcommented, Apr 12, 2021

@masudr4n4 Yes it won’t show you the error if you’re just using Selenium, because Selenium does not intercept and capture requests.

As explained in the certificates section, if you wish to make the “Not Secure” message disappear, then you’ll need to install Selenium Wire’s SSL certificate as an authority on your computer. You can grab the certificate here. Save it as to a file called ca.crt, and then go to your browser settings, find the certificates section, and install the certificate in the “authorities” section.

Selenium Wire will function without the certificate being installed, but installing it will ensure that you get a padlock icon in the address bar.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selenium-Wire Your Connection Is Not Secure - Stack Overflow
The website's certificate is, however, not invalid. When I go into the website on my normal browser, it works as it should. I...
Read more >
selenium-wire - PyPI
Certificates. Selenium Wire uses it's own root certificate to decrypt HTTPS traffic. It is not normally necessary for the browser to trust this...
Read more >
How to Handle SSL Certificate in Selenium WebDriver - Guru99
SSL (Secure Socket Layer) Certificate ensures secure transformation of data across the server ... setAssumeUntrustedCertificateIssuer(false).
Read more >
How to Handle SSL Certificate in Selenium WebDriver with ...
We pass the parameter as true, which means the invalid certificate will be trusted implicitly by the browser. WebDriver driver = new ...
Read more >
Insecure certificate - WebDriver - MDN Web Docs
Examples of invalid certificates include self-signed, revoked, and cryptographically insecure certificates. Web browsers prevent and block ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found