Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/service_identity/__pycache__/cryptography.cpython-39.pyc
Ðазад
a s�h� � @ s� d Z ddlmZ ddlZddlmZ ddlmZmZm Z m Z mZmZm Z ddlmZ ddlmZ ddlmZ d d lmZ d dlmZmZmZmZmZmZmZmZ dgZd ddd�dd�Z d ddd�dd�Z!ed�Z"d dd�dd�Z#d dd�dd�Z$dS )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_hostnamer �str�None)�certificate�hostname�returnc C s t t| �t|�gg d� dS )an 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 certificate: A *cryptography* X509 certificate object. :param 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_patternsr )r r � r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/service_identity/cryptography.pyr ( s �)r � ip_addressr c C s t t| �t|�gg d� dS )a� Verify whether *certificate* is valid for *ip_address*. .. 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 certificate: A *cryptography* X509 certificate object. :param ip_address: The IP address that *connection* should be valid for. Can be an IPv4 or IPv6 address. :raises service_identity.VerificationError: If *certificate* is not valid for *ip_address*. :raises service_identity.CertificateError: If *certificate* contains invalid / unexpected data. :returns: ``None`` .. versionadded:: 18.1.0 r N)r r r )r r"