Skip to content

Instantly share code, notes, and snippets.

View maxschae4's full-sized avatar

Max Schaefer maxschae4

  • Santa Cruz, CA
  • 08:59 (UTC -07:00)
View GitHub Profile
@maxschae4
maxschae4 / generate_requests_ca_bundle.py
Created October 11, 2018 22:31
Add internal CA certs to requests bundle
from os import environ, path
from glob import glob
import certifi
# Even if we have trusted certs in our system ca certificates, requests uses it's own
# Mine happen to live in /usr/local/share/ca-certificates
# DON'T update the existing bundle becuase updating requests will overwrite it
cert_dir = "/usr/local/share/ca-certificates"
pwd = path.abspath(path.dirname(__file__))