| Server IP : 173.209.174.21 / Your IP : 216.73.216.79 Web Server : Apache/2.4.58 (Ubuntu) System : Linux wcfs-server 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : nodor ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/service_identity/__pycache__/ |
Upload File : |
�
�;�h � �� � 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"