| Server IP : 138.197.176.125 / Your IP : 216.73.217.55 Web Server : Apache/2.4.41 (Ubuntu) System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/service_identity/__pycache__/ |
Upload File : |
U
��\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 s 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``
�Z
cert_patternsZobligatory_idsZoptional_idsN)r �extract_idsr )�certificateZhostname� r �?/usr/lib/python3/dist-packages/service_identity/cryptography.pyr &