????

Your IP : 216.73.216.152


Current Path : /proc/self/root/proc/self/root/lib/python2.7/site-packages/wheel/signatures/
Upload File :
Current File : //proc/self/root/proc/self/root/lib/python2.7/site-packages/wheel/signatures/keys.pyc

�
��]c@sTdZddlZddlZddlmZmZmZdefd��YZ	dS(sStore and retrieve wheel signing / verifying keys.

Given a scope (a package name, + meaning "all packages", or - meaning 
"no packages"), return a list of verifying keys that are trusted for that 
scope.

Given a package name, return a list of (scope, key) suggested keys to sign
that package (only the verifying keys; the private signing key is stored
elsewhere).

Keys here are represented as urlsafe_b64encoded strings with no padding.

Tentative command line interface:

# list trusts
wheel trust
# trust a particular key for all
wheel trust + key
# trust key for beaglevote
wheel trust beaglevote key
# stop trusting a key for all
wheel untrust + key

# generate a key pair
wheel keygen

# import a signing key from a file
wheel import keyfile

# export a signing key
wheel export key
i����N(tnativetload_config_pathstsave_config_patht	WheelKeyscBs_eZdZdZd�Zd�Zd�Zd�Zd�Zd
d�Z
d�Zd	�ZRS(is
wheel.jsoncCsigd6gd6|_dS(Ntsignerst	verifiers(tdata(tself((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pyt__init__*sc	Csx�td�D]�}tjjt|�|j�}tjj|�r
t|d���}tj	|�|_
x-dD]%}||j
krng|j
|<qnqnWd|j
kr�|j|j
d<n;|j
d|jkr�tdj
|j
d|j���nWdQXPq
q
W|S(NtwheeltrRRtschemas(Bad wheel.json version {0}, expected {1}(ssignerss	verifiers(RtostpathtjoinRtCONFIG_NAMEtexiststopentjsontloadRtSCHEMAt
ValueErrortformat(RR
tconftinfiletx((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pyR-s 
"c	Cs_td�}tjjt|�|j�}t|d�� }tj|j	|dd�WdQX|S(NR	sw+tindenti(
RRR
RRRRRtdumpR(RR
Rtout((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pytsave@s
cCs&|jdji|d6|d6�|S(s0Start trusting a particular key for given scope.Rtscopetvk(Rtappend(RRR((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pyttrustHs"cCs&|jdji|d6|d6�|S(s/Stop trusting a particular key for given scope.RRR(Rtremove(RRR((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pytuntrustMs"cCseg|jdD]0}|d|dfkr|d|df^q}|jdd��|j�|S(s;Return list of [(scope, trusted key), ...] for given scope.RRt+RtkeycSs|dS(Ni((R((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pyt<lambda>Us(Rtsorttreverse(RRRR!((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pyttrustedRsD
cCseg|jdD]0}|d|dfkr|d|df^q}|jdd��|j�|S(sReturn list of signing key(s).RRR$RR%cSs|dS(Ni((R((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pyR&\s(RR'R((RRRtsign((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pyRYsD
cCs&|jdji|d6|d6�dS(s>Remember verifying key vk as being valid for signing in scope.RRRN(RR (RRR((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pyt
add_signer`sN(
t__name__t
__module__RRRRRR!R#tNoneR)RR+(((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pyR&s						(
t__doc__Rtos.pathRt
wheel.utilRRRtobjectR(((s4/tmp/pip-build-tmgNo5/wheel/wheel/signatures/keys.pyt<module> s