%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/service_identity/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/service_identity/__pycache__/cryptography.cpython-312.pyc |
� զe � �� � 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"