Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/cryptography/hazmat/bindings/openssl/__pycache__/ |
Upload File : |
o g�e � @ s� d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ d dlm Z m Z d dlmZ e � dg d��ZG dd � d e�Zd d� Zdd � Zdd� Zddd�Zdd� ZG dd� de�Zdd� Zeej� e�� dS )� N)�utils)� InternalError)�ffi�lib)�CONDITIONAL_NAMES�_OpenSSLErrorWithText)�coder �reason�reason_textc @ s: e Zd Zdd� Zdd� Ze�d�Ze�d�Ze�d�Z dS ) � _OpenSSLErrorc C s || _ || _|| _d S �N)�_code�_lib�_reason)�selfr r r � r �N/usr/lib/python3/dist-packages/cryptography/hazmat/bindings/openssl/binding.py�__init__ s z_OpenSSLError.__init__c C s || j ko || jkS r )r r )r r r r r r �_lib_reason_match s z_OpenSSLError._lib_reason_matchr r r N) �__name__� __module__�__qualname__r r r �read_only_propertyr r r r r r r r s r c C sD g } | � � }|dkr |S | �|�}| �|�}|�t|||�� q)NTr )� ERR_get_error�ERR_GET_LIB�ERR_GET_REASON�appendr )r �errorsr �err_lib� err_reasonr r r �_consume_errors$ s � �r c C sV g }| D ]$}t �dd�}t�|j|t|�� t �|�}|�t|j|j|j |�� q|S )Nzchar[]� ) r �newr �ERR_error_string_nr �len�stringr r r )r �errors_with_text�err�buf�err_text_reasonr r r �_errors_with_text3 s ��r* c C s t t| ��S r )r* r )r r r r �_consume_errors_with_textC � r+ c C s0 |s|d u r t | �}t|�}td�|�|��d S )Nai Unknown OpenSSL error. This error is commonly encountered when another library is not cleaning up the OpenSSL error stack. If you are using cryptography with another library that uses OpenSSL try disabling it before reporting a bug. Otherwise please file an issue at https://github.com/pyca/cryptography/issues with information on how to reproduce this. ({0!r}))r r* r �format)r �okr r&