MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _load_certifi

Method _load_certifi

pymongo/pyopenssl_context.py:326–336  ·  view source on GitHub ↗

Attempt to load CA certs from certifi.

(self)

Source from the content-addressed store, hash-verified

324 self._ctx.load_verify_locations(cafile, capath)
325
326 def _load_certifi(self) -> None:
327 """Attempt to load CA certs from certifi."""
328 if _HAVE_CERTIFI:
329 self.load_verify_locations(certifi.where())
330 else:
331 raise _ConfigurationError(
332 "tlsAllowInvalidCertificates is False but no system "
333 "CA certificates could be loaded. Please install the "
334 "certifi package, or provide a path to a CA file using "
335 "the tlsCAFile option"
336 )
337
338 def _load_wincerts(self, store: str) -> None:
339 """Attempt to load CA certs from Windows trust store."""

Callers 1

load_default_certsMethod · 0.95

Calls 2

load_verify_locationsMethod · 0.95
whereMethod · 0.45

Tested by

no test coverage detected