HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/mercurial/sslutil.pyc
ó
x7_c@@sÐddlmZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZedddgƒZ
eed	eƒZedgƒZejed
ƒrÊejdƒnejedƒrìejdƒny%ejZeZejedƒZWn3ek
rFeZeZd
efd„ƒYZnXd„Zd„Zdd„Zddded„Zdefd„ƒYZ dd„Z!d„Z"d„Z#ddgZ$d„Z%d„Z&dS(i(tabsolute_importNi(t_(terrortutilstls1.0stls1.1stls1.2tHAS_SNItPROTOCOL_TLSv1_1tPROTOCOL_TLSv1_2tload_default_certst
SSLContextcB@seeZejdkZd„Zd	d	d„Zd	d„Zd	d	d	d„Z	d„Z
d	ed„ZRS(
iicC@sX||_t|_d|_tj|_d|_d|_	d|_
d|_d|_dS(Ni(
tprotocoltFalsetcheck_hostnametoptionstsslt	CERT_NONEtverify_modetNonet	_certfilet_keyfilet
_certpasswordt_cacertst_ciphers(tselfR	((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt__init__?s							cC@s||_||_||_dS(N(RRR(Rtcertfiletkeyfiletpassword((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pytload_cert_chainMs		cC@sdS(N((Rtpurpose((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyRRscC@sI|rtjtdƒƒ‚n|r<tjtdƒƒ‚n||_dS(Nscapath not supportedscadata not supported(RtAbortRR(Rtcafiletcapathtcadata((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pytload_verify_locationsUs
cC@s:|js-tjtdƒdtdƒƒ‚n||_dS(NsLsetting ciphers in [hostsecurity] is not supported by this version of PythonthintsRremove the config option or run Mercurial with a modern Python version (preferred)(t_supportsciphersRRRR(Rtciphers((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pytset_ciphers]s	cC@shi|jd6|jd6|d6|jd6|jd6|jd6}|jrX|j|d<ntj||S(NRRtserver_sidet	cert_reqstssl_versiontca_certsR$(	RRRR	RR#RR
twrap_socket(Rtsockettserver_hostnameR&targs((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyR*gs




	(iiN(
t__name__t
__module__tsystversion_infoR#RRRRR!R%R
R*(((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyR;s		
cC@s˜i
td6gd6d,d6td6td6d,d6d,d6d,d6d,d	6d,d
6}d„}dtkrjd}n2|jd
dƒs–|jtdƒ|ƒnd}d}|jd
||ƒ}|||ƒd|}|jd
||ƒ}|||ƒ|jrd}nt	|ƒ\|d<|d	<|d<|jd
d
ƒ}|jd
d||ƒ}||d
<|j
d
d|gƒ}x’|D]Š}	|	jd-ƒs»tj
tdƒ||	fdtdƒƒ‚n|	jddƒ\}
}	|	jddƒjƒ}	|dj|
|	fƒqxWxV|j
d|gƒD]?}	|	jddƒjƒ}	|djd|	fƒt|d<qW|drƒtj|d<t|d<n-|jr°t|d<tj|d<t|d<n|jd d!ƒrÏt|d<n|jd
d"|ƒ}|dr|r|jtd#ƒ|ƒn|dd,krR|rytj|ƒ}tjj|ƒsltj
td$ƒd%||fƒ‚n||d<n£|jd&d'ƒ}|rßtj|ƒ}tjj|ƒstj
td(ƒ|td)ƒd*ƒ‚qn3|drt|ƒ}|r|jd+|ƒqn||d<|s2trB|drBtj|d<qRtj|d<n|dd,k	sht‚|d	d,k	s~t‚|dd,k	s”t‚|S(.shObtain security settings for a hostname.

    Returns a dict of settings relevant to that hostname.
    tallowloaddefaultcertstcertfingerprintsRtdisablecertverificationtlegacyfingerprintR	t
protocoluit
verifymodet
ctxoptionsR$cS@sQ|tkrMtjtdƒ||fdtdƒdjttƒƒƒ‚ndS(Ns-unsupported protocol from hostsecurity.%s: %sR"svalid protocols: %st (tconfigprotocolsRRRtjointsorted(R	tkey((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pytvalidateprotocolšs	
	stls1.1thostsecuritytdisabletls10warnings‰warning: connecting to %s using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info
stls1.0tminimumprotocols%s:minimumprotocols
%s:cipherss%s:fingerprintsssha1:ssha256:ssha512:sinvalid fingerprint for %s: %sR"s0must begin with "sha1:", "sha256:", or "sha512:"t:itthostfingerprintstsha1tdeveltdisableloaddefaultcertss%s:verifycertsfiless(hostsecurity.%s:verifycertsfile ignored when host fingerprints defined; using host fingerprints for verification)
s'path specified by %s does not exist: %sshostsecurity.%s:verifycertsfiletwebtcacertsscould not find web.cacerts: %ss  (try installing the %s package)sca-certificatessusing %s for CA file
N(ssha1:ssha256:ssha512:(tTrueRR
tsupportedprotocolst
configbooltwarnRtconfigtinsecureconnectionstprotocolsettingst
configlistt
startswithRRtsplittreplacetlowertappendR
RRt
expandpathtostpathtexistst_defaultcacertstdebugt_canloaddefaultcertst
CERT_REQUIREDtAssertionError(tuithostnametsR>tdefaultprotocolR=R	R$tfingerprintstfingerprinttalgR((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt
_hostsettingszsª
		


		!
	




	




	

cC@s|tkrtd|ƒ‚nttdgƒkrx|dkrhtjtdƒ|dtdƒƒ‚ntjddfStj	tj
B}|dkr—nT|dkr³|tjO}n8|dkrÖ|tjtjBO}ntjtd	ƒƒ‚|t
td
dƒO}tj||fS(s÷Resolve the protocol for a config value.

    Returns a 3-tuple of (protocol, options, ui value) where the first
    2 items are values used by SSLContext and the last is a string value
    of the ``minimumprotocol`` config option equivalent.
    s protocol value not supported: %sstls1.0s3current Python does not support protocol setting %sR"sAupgrade Python or disable setting since only TLS 1.0 is supportedistls1.1stls1.2sthis should not happentOP_NO_COMPRESSION(R:t
ValueErrorRKtsetRRRR
tPROTOCOL_TLSv1tOP_NO_SSLv2tOP_NO_SSLv3tOP_NO_TLSv1t
OP_NO_TLSv1_1tgetattrtPROTOCOL_SSLv23(R	R((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyRP$s$
c@s|stjtdƒƒ‚ntˆ|ƒ}t|dƒ}|j|dO_|d|_|drÌy|j|dƒWqÌtj	k
rÈ}tjtdƒ|j
ddtd	ƒ|dƒ‚qÌXnˆd!k	r‡‡‡fd
†}|jˆˆ|ƒn|dd!k	r®y|j
d|dƒWnwtj	k
r¤}t|j
ƒdkre|j
d}	n
|j
d}	tjtd
ƒ|d|	fdtdƒƒ‚nXt}
n#|drË|jƒt}
nt}
y|j|d|ƒ}WnVtj	k
rB}yF|
rD|dtjkrDtrD|jƒrDˆjtdƒƒnWntj	k
r[nXtj|dƒr<|jdkr<|ddkrëttdgƒkrшjtdƒ|djttƒƒfƒq6ˆjtdƒ|ƒq9ˆjtdƒ|d|fƒˆjtdƒ|ƒˆjtdƒƒq<n‚nX|jƒsgtjtdƒƒ‚ni|
d6|d6|d6ˆd 6|_|S("s¾Add SSL/TLS to a socket.

    This is a glorified wrapper for ``ssl.wrap_socket()``. It makes sane
    choices based on what security options are available.

    In addition to the arguments supported by ``ssl.wrap_socket``, we allow
    the following additional arguments:

    * serverhostname - The expected hostname of the remote server. If the
      server (and client) support SNI, this tells the server which certificate
      to use.
    s#serverhostname argument is requiredR	R8R7R$scould not set ciphers: %siR"s#change cipher string (%s) in configc@s&ˆp	ˆ}ˆjtdƒ|dƒS(Nspassphrase for %s: RC(tgetpassR(tf(RRR`(s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyR‚sRiserror loading CA file %s: %ssfile is empty or malformed?R2R,s¬(an attempt was made to load CA certificates but none were loaded; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this error)
treasontUNSUPPORTED_PROTOCOLR6stls1.0sÞ(could not communicate with %s using security protocols %s; if you are using a modern Mercurial version, consider contacting the operator of this server; see https://mercurial-scm.org/wiki/SecureConnections for more info)
s, sã(could not communicate with %s using TLS 1.0; the likely cause of this is the server no longer supports TLS 1.0 because it has known security vulnerabilities; see https://mercurial-scm.org/wiki/SecureConnections for more info)
sš(could not negotiate a common security protocol (%s+) with %s; the likely cause is Mercurial is configured to be more secure than the server can support)
sé(consider contacting the operator of this server and ask them to support modern TLS protocol versions; or, set hostsecurity.%s:minimumprotocol=tls1.0 to allow use of legacy, less secure protocols when communicating with this server)
sE(see https://mercurial-scm.org/wiki/SecureConnections for more info)
sssl connection failedtcaloadedRatsettingsR`N( RRRRgRRRR%R
tSSLErrorR-RRR!tlenRJRR
R*R^t	modernssltget_ca_certsRMRtsafehasattrRtRKRjR;R<tciphert_hgstate(tsockRRR`tserverhostnameRwt
sslcontextteRtmsgRvt	sslsocket((RRR`s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt
wrapsocketXs†
	

	
	

					
cC@sôtdƒ\}}}|jddƒ}	|	dkr?tj}nš|	dkr{dtkrotjtdƒƒ‚ntj}n^|	dkr·dtkr«tjtdƒƒ‚ntj	}n"|	rÙtjtdƒ|	ƒ‚nt
rst|ƒ}
|
j|O_|
jt
td	d
ƒO_|
jt
tdd
ƒO_tjtdƒr‚|
jt
td
d
ƒO_|
jtjƒq‚nttjƒ}
|r—tj|
_ntj|
_|s¯|rÈ|
jd|d|ƒn|rá|
jd|ƒn|
j|dtƒS(sæWrap a socket for use by servers.

    ``certfile`` and ``keyfile`` specify the files containing the certificate's
    public and private keys, respectively. Both keys can be defined in the same
    file via ``certfile`` (the private key must come first in the file).

    ``cafile`` defines the path to certificate authorities.

    ``requireclientcert`` specifies whether to require client certificates.

    Typically ``cafile`` is only defined if ``requireclientcert`` is true.
    stls1.0RFtserverexactprotocolstls1.1s$TLS 1.1 not supported by this Pythonstls1.2s$TLS 1.2 not supported by this Pythons)invalid value for serverexactprotocol: %stOP_SINGLE_DH_USEitOP_SINGLE_ECDH_USEt_RESTRICTED_SERVER_CIPHERStOP_CIPHER_SERVER_PREFERENCERRRR&(RPRNR
RkRKRRRRRRzRRRpRR|R%R‰R^RRRR!R*RJ(RR`RRRtrequireclientcertR	Rt_protocoluit
exactprotocolR((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pytwrapserversocketôs@
t
wildcarderrorcB@seZdZRS(s2Represents an error parsing wildcards in DNS name.(R.R/t__doc__(((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyR4sc
C@sXg}|stS|jdƒ}|d}|d}|jdƒ}||krgttdƒ|ƒ‚n|sƒ|jƒ|jƒkS|dkrŸ|jdƒnY|jdƒs½|jdƒrÖ|jtj	|ƒƒn"|jtj	|ƒj
dd	ƒƒx$|D]}|jtj	|ƒƒqÿWtjd
dj|ƒdtj
ƒ}	|	j|ƒd
k	S(sÜMatch DNS names according RFC 6125 section 6.4.3.

    This code is effectively copied from CPython's ssl._dnsname_match.

    Returns a bool indicating whether the expected hostname matches
    the value in ``dn``.
    t.iit*s.too many wildcards in certificate DNS name: %ss[^.]+sxn--s\*s[^.]*s\As\.s\ZN(R
RStcountRRRURVRRtretescapeRTtcompileR;t
IGNORECASEtmatchR(
tdnRatmaxwildcardstpatstpiecestleftmostt	remaindert	wildcardstfragtpat((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt
_dnsnamematch7s*

"
&cC@s§|stdƒSg}|jdgƒ}xe|D]]\}}|dkr/yt||ƒr]dSWntk
r{}|jdSX|j|ƒq/q/W|sLx³|jdgƒD]œ}x“|D]‹\}}|dkr¶y|jdƒ}Wntk
rûtd	ƒSXyt||ƒrdSWntk
r0}|jdSX|j|ƒq¶q¶Wq©Wnt|ƒd
krutdƒdj	|ƒSt|ƒd
kr™tdƒ|dStd
ƒSdS(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 receivedtsubjectAltNametDNSNitsubjectt
commonNametasciis IDN in certificate not supportediscertificate is for %ss, s4no commonName or subjectAltName found in certificate(
RtgetR¢RR-RVtencodetUnicodeEncodeErrorRyR;(tcertRatdnsnamestsanR=tvalueR‚tsub((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt_verifycertgs>

cC@s`tjdks%tjƒs%tjr)tStjjtjƒj	ƒ}|j
dƒp_|j
dƒS(s@return true if this seems to be a pure Apple Python that
    * is unfrozen and presumably has the whole mercurial module in the file
      system
    * presumably is an Apple Python that uses Apple OpenSSL which has patches
      for using system certificate store CAs in addition to the provided
      cacerts file
    tdarwins/usr/bin/pythons,/system/library/frameworks/python.framework/(R0tplatformRt
mainfrozent
executableR
RXRYtrealpathRURR(texe((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt_plainapplepython˜s
%s&/etc/pki/tls/certs/ca-bundle.trust.crts"/etc/ssl/certs/ca-certificates.crtcC@smy?ddl}|jƒ}tjj|ƒr>|jdƒ|SWnttfk
rXnXtjdkrˆt	s„|j
tdƒƒndSt
ƒrËtjjtjjtƒdƒ}tjj|ƒrË|Sntjdkrút	sö|j
tdƒƒndStjdkst‚t	six;tD]3}tjj|ƒr|j
td	ƒ|ƒ|SqW|j
tdƒƒndS(
s™return path to default CA certificates or None.

    It is assumed this function is called when the returned certificates
    file will actually be used to validate connections. Therefore this
    function may print warnings or debug messages assuming this usage.

    We don't print a message when the Python is able to load default
    CA certs because this scenario is detected at socket connect time.
    iNs#using ca certificates from certifi
tnts”(unable to load Windows CA certificates; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message)
s
dummycert.pemR±sŒ(unable to load CA certificates; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message)
s×(using CA certificates from %s; if you see this message, your Mercurial install is not properly configured; see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this message)
(tcertifitwhereRXRYRZR\tImportErrortAttributeErrortnameR]RMRRR·R;tdirnamet__file__R0R²R_t_systemcacertpathstisfile(R`R¹tcertst	dummycertRY((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyR[­s:
	!	
cC@sƒ|jd}|jd}|jd}y|jtƒ}|jƒ}Wn*tk
rrtjtdƒ|ƒ‚nX|s•tjtdƒ|ƒ‚n|drº|jtdƒ|ƒdSitj	|ƒj
ƒd	6tj|ƒj
ƒd
6tj|ƒj
ƒd6}d„}d
||d
ƒ}|dróxR|dD]F\}	}
||	j
ƒ|
kr4|jd||	||
ƒfƒdSq4W|dr¡d}||d	ƒ}n d}d|	|||	ƒf}tjtdƒ||fdtdƒ|ƒ‚n|jds2tjtdƒ|dtdƒ||fƒ‚nt||ƒ}
|
rtjtdƒ||
fdtdƒ||fƒ‚ndS(sxValidate a socket meets security requiremnets.

    The passed socket must have been created with ``wrapsocket()``.
    RaR`Rws%s ssl connection errors-%s certificate error: no certificate receivedR4swarning: connection security to %s is disabled per current settings; communication is susceptible to eavesdropping and tampering
NREtsha256tsha512cS@s=djgtdt|ƒdƒD]}|||d!^qƒS(NRBii(R;trangeRy(Rbtx((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pytfmtfingerprint'ss	sha256:%sR3s)%s certificate matched fingerprint %s:%s
R5thostfingerprintR?s%s:%ss0certificate for %s has unexpected fingerprint %sR"scheck %s configurationRvsPunable to verify security of %s (no loaded CA certificates); refusing to connects£see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this error or set hostsecurity.%s:fingerprints=%s to trust this servers%s certificate error: %ss^set hostsecurity.%s:certfingerprints=%s config setting or use --insecure to connect insecurely(R~tgetpeercertRJR¼RRRRMthashlibREt	hexdigestRÄRÅRUR\R°(RthostR`Rwtpeercertt	peercert2tpeerfingerprintsRÈtnicefingerprintthashRetsectiontniceRƒ((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pytvalidatesockets\





	
	


			('t
__future__RRËRXR”R
R0ti18nRRCRRRjR:RpR
thassniRKR|taddRRJRzR]R¼tobjectRgRPRR…RŽt	ExceptionRR¢R°R·RÀR[RÕ(((s5/usr/lib/python2.7/dist-packages/mercurial/sslutil.pyt<module>
sL
	
?	ª	4œ	?0	1			S