⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.8
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
opt
/
nydus
/
ops
/
oscrypto
/
__pycache__
/
View File Name :
__init__.cpython-39.pyc
a ������Ih&����������������������@���s����d�dl�mZmZmZmZ�d�dlZd�dlZd�dlZd�dlZddl m Z mZ�ddlm Z �ddlmZmZ�g�d�Ze���Zdddd�Zd d ��Zdd��Zdd d�Zdd��Zdd��Zdd��Zdd��ZdS�)�����)�unicode_literals�division�absolute_import�print_functionN����)�str_cls� type_name)�LibraryNotFoundError)�__version__�__version_info__)r ���r����backend�ffi� load_order� use_ctypes�use_openssl� use_winlegacy)r����backend_configr ���c�������������������C���s����t�d�durt�d�S�t���t�d�dur<t�d�W��d����S�tjdkrjt���d�dk�r`dt�d<�q�dt�d<�ntjdkr~d t�d<�nd t�d<�t�d�W��d����S�1�s�0����Y��dS�)zs :return: A unicode string of the backend being used: "openssl", "mac", "win", "winlegacy" r���N�win32r�������� winlegacy�win�darwin�mac�openssl)�_module_values� _backend_lock�sys�platform�getwindowsversion��r���r����B/opt/nydus/tmp/pip-target-os3qdbx0/lib/python/oscrypto/__init__.pyr���"���s���� r���c�������������������C���s|���t���dkri�S�td�dur"td�S�t�B�td�durJtd�W��d����S�i�td<�td�W��d����S�1�sn0����Y��dS�)z� :return: A dict of config info for the backend. Only currently used by "openssl", it may contains zero or more of the following keys: - "libcrypto_path" - "libssl_path" r���r���N)r���r���r���r���r���r���r ����_backend_config>���s���� r!���c�����������������C���s ��t�|�t�stdt|�����t�|t�s4tdt|����tj�|��sLtd|����tj�|�sdtd|���|dur�t�|t�s�tdt|����tj�|�s�td|���t �h�|�||d�}t d �d kr�t d�|kr�W�d����dS�t d �dur�td��d t d <�|t d<�W�d����n1��s0����Y��dS�) a��� Forces using OpenSSL dynamic libraries on OS X (.dylib) or Windows (.dll), or using a specific dynamic library on Linux/BSD (.so). This can also be used to configure oscrypto to use LibreSSL dynamic libraries. This method must be called before any oscrypto submodules are imported. :param libcrypto_path: A unicode string of the file path to the OpenSSL/LibreSSL libcrypto dynamic library. :param libssl_path: A unicode string of the file path to the OpenSSL/LibreSSL libssl dynamic library. :param trust_list_path: An optional unicode string of the path to a file containing OpenSSL-compatible CA certificates in PEM format. If this is not provided and the platform is OS X or Windows, the system trust roots will be exported from the OS and used for all TLS connections. :raises: ValueError - when one of the paths is not a unicode string OSError - when the trust_list_path does not exist on the filesystem oscrypto.errors.LibraryNotFoundError - when one of the path does not exist on the filesystem RuntimeError - when this function is called after another part of oscrypto has been imported z/libcrypto_path must be a unicode string, not %sz,libssl_path must be a unicode string, not %szlibcrypto does not exist at %szlibssl does not exist at %sNz0trust_list_path must be a unicode string, not %sz$trust_list_path does not exist at %s)�libcrypto_path�libssl_path�trust_list_pathr���r���r���zRAnother part of oscrypto has already been imported, unable to force use of OpenSSL)� isinstancer���� ValueErrorr����os�path�existsr ����OSErrorr���r����RuntimeError)r"���r#���r$���Z new_configr���r���r ���r���U���s0���� �r���c������������������C���s����t�jdkr0t���pt�j}�|�dkr$d}�td|����t�H�td�dkrRW�d����dS�td�durftd��dtd<�W�d����n1�s�0����Y��dS�) as�� Forces use of the legacy Windows CryptoAPI. This should only be used on Windows XP or for testing. It is less full-featured than the Cryptography Next Generation (CNG) API, and as a result the elliptic curve and PSS padding features are implemented in pure Python. This isn't ideal, but it a shim for end-user client code. No one is going to run a server on Windows XP anyway, right?! :raises: EnvironmentError - when this function is called on an operating system other than Windows RuntimeError - when this function is called after another part of oscrypto has been imported r����DarwinzOS Xz9The winlegacy backend can only be used on Windows, not %sr���r���NzcAnother part of oscrypto has already been imported, unable to force use of Windows legacy CryptoAPI)r���r����system�EnvironmentErrorr���r���r+���)�platr���r���r ���r�������s���� �r���c�������������������C���s`���t��H�td�dkr"W�d����dS�td�dur6td��dtd<�W�d����n1�sR0����Y��dS�)z� Forces use of ctypes instead of cffi for the FFI layer :raises: RuntimeError - when this function is called after another part of oscrypto has been imported r ����ctypesNr���zQAnother part of oscrypto has already been imported, unable to force use of ctypes)r���r���r+���r���r���r���r ���r�������s�����r���c��������������� ���C���st���t�d�durt�d�S�t�H�zddl}�dt�d<�W�n�tyH���dt�d<�Y�n0�t�d�W��d����S�1�sf0����Y��dS�)zh Returns the FFI module being used :return: A unicode string of "cffi" or "ctypes" r ���Nr����cffir0���)r���r���r1����ImportError)r1���r���r���r ���r �������s����r ���c�������������������C���s���g�d�S�)a)�� Returns a list of the module and sub-module names for oscrypto in dependency load order, for the sake of live reloading code :return: A list of unicode strings of module names, as they would appear in sys.modules, ordered by which module should be reloaded first )Ezoscrypto._asn1zoscrypto._cipher_suiteszoscrypto._errorsz oscrypto._intzoscrypto._typeszoscrypto.errorszoscrypto.versionZoscryptoz oscrypto._ffizoscrypto._pkcs12zoscrypto._pkcs5zoscrypto._randz oscrypto._tlszoscrypto._linux_bsd.trust_listz!oscrypto._mac._common_crypto_cffiz#oscrypto._mac._common_crypto_ctypeszoscrypto._mac._common_cryptoz#oscrypto._mac._core_foundation_cffiz%oscrypto._mac._core_foundation_ctypeszoscrypto._mac._core_foundationzoscrypto._mac._security_cffizoscrypto._mac._security_ctypeszoscrypto._mac._securityzoscrypto._mac.trust_listzoscrypto._mac.utilz!oscrypto._openssl._libcrypto_cffiz#oscrypto._openssl._libcrypto_ctypeszoscrypto._openssl._libcryptozoscrypto._openssl._libssl_cffiz oscrypto._openssl._libssl_ctypeszoscrypto._openssl._libsslzoscrypto._openssl.utilzoscrypto._win._cng_cffizoscrypto._win._cng_ctypeszoscrypto._win._cngzoscrypto._win._decodezoscrypto._win._advapi32_cffizoscrypto._win._advapi32_ctypeszoscrypto._win._advapi32zoscrypto._win._kernel32_cffizoscrypto._win._kernel32_ctypeszoscrypto._win._kernel32zoscrypto._win._secur32_cffizoscrypto._win._secur32_ctypeszoscrypto._win._secur32zoscrypto._win._crypt32_cffizoscrypto._win._crypt32_ctypeszoscrypto._win._crypt32zoscrypto._win.trust_listzoscrypto._win.utilzoscrypto.trust_listz oscrypto.utilzoscrypto.kdfzoscrypto._mac.symmetriczoscrypto._openssl.symmetriczoscrypto._win.symmetriczoscrypto.symmetriczoscrypto._asymmetriczoscrypto._ecdsazoscrypto._pkcs1zoscrypto._mac.asymmetriczoscrypto._openssl.asymmetriczoscrypto._win.asymmetriczoscrypto.asymmetricz oscrypto.keyszoscrypto._mac.tlszoscrypto._openssl.tlszoscrypto._win.tlszoscrypto.tlsr���r���r���r���r ���r�������s���� r���)N)� __future__r���r���r���r���r'���r���r���� threading�_typesr���r����errorsr ����versionr ���r����__all__�Lockr���r���r���r!���r���r���r���r ���r���r���r���r���r ����<module>���s(���� B