Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/cryptography/x509/__pycache__/ocsp.cpython-39.pyc
Ðазад
a p�h�8 � @ s6 d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dlm Z m Z d dlmZm Z mZmZ G dd� dej�ZG d d � d ej�Ze je je je je jfZdd� ZG d d� dej�ZG dd� de�ZG dd� de jd�ZG dd� de jd�ZG dd� de�Z G dd� de�Z!e"ed�dd�Z#e"ed�dd�Z$dS )� N)�utils)�x509)�ocsp)�hashes� serialization)�PRIVATE_KEY_TYPES�_EARLIEST_UTC_TIME�_convert_to_naive_utc_time�_reject_duplicate_extensionc @ s e Zd ZdZdZdS )�OCSPResponderEncodingzBy HashzBy NameN)�__name__� __module__�__qualname__�HASH�NAME� r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/cryptography/x509/ocsp.pyr s r c @ s$ e Zd ZdZdZdZdZdZdZdS )�OCSPResponseStatusr � � � � � N) r r r � SUCCESSFULZMALFORMED_REQUEST�INTERNAL_ERRORZ TRY_LATERZSIG_REQUIRED�UNAUTHORIZEDr r r r r s r c C s t | t�std��d S )Nz9Algorithm must be SHA1, SHA224, SHA256, SHA384, or SHA512)� isinstance�_ALLOWED_HASHES� ValueError)� algorithmr r r �_verify_algorithm- s �r c @ s e Zd ZdZdZdZdS )�OCSPCertStatusr r r N)r r r ZGOOD�REVOKED�UNKNOWNr r r r r! 4 s r! c @ s e Zd Zdd� ZdS )�_SingleResponsec C s t |tj�rt |tj�s td��t|� t |tj�s<td��|d urXt |tj�sXtd��|| _|| _|| _|| _ || _ t |t�s�td��|tjur�|d ur�t d��|d ur�t d��nHt |tj�s�td��t|�}|tk r�t d��|d ur�t |tj�s�td ��|| _|| _|| _d S ) N�%cert and issuer must be a Certificatez%this_update must be a datetime objectz-next_update must be a datetime object or Nonez8cert_status must be an item from the OCSPCertStatus enumzBrevocation_time can only be provided if the certificate is revokedzDrevocation_reason can only be provided if the certificate is revokedz)revocation_time must be a datetime objectz7The revocation_time must be on or after 1950 January 1.zCrevocation_reason must be an item from the ReasonFlags enum or None)r r �Certificate� TypeErrorr �datetimeZ_certZ_issuer� _algorithmZ_this_updateZ_next_updater! r"