![]() Server : Apache/2.4.52 (Ubuntu) System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 User : www-data ( 33) PHP Version : 8.1.2-1ubuntu2.21 Disable Function : NONE Directory : /lib/python3/dist-packages/landscape/lib/__pycache__/ |
o ���c � @ sN d dl Z d dlZd dlZd dlmZ d dlmZ G dd� de�Zd dd �ZdS )� N)�glob)�getProcessOutputAndValuec @ s e Zd ZdZdS )�InvalidGPGSignaturez:Raised when the gpg signature for a given file is invalid.N)�__name__� __module__�__qualname__�__doc__� r r �3/usr/lib/python3/dist-packages/landscape/lib/gpg.pyr s r �/usr/bin/gpg�/etc/aptc s� �fdd�}� fdd�}t �� �ttjdd� ttd�|��td�|�� �D �� �}d d �ddf| d || f }t� |d�}|� |� |� |� |S )a� Verify the GPG signature of a file. @param filename: Path to the file to verify the signature against. @param signature: Path to signature to use. @param gpg: Optionally, path to the GPG binary to use. @param apt_dir: Optionally, path to apt trusted keyring. @return: a C{Deferred} resulting in C{True} if the signature is valid, C{False} otherwise. c s t �� � | S )N)�shutil�rmtree)�ignored)�gpg_homer r �remove_gpg_home s z#gpg_verify.<locals>.remove_gpg_homec s@ | \}}}|� d�|� d�}}|dkrtd� |||f ��d S )N�asciir z)%s failed (out='%s', err='%s', code='%d'))�decoder )�args�out�err�code)�gpgr r �check_gpg_exit_code s ��z'gpg_verify.<locals>.check_gpg_exit_codec S s g | ]}d |f�qS )z --keyringr )�.0�keyringr r r � <listcomp>'