| Server IP : 85.143.209.190 / Your IP : 216.73.217.12 Web Server : Apache/2.4.63 (Ubuntu) System : Linux 49083.simplecloud.ru 5.4.0-205-generic #225-Ubuntu SMP Fri Jan 10 22:23:35 UTC 2025 x86_64 User : vozdvizhenka37 ( 1083) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /snap/certbot/5893/lib64/python3.12/site-packages/pip/_vendor/truststore/ |
Upload File : |
"""Verify certificates using native system trust stores"""
import sys as _sys
if _sys.version_info < (3, 10):
raise ImportError("truststore requires Python 3.10 or later")
# Detect Python runtimes which don't implement SSLObject.get_unverified_chain() API
# This API only became public in Python 3.13 but was available in CPython and PyPy since 3.10.
if _sys.version_info < (3, 13) and _sys.implementation.name not in ("cpython", "pypy"):
try:
import ssl as _ssl
except ImportError:
raise ImportError("truststore requires the 'ssl' module")
else:
_sslmem = _ssl.MemoryBIO()
_sslobj = _ssl.create_default_context().wrap_bio(
_sslmem,
_sslmem,
)
try:
while not hasattr(_sslobj, "get_unverified_chain"):
_sslobj = _sslobj._sslobj # type: ignore[attr-defined]
except AttributeError:
raise ImportError(
"truststore requires peer certificate chain APIs to be available"
) from None
del _ssl, _sslobj, _sslmem # noqa: F821
from ._api import SSLContext, extract_from_ssl, inject_into_ssl # noqa: E402
del _api, _sys # type: ignore[name-defined] # noqa: F821
__all__ = ["SSLContext", "inject_into_ssl", "extract_from_ssl"]
__version__ = "0.10.4"