-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/sslutil.pyc

ó
Ì\,Tc@sèddlZddlmZddlmZy@ddlZejZejZejZeej	dd„ZWnMek
r»dZdZdZddl
Z
ddlZeedd„ZnXd„Zd	„Zd
efd„ƒYZdS(iÿÿÿÿN(tutil(t_c
CsOtj|||d|d|d|ƒ}|jƒsKtjtdƒƒ‚n|S(Nt	cert_reqstca_certstssl_versionsssl connection failed(tssltwrap_sockettcipherRtAbortR(tsocktkeyfiletcertfileRRRt	sslsocket((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pytssl_wrap_sockets	iicCsmtjtdƒs*tjtdƒƒ‚n|rHtjtdƒƒ‚ntj|||ƒ}tj||ƒS(NRsPython SSL support not founds(certificate checking requires Python 2.6(RtsafehasattrtsocketRRRthttplibt
FakeSocket(R	R
RRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyR
%s	c
sJ|stdƒS|jƒ‰‡fd†}|jdgƒ}|rµg|D]$\}}|dkrJ|jƒ^qJ}x|D]}||ƒr{d
Sq{W|rµtdƒdj|ƒSnxˆ|jdgƒD]t}|d\}}|d	krÈy|jƒjd
ƒ}	Wntk
rtdƒSX||	ƒr.d
Stdƒ|	SqÈWtdƒS(s«Verify that cert (in socket.getpeercert() format) matches hostname.
    CRLs is not handled.

    Returns error message if any problems are found and None on success.
    sno certificate receivedcs6|ˆkp5dˆko5|dˆjddƒdkS(Nt.s*.i(tsplit(tcertname(tdnsname(s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pytmatchdnsname9stsubjectAltNametDNSscertificate is for %ss, tsubjectit
commonNametasciis IDN in certificate not supporteds4no commonName or subjectAltName found in certificateN(RtlowertgettNonetjointencodetUnicodeEncodeError(
tcertthostnameRtsantkeytvaluet	certnamestnametsR((Rs5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt_verifycert0s.
1

cCsÊ|jddƒ}|jdddtƒ}|r9t}nt}|jd|ƒ}i|d6}|rÆ|rÆtj|ƒ}tjj	|ƒs¨tj
tdƒ|ƒ‚n|ji|d	6t
d
6ƒn|S(NtwebtcacertstuittlstdefaultthostfingerprintsRscould not find web.cacerts: %sRR(tconfigt
configbooltTruetPROTOCOL_TLSv1tPROTOCOL_SSLv23Rt
expandpathtostpathtexistsRRtupdatet
CERT_REQUIRED(R-thostR,tforcetlsRthostfingerprinttkws((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt	sslkwargs[s	

t	validatorcBseZd„Zed„ZRS(cCs||_||_dS(N(R-R<(tselfR-R<((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt__init__os	cCsÝ|j}|jjddƒ}|jjd|ƒ}t|dtƒsÂ|rgtjtdƒ|ƒ‚n|r‰tjtdƒ|ƒ‚n|jjddt	ƒr¾|jj
td	ƒ|ƒndS|jƒsêtjtd
ƒ|ƒ‚ny|jt	ƒ}|jƒ}Wn*t
k
r5tjtd
ƒ|ƒ‚nX|sXtjtdƒ|ƒ‚ntj|ƒjƒ}djgtd
t|ƒdƒD]}	||	|	d!^qŒƒ}
|r!|jƒ|jddƒjƒkrtjtdƒ||
fdtdƒƒ‚n|jjd||
fƒn¸|r…t||ƒ}|rntjtdƒ||fdtdƒ|
ƒ‚n|jjd|ƒnT|r¹tjtdƒ||
fdtdƒƒ‚n |jj
tdƒ||
fƒdS(NR+R,R0tgetpeercerts:host fingerprint for %s can't be verified (Python too old)s5certificate for %s can't be verified (Python too old)R-treportoldssls?warning: certificate for %s can't be verified (Python too old)
s%s ssl connection errors-%s certificate error: no certificate receivedt:iits0certificate for %s has unexpected fingerprint %sthints#check hostfingerprint configurations&%s certificate matched fingerprint %s
s%s certificate error: %ssDconfigure hostfingerprint %s or use --insecure to connect insecurelys%%s certificate successfully verified
s/%s certificate with fingerprint %s not verifieds4check hostfingerprints or web.cacerts config settingspwarning: %s certificate with fingerprint %s not verified (check hostfingerprints or web.cacerts config setting)
(R<R-R1tgetattrtFalseRRRR2R3twarnRRDtAttributeErrortsha1t	hexdigestRtxrangetlenRtreplacetdebugR*(RBR	tstrictR<R,R>tpeercertt	peercert2tpeerfingerprinttxtnicefingerprinttmsg((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt__call__ss`	



	6	
	

(t__name__t
__module__RCRJRZ(((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyRAns	(R7t	mercurialRtmercurial.i18nRRR;R5R4t	CERT_NONERR
tImportErrorRRR*R@tobjectRA(((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt<module>	s&				

	+	

Copyright © 2017 || Recoded By Mr.Bumblebee