HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //usr/lib/python3.9/site-packages/ansible/galaxy/collection/__pycache__/gpg.cpython-39.pyc
a

�)g��@sXdZddlmZddlmZddlmZddlZddlZddl	Z	ddl
Z
ddlZddl
mZmZddlmZddlmZmZejr�dd	lmZe
jdd
�dkZeefdd
ier�dd
ini��Zd8dd�Zdd�Zdd�ZeGdd�de��Z eGdd�de ��Z!eGdd�de ��Z"eGdd�de ��Z#eGdd�de ��Z$eGdd �d e ��Z%eGd!d"�d"e ��Z&eGd#d$�d$e ��Z'eGd%d&�d&e ��Z(eGd'd(�d(e ��Z)eGd)d*�d*e ��Z*eGd+d,�d,e ��Z+eGd-d.�d.e ��Z,eGd/d0�d0e ��Z-eGd1d2�d2e ��Z.eGd3d4�d4e ��Z/eGd5d6�d6e ��Z0e!e"e#e$e%e&e'e(e)e*e+e,e-e.e/e0d7�Z1dS)9zSignature verification helpers.�)�AnsibleError)�
user_agent)�open_urlN)�	dataclass�fields)�partial)�	HTTPError�URLError)�Display�)��
�frozenT�slotsc
Cs�|dur|�d|���z>t|t�ddd��}|��}Wd�n1sJ0YWn>ttfy�}z"td|�d|���|�WYd}~n
d}~00|S)NzUsing signature at T�safe)Z
http_agentZvalidate_certsZfollow_redirectsz:Failed to get signature for collection verification from '�': )�vvvvrr�readrr	r)�source�displayZresp�	signature�e�r�A/usr/lib/python3.9/site-packages/ansible/galaxy/collection/gpg.py�get_signature_from_sources$�*��rc
Cs�t��\}}tj�|�}dd|��ddddd|��d|g	}d	�|�}|�d
|�d��z�z"tj|tjtjtj|fdd
�}	Wn@t	tj
fy�}
z"td|�d|
���|
�WYd}
~
nd}
~
00|	j|d�\}}Wt�
|�nt�
|�0|�r$t�t��t�|�Wd�n1�s0Yt�|��B}
|
��}|�d|�d|�d|	j�d��||	jfWd�S1�sx0YdS)NZgpgz--status-fd=z--verifyz--batchz--no-ttyz--no-default-keyringz
--keyring=�-� zRunning command '�'�utf8)�stdin�stdout�stderrZpass_fds�encodingz/Failed during GnuPG verification with command 'r)�inputz	stdout: 
z

stderr: 
z
(exit code �))�os�pipe�path�exists�joinr�
subprocess�Popen�PIPE�FileNotFoundErrorZSubprocessErrorrZcommunicate�close�
contextlib�suppress�OSError�remove�fdopenr�
returncode)Z
manifest_filerZkeyringrZstatus_fd_readZstatus_fd_writeZ
remove_keybox�cmdZcmd_str�p�errr r!�frrr�run_gpg_verify/sP�
�
��*�r9c	cs�|��D]�}|sqz|jdd�\}}}Wn&tyN|jdd�\}}d}Yn0zt|}WntyrYqYn0|g}|r�|�|�dtt|��d��||�VqdS)Nr)�maxsplit�)�
splitlines�split�
ValueError�
GPG_ERROR_MAP�KeyError�extend�len�	dc_fields)Z
status_out�lineZ_dummy�statusZ	remainder�clsrrrr�parse_gpg_errorsfs*

��rGcs8eZdZUeed<eed�dd��Z�fdd�Z�ZS)�GpgBaseErrorrE)�returncCsd�|j���S)z%Return the current class description.r)r)�__doc__r=)rFrrr�get_gpg_error_description�sz&GpgBaseError.get_gpg_error_descriptionc	s4t|�D]&}tt|��|j|�t||j���qdS)N)rC�superrH�__setattr__�name�type�getattr)�selfZfield��	__class__rr�
__post_init__�szGpgBaseError.__post_init__)	�__name__�
__module__�__qualname__�str�__annotations__�classmethodrKrT�
__classcell__rrrRrrH�s
rHc@s"eZdZUdZeed<eed<dS)�	GpgExpSigzCThe signature with the keyid is good, but the signature is expired.�keyid�usernameN�rUrVrWrJrXrYrrrrr\�s
r\c@s"eZdZUdZeed<eed<dS)�GpgExpKeySigzSThe signature with the keyid is good, but the signature was made by an expired key.r]r^Nr_rrrrr`�s
r`c@s"eZdZUdZeed<eed<dS)�GpgRevKeySigzRThe signature with the keyid is good, but the signature was made by a revoked key.r]r^Nr_rrrrra�s
rac@s"eZdZUdZeed<eed<dS)�	GpgBadSigz8The signature with the keyid has not been verified okay.r]r^Nr_rrrrrb�s
rbc@sJeZdZUdZeed<eed<eed<eed<eed<eed<eed<d	S)
�	GpgErrSigz�"It was not possible to check the signature.  This may be caused by
    a missing public key or an unsupported algorithm.  A RC of 4
    indicates unknown algorithm, a 9 indicates a missing public
    key.
    r]ZpkalgoZhashalgoZ	sig_class�time�rcZfprN�rUrVrWrJrXrY�intrrrrrc�s
rcc@seZdZUdZeed<dS)�GpgNoPubkeyz The public key is not available.r]Nr_rrrrrh�s
rhc@seZdZdZdS)�GpgMissingPassPhrasezNo passphrase was supplied.N�rUrVrWrJrrrrri�sric@seZdZUdZeed<dS)�GpgBadPassphrasez/The supplied passphrase was wrong or not given.r]Nr_rrrrrk�s
rkc@seZdZUdZeed<dS)�	GpgNoData�No data has been found.  Codes for WHAT are:
    - 1 :: No armored data.
    - 2 :: Expected a packet but did not find one.
    - 3 :: Invalid packet found, this may indicate a non OpenPGP
           message.
    - 4 :: Signature expected but not found.
    �whatNr_rrrrrl�s
rlc@seZdZUdZeed<dS)�
GpgUnexpectedrmrnNr_rrrrro�s
roc@s.eZdZUdZeed<eed<dZeed<dS)�GpgErrorz]This is a generic error status message, it might be followed by error location specific data.�location�code��moreN)rUrVrWrJrXrYrgrtrrrrrp�s
rpc@s"eZdZUdZeed<eed<dS)�
GpgFailurezJThis is the counterpart to SUCCESS and used to indicate a program failure.rqrrNrfrrrrru�s
ruc@seZdZdZdS)�GpgBadArmorzThe ASCII armor is corrupted.Nrjrrrrrv�srvc@seZdZUdZeed<dS)�
GpgKeyExpiredzThe key has expired.Z	timestampN)rUrVrWrJrgrYrrrrrw�s
rwc@seZdZdZdS)�
GpgKeyRevokedz+The used key has been revoked by its owner.Nrjrrrrrx�srxc@seZdZUdZeed<dS)�GpgNoSecKeyz The secret key is not available.r]Nr_rrrrrys
ry)ZEXPSIGZ	EXPKEYSIGZ	REVKEYSIGZBADSIGZERRSIGZ	NO_PUBKEYZMISSING_PASSPHRASEZBAD_PASSPHRASEZNODATAZ
UNEXPECTEDZERROR�FAILUREZBADARMORZ
KEYEXPIREDZ
KEYREVOKEDZ	NO_SECKEY)N)2rJZansible.errorsrZansible.galaxy.user_agentrZansible.module_utils.urlsrr/r%r*�sys�typing�tZdataclassesrrrC�	functoolsrZurllib.errorrr	�
TYPE_CHECKINGZansible.utils.displayr
�version_infoZ
IS_PY310_PLUSZfrozen_dataclassrr9rG�	ExceptionrHr\r`rarbrcrhrirkrlrorprurvrwrxryr?rrrr�<module>s� 
7
�