ssl.get_default_verify_paths()
python2.7 -c "import ssl; print(ssl.get_default_verify_paths())"DefaultVerifyPaths(cafile='/usr/local/openssl/cert.pem', capath='/usr/local/openssl/certs', openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/usr/local/openssl/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/usr/local/openssl/certs')
#Create environment variables pointing to trusted certificates hash directory.export SSL_CA_CERT_PATH=/etc/ssl/certs # See man fetch(3)export SSL_CERT_DIR=/etc/ssl/certs # See man SSL_CTX_load_verify_locations(3)export SSL_CERT_FILEx=/etc/ssl/certs/be4b640d.0export SSL_CERT_DIRx=/etc/ssl/certs
# Look for requests environment configuration and be compatible# with cURL.if verify is True or verify is None: verify = (os.environ.get('REQUESTS_CA_BUNDLE') or os.environ.get('CURL_CA_BUNDLE') or os.environ.get('SSL_CERT_FILEx') or os.environ.get('SSL_CERT_DIRx'))
I don't think the requests library supports a hash dir, but concatenating all certificates registered in OPNsense would probably be good enough.But to know if that would work, you should try to export the path in your shell and start the python script manually, if it works then (with a cert pack) we could probably work something out to properly fix this. If you really need a cert hash directory, you should investigate python-requests further. Changes to python-requests have to flow in via them, so if you need changes there, their github issue tracker is likely the way to go.