| Server IP : 43.129.54.214 / Your IP : 216.73.217.113 Web Server : nginx/1.24.0 System : Linux VM-4-108-ubuntu 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/service_identity/__pycache__/ |
Upload File : |
�
*�'f � �� � d Z ddlmZ ddlZddlmZ ddlmZmZm Z m
Z
mZmZm
Z
ddlmZ ddlmZ ddlmZ d d
lmZ d dlmZmZmZmZmZmZmZmZ dgZ dd
�Z dd�Z! ed� Z"dd�Z#dd�Z$y)zL
`cryptography.x509 <https://github.com/pyca/cryptography>`_-specific code.
� )�annotationsN)�Sequence)�Certificate�DNSName�ExtensionOID� IPAddress�ObjectIdentifier� OtherName�UniformResourceIdentifier)�ExtensionNotFound)�decode)� IA5String� )�CertificateError)�DNS_ID�CertificatePattern�
DNSPattern�IPAddress_ID�IPAddressPattern�
SRVPattern�
URIPattern�verify_service_identity�verify_certificate_hostnamec �F � t t | � t |� gg �� y)a�
Verify whether *certificate* is valid for *hostname*.
.. note::
Nothing is verified about the *authority* of the certificate;
the caller must verify that the certificate chains to an appropriate
trust root themselves.
Args:
certificate: A *cryptography* X509 certificate object.
hostname: The hostname that *certificate* should be valid for.
Raises:
service_identity.VerificationError:
If *certificate* is not valid for *hostname*.
service_identity.CertificateError:
If *certificate* contains invalid / unexpected data. This includes
the case where the certificate contains no `subjectAltName`\ s.
.. versionchanged:: 24.1.0
:exc:`~service_identity.CertificateError` is raised if the certificate
contains no ``subjectAltName``\ s instead of
:exc:`~service_identity.VerificationError`.
��
cert_patterns�obligatory_ids�optional_idsN)r �extract_patternsr )�certificate�hostnames �?/usr/lib/python3/dist-packages/service_identity/cryptography.pyr r ( s"