| Server IP : 195.114.193.97 / Your IP : 216.73.216.125 Web Server : LiteSpeed System : Linux host 5.15.0-126-generic #136-Ubuntu SMP Wed Nov 6 10:38:22 UTC 2024 x86_64 User : sembi4241 ( 1126) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/service_identity/__pycache__/ |
Upload File : |
o
��\q � @ s� d Z ddlmZmZmZ ddlZddlmZmZm Z m
Z
mZmZm
Z
ddlmZ ddlmZ ddlmZ dd lmZmZmZmZmZmZmZmZ dd
lmZ dgZdd� Z d
d� Z!ed�Z"dd� Z#dS )zL
`cryptography.x509 <https://github.com/pyca/cryptography>`_-specific code.
� )�absolute_import�division�print_functionN)�DNSName�ExtensionOID� IPAddress�NameOID�ObjectIdentifier� OtherName�UniformResourceIdentifier)�ExtensionNotFound)�decode)� IA5String� )�DNS_ID�CertificateError�
DNSPattern�IPAddress_ID�IPAddressPattern�
SRVPattern�
URIPattern�verify_service_identity)�SubjectAltNameWarning�verify_certificate_hostnamec C � t t| �t|�gg d� dS )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.
:param cryptography.x509.Certificate certificate: A cryptography X509
certificate object.
:param unicode hostname: The hostname that *certificate* should be valid
for.
:raises service_identity.VerificationError: If *certificate* is not valid
for *hostname*.
:raises service_identity.CertificateError: If *certificate* contains
invalid/unexpected data.
:returns: ``None``
��
cert_patterns�obligatory_ids�optional_idsN)r �extract_idsr )�certificate�hostname� r"