HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //lib/python2.7/dist-packages/apt/auth.pyc
�
&��cc@s�dZddlmZyddlmZWnek
r=nXddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddl
mZejjdkr�eZny,ddlmZmZmZeeeWnek
rnXdefd	��YZd
efd��YZdefd
��YZd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%e&dkr�d�d�e
j'�xe%�D]Z(e)e(�q�WndS(s4Handle GnuPG keys used to trust signed repositories.i����(tprint_function(tOptionalN(tgettexti(tListtTupletUniontAptKeyErrorcBseZRS((t__name__t
__module__(((s,/usr/lib/python2.7/dist-packages/apt/auth.pyR:stAptKeyIDTooShortErrorcBseZdZRS(s!Internal class do not rely on it.(RRt__doc__(((s,/usr/lib/python2.7/dist-packages/apt/auth.pyR	>st
TrustedKeycBs eZdZd�Zd�ZRS(sRepresents a trusted key.cCs.||_t|�|_||_||_dS(N(traw_namet_tnametkeyidtdate(tselfRRR((s,/usr/lib/python2.7/dist-packages/apt/auth.pyt__init__Fs		cCsd|j|j|jfS(Ns%s
%s %s(RRR(R((s,/usr/lib/python2.7/dist-packages/apt/auth.pyt__str__Ns(RRR
RR(((s,/usr/lib/python2.7/dist-packages/apt/auth.pyRBs	c	Os�d}tjjdd�g}|j|�tjj�}d|d<d|d<zTtjjd�dkr�t	j
d	d
dd�}|jtjj�j
d
��|j�|j|d<ntj|d|dtdtjdtjdtj�}|jdd�}tjjdkr5t|t�r5|j
d�}n|j|�\}}|jr~td|jdj|�||f��n|r�tjj|�n|j�SWd|dk	r�|j �nXdS(s0Run the apt-key script with the given arguments.sDir::Bin::Apt-Keys/usr/bin/apt-keytCtLANGt1t$APT_KEY_DONT_WARN_ON_DANGEROUS_USAGEtDirt/tprefixsapt-keytsuffixs.confsUTF-8t
APT_CONFIGtenvtuniversal_newlineststdintstdouttstderrisutf-8sGThe apt-key script failed with return code %s:
%s
stdout: %s
stderr: %st N(!tNonetapt_pkgtconfigt	find_filetextendtostenvirontcopytfind_dirttempfiletNamedTemporaryFiletwritetdumptencodetflushRt
subprocesstPopentTruetPIPEtgettsystversion_infotmajort
isinstancetunicodetcommunicatet
returncodeRtjoinR!tstriptclose(	targstkwargstconftcmdRtprocRtoutputR!((s,/usr/lib/python2.7/dist-packages/apt/auth.pyt_call_apt_key_scriptSs<


	
		!	%cCs^tjj|�s%td|��ntj|tj�sMtd|��ntd|�dS(s�Import a GnuPG key file to trust repositores signed by it.

    Keyword arguments:
    filename -- the absolute path to the public GnuPG key file
    s An absolute path is required: %ssKey file cannot be accessed: %staddN(R(tpathtabspathRtaccesstR_OKRG(tfilename((s,/usr/lib/python2.7/dist-packages/apt/auth.pytadd_key_from_file�s
cCs_tj�}z/yt|||�Wntk
r9�nXWdd�}tj|d|�XdS(s�Import a GnuPG key file to trust repositores signed by it.

    Keyword arguments:
    keyid -- the long keyid (fingerprint) of the key, e.g.
             A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553
    keyserver -- the URL or hostname of the key server
    NcSs4t|dt�r-|djtjkr-dS�dS(Ni(R:tOSErrorterrnotENOENT(tfuncRItexc_info((s,/usr/lib/python2.7/dist-packages/apt/auth.pytonerror�sRT(R,tmkdtempt_add_key_from_keyservert	Exceptiontshutiltrmtree(Rt	keyserverttmp_keyring_dirRT((s,/usr/lib/python2.7/dist-packages/apt/auth.pytadd_key_from_keyserver�s	
	c
Cs�t|jdd�jdd��ddkr=td��ntjj|d�}tjj|d�}d	d
dd|g}tj|d
|d|d|d|g�}|dkr�td||f��ntjj|d�}tj|d|d|d|g�}|dkr$td|��ntj	|d|ddddgdtj
dt�j�d}d}	x:|j�D],}
|
jd�ru|
jd�d}	PququW|jdd�j�}|	|kr�td||f��nt|�dS( NR"tt0xi�is,Only fingerprints (v4, 160bit) are supportedssecring.gpgspubring.gpgtgpgs--no-default-keyrings--no-optionss	--homedirs--secret-keyrings	--keyrings--keyservers--recvisrecv from '%s' failed for '%s'sexport-keyring.gpgs--outputs--exportsexport of '%s' faileds
--fingerprints--batchs--fixed-list-modes
--with-colonsR Rsfpr:t:i	(tlentreplaceR	R(RIR>R2tcallRR3R5R4R<R#t
splitlinest
startswithtsplittupperRN(RRZR[ttmp_secret_keyringttmp_keyringtgpg_default_optionstresttmp_export_keyringRFtgot_fingerprinttlinetsigning_key_fingerprint((s,/usr/lib/python2.7/dist-packages/apt/auth.pyRV�sV.			
	cCs tdddddd|�dS(s�Import a GnuPG key to trust repositores signed by it.

    Keyword arguments:
    content -- the content of the GnuPG public key
    tadvs--quiets--batchs--importt-RN(RG(tcontent((s,/usr/lib/python2.7/dist-packages/apt/auth.pytadd_key�scCstd|�dS(s�Remove a GnuPG key to no longer trust repositores signed by it.

    Keyword arguments:
    fingerprint -- the fingerprint identifying the key
    trmN(RG(tfingerprint((s,/usr/lib/python2.7/dist-packages/apt/auth.pyt
remove_key�scCs
td|�S(sxReturn the GnuPG key in text format.

    Keyword arguments:
    fingerprint -- the fingerprint identifying the key
    texport(RG(Ru((s,/usr/lib/python2.7/dist-packages/apt/auth.pyt
export_key	scCs
td�S(sUpdate the local keyring with the archive keyring and remove from
    the local keyring the archive keys which are no longer valid. The
    archive keyring is shipped in the archive-keyring package of your
    distribution, e.g. the debian-archive-keyring package in Debian.
    tupdate(RG(((s,/usr/lib/python2.7/dist-packages/apt/auth.pyRyscCs
td�S(syWork similar to the update command above, but get the archive
    keyring from an URI instead and validate it against a master key.
    This requires an installed wget(1) and an APT build configured to
    have a server to fetch from and a master keyring to validate. APT
    in Debian does not support this command and relies on update
    instead, but Ubuntu's APT does.
    s
net-update(RG(((s,/usr/lib/python2.7/dist-packages/apt/auth.pyt
net_updates	cCs�tddddd�}g}x�|jd�D]x}|jd�}|dd	kr`|d
}n|ddkr.|d}|d
}t|||�}|j|�q.q.W|S(saReturns a list of TrustedKey instances for each key which is
    used to trust repositories.
    Rps
--with-colonss--batchs--fixed-list-modes--list-keyss
R`itpubituidi	i(RGRfRtappend(RFRkRntfieldsRR|t
creation_datetkey((s,/usr/lib/python2.7/dist-packages/apt/auth.pyt	list_keys)s


t__main__cCs
td�S(Ns;Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>(R
(((s,/usr/lib/python2.7/dist-packages/apt/auth.pyt<lambda>BR]cCs
td�S(Ns:Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>(R
(((s,/usr/lib/python2.7/dist-packages/apt/auth.pyR�CR](*R
t
__future__RttypingRtImportErrorRPR(tos.pathRXR2R7R,R$RR
R8R9tstrR;RRRRWRR	tobjectRRGRNR\RVRsRvRxRyRzR�Rtinitttrusted_keytprint(((s,/usr/lib/python2.7/dist-packages/apt/auth.pyt<module>sT
	
	0			H