File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/gpg.cpython-310.pyc
Back
o ;j� � @ s$ d Z ddlZddlZddlZddlZddlZddlZddlZddl Zddl mZ e�e �ZdZddddd d ddd�Zd dddddd�Zdddddd d�Zdddddd�ZdZzddlZdZW n eyi dZY nw dd � Zd!d"� ZdQd#d$�Zd%d&� Zd'd(� ZdRd)d*�ZdSd+d,�ZdQd-d.�ZdRd/d0�Z dRd1d2�Z!dRd3d4�Z"e 5 6 7 8 dTd9d:��Z# dUd;d<�Z$dVd=d>�Z%dVd?d@�Z&edVdAdB��Z' dWdCdD�Z(edVdEdF��Z)dVdGdH�Z* dXdIdJ�Z+ dYdKdL�Z, dZdMdN�Z- d[dOdP�Z.dS )\ai Manage a GPG keychains, add keys, create keys, retrieve keys from keyservers. Sign, encrypt and sign plus encrypt text and files. .. versionadded:: 2015.5.0 .. note:: The ``python-gnupg`` library and ``gpg`` binary are required to be installed. Be aware that the alternate ``gnupg`` and ``pretty-bad-protocol`` libraries are not supported. � N)�SaltInvocationError�gpgZExpiredZUnknownzNot Trustedz Fully TrustedzMarginally TrustedzUltimately TrustedZRevoked)�e�q�n�f�m�u�r�-�1�2�3�4�5�6�Zexpired�unknownZnot_trustedZ marginallyZfullyZ ultimatelyZ Marginally)r r r r r r Z UndefinedZNeverZMarginalZFullyZUltimate)�0r r r r zkeys.openpgp.orgTFc C s t jj�d�S )z, Returns the path to the gpg binary r )�salt�utils�path�which� r r �D/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/gpg.py�_gpgO s r c C s t � sdS tr tS dS )z= Makes sure that python-gnupg and gpg are available. )FzIThe gpg execution module cannot be loaded: gpg binary is not in the path.)FzTThe gpg execution module cannot be loaded; the gnupg python module is not installed.)r �HAS_GPG_BINDINGS�__virtualname__r r r r �__virtual__W s ���r c C sF | st d d�} t d | �}|s!| dkrt� }|S td| � d���|S )z- Wrapper for user.info Salt function z config.option�userz user.infor zUser z does not exist)�__salt__�_get_user_infor )r �userinfor r r r! l s �r! c C s<