biglocalnews / warn-scraper

Command-line interface for downloading WARN Act notices of qualified plant closings and mass layoffs from state government websites
https://warn-scraper.readthedocs.io
Apache License 2.0
29 stars 10 forks source link

AZ SSL authentication problem #538

Closed stucka closed 1 year ago

stucka commented 1 year ago

Arizona installed a new SSL certificate on Aug. 11, and Arizona's scraper started throwing certificate errors on ... Aug. 11.

Maybe this gets itself cleaned up, we need to look for better certificate upgrades like certifi, or we just force Arizona's scraper to use verify = False in the short or long term.

stucka commented 1 year ago

Trying to use the more-up-to-date certifi fails. Looks like it's Arizona's fault.

openssl s_client -connect www.azjobconnection.gov:443 CONNECTED(000001A0) depth=0 C = US, ST = Arizona, L = Phoenix, O = Arizona Department of Economic Security, CN = azjobconnection.gov verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 C = US, ST = Arizona, L = Phoenix, O = Arizona Department of Economic Security, CN = azjobconnection.gov verify error:num=21:unable to verify the first certificate verify return:1 depth=0 C = US, ST = Arizona, L = Phoenix, O = Arizona Department of Economic Security, CN = azjobconnection.gov verify return:1

Certificate chain 0 s:C = US, ST = Arizona, L = Phoenix, O = Arizona Department of Economic Security, CN = azjobconnection.gov i:C = US, O = DigiCert Inc, CN = DigiCert Global G2 TLS RSA SHA256 2020 CA1 1 s:C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert SHA2 High Assurance Server CA i:C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert High Assurance EV Root CA ...

SSL handshake has read 3519 bytes and written 475 bytes Verification error: unable to verify the first certificate

stucka commented 1 year ago

Workaround built: https://github.com/biglocalnews/warn-scraper/compare/1.2.36...1.2.37

Have messaged Arizona to let them know of certificate problem. If they get it fixed, the verify=False line in az.py can get removed, or set to true.

stucka commented 1 year ago

Closing with https://github.com/biglocalnews/warn-scraper/commit/c3a7a57101a2148f131da22b4e2c8831dc834ee5