How to use the certifi.__file__ function in certifi

To help you get started, we’ve selected a few certifi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mk-fg / python-onedrive / onedrive / api_v5.py View on Github external
else:
					certifi_issue_url = 'https://github.com/certifi/python-certifi/issues/26'
					if hasattr(certifi, 'old_where'): cacert_pem = certifi.old_where()
					else:
						cacert_pem = join(dirname(requests.certs.__file__), 'cacert.pem')
						if not exists(cacert_pem):
							cacert_pem = None
							log.warn( 'Failed to find requests'
								' certificate bundle for woraround to %s', certifi_issue_url )
					if cacert_pem:
						self._requests_base_keywords = (self._requests_base_keywords or dict()).copy()
						self._requests_base_keywords.setdefault('verify', cacert_pem)
						log.debug( 'Adjusted "requests" default ca-bundle path, to work around %s '
							' [OpenSSL version %s, requests %s (>2.4.0) and certifi available at %r], to: %s',
							certifi_issue_url, ssl.OPENSSL_VERSION_INFO,
							requests_version, certifi.__file__, cacert_pem )

		self._requests_setup_done = True
		return session

certifi

Python package for providing Mozilla's CA Bundle.

MPL-2.0
Latest version published 11 days ago

Package Health Score

91 / 100
Full package analysis

Similar packages