| Server IP : 173.249.148.11 / Your IP : 216.73.216.179 Web Server : Apache/2.4.68 (AlmaLinux) System : Linux developmentwebsite.ca 4.18.0-553.168.1.el8_10.x86_64 #1 SMP Thu Sep 24 18:05:46 UTC 2026 x86_64 User : devinter ( 1006) PHP Version : 8.3.35 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /snap/certbot/5781/lib/python3.12/site-packages/certbot/_internal/__pycache__/ |
Upload File : |
�
�hXj�* �
� � d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlmZ ddl m
Z
dd l mZ dd
lm
Z
ddlmZ ddlmZ dd
lmZ ddlZddlmZ ddlmZ ddlmZ ej2 e� Z G d� d� Zdedeee ee f fd�Zdededede de!f
d�Z"dddddejF deddf
d�Z$dddejF deddfd �Z%y)!z*Tools for checking certificate revocation.� )�datetime)� timedelta)�timezoneN)�Optional)�x509)�InvalidSignature)�UnsupportedAlgorithm)�default_backend)�hashes)�
serialization)�ocsp)�crypto_util)�errors)�
RenewableCertc �: � e Zd ZdZdedefd�Zd
dedededefd�Z y )�RevocationCheckerzEThis class figures out OCSP checking on this system, and performs it.�cert�returnc �N � | j |j |j � S )a Get revoked status for a particular cert version.
.. todo:: Make this a non-blocking call
:param `.interfaces.RenewableCert` cert: Certificate object
:returns: True if revoked; False if valid or the check failed or cert is expired.
:rtype: bool
)�ocsp_revoked_by_paths� cert_path�
chain_path)�selfr s �R/root/parts/certbot/install/lib/python3.12/site-packages/certbot/_internal/ocsp.py�ocsp_revokedzRevocationChecker.ocsp_revoked s � � �)�)�$�.�.�$�/�/�J�J� r r �timeoutc � � t j t j � }t j
|� |k ryt
|� \ }}|r|syt ||||� S )aE Performs the OCSP revocation check
:param str cert_path: Certificate filepath
:param str chain_path: Certificate chain
:param int timeout: Timeout (in seconds) for the OCSP query
:returns: True if revoked; False if valid or the check failed or cert is expired.
:rtype: bool
F)r �nowr �utcr �notAfter�_determine_ocsp_server�_check_ocsp_cryptography)r r r r r �url�hosts r r z'RevocationChecker.ocsp_revoked_by_paths&