scrapy / scrapy

Scrapy, a fast high-level web crawling & scraping framework for Python.
https://scrapy.org
BSD 3-Clause "New" or "Revised" License
51.16k stars 10.35k forks source link

fix: Proxy tests don't use custom certificate authority #6259

Closed Laerte closed 2 months ago

Laerte commented 2 months ago

Fix #6258

This works but we need to update our certificate CA since is expired:

➜  scrapy git:(master) openssl x509 -noout -in tests/keys/mitmproxy-ca.pem -dates
notBefore=Aug 12 17:03:26 2020 GMT
notAfter=Aug 14 17:03:26 2023 GMT

Output from the command with current expired certificate:

[06:45:39.410] The mitmproxy certificate authority has expired!
Please delete all CA-related files in your ~/.mitmproxy folder.
The CA will be regenerated automatically after restarting mitmproxy.
See https://docs.mitmproxy.org/stable/concepts-certificates/ for additional help.
[06:45:39.413] HTTP(S) proxy listening at 127.0.0.1:48185.
[06:45:39.460] The mitmproxy certificate authority has expired!
Please delete all CA-related files in your ~/.mitmproxy folder.
The CA will be regenerated automatically after restarting mitmproxy.
See https://docs.mitmproxy.org/stable/concepts-certificates/ for additional help.

@wRAR Can you please update the certificate CA file? Locally I replaced the current one with the generated by mitmproxy and worked.

codecov[bot] commented 2 months ago

Codecov Report

Merging #6259 (1311e7d) into master (198f5cf) will not change coverage. Report is 3 commits behind head on master. The diff coverage is n/a.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6259 +/- ## ======================================= Coverage 88.89% 88.89% ======================================= Files 161 161 Lines 11776 11776 Branches 1913 1913 ======================================= Hits 10468 10468 Misses 964 964 Partials 344 344 ```
wRAR commented 2 months ago

Yeah, tests failing with this show that the cert is now actually used :)