MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 216.73.216.126
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib64/python2.7/site-packages/mercurial/httpclient/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib64/python2.7/site-packages/mercurial/httpclient/socketutil.pyc
�
Hq�Qc	@sQdZddlZddlZeje�ZyddlZejeZ	WnAe
k
r�ddlZddlZe
ede�Z	eZnXy
ejZWnek
r�d�ZnXer�ejZejZejZejZnRdejfd��YZdZdZd	ZdZddeeedeed
�Zdefd��YZdS(
s�Abstraction to simplify socket use for Python < 2.6

This will attempt to use the ssl module and the new
socket.create_connection method, but fall back to the old
methods if those are unavailable.
i����NtHTTPSHandlercCs�|\}}d}d}x�tj||dtj�D]�}|\}}}}	}
y9tj|||�}tjd||�|j|
�WnEtjk
r�}tjd||�|r�|j�nd}q4nXPq4W|s�tj|��n|S(Ns!getaddrinfo returns an empty listisconnect: (%s, %s)sconnect fail: %s %s(	tNonetsockettgetaddrinfotSOCK_STREAMtloggertinfotconnectterrortclose(taddressthosttporttmsgtsocktrestaftsocktypetprotot
_canonnametsa((sE/usr/lib64/python2.7/site-packages/mercurial/httpclient/socketutil.pytcreate_connection6s(
t
FakeSocketcBseZdZddd�ZRS(s*Socket wrapper that supports SSL.
        iicCs�|dkr"td|j��nxYtr}y|jj|�SWq%tjk
ry}|jdtjkrpq%qz|�q%Xq%WdS(s1ssl-aware wrapper around socket.recv
            is3non-zero flags not allowed in calls to recv() on %sN(	t
ValueErrort	__class__tTruet_ssltreadRtsslerrortargstSSL_ERROR_WANT_READ(tselftbuflentflagstx((sE/usr/lib64/python2.7/site-packages/mercurial/httpclient/socketutil.pytrecvXs	(t__name__t
__module__t__doc__R#(((sE/usr/lib64/python2.7/site-packages/mercurial/httpclient/socketutil.pyRRsiiic	
CsC|tkr!|r!td��ntj|�}	t||	�}|S(NsUSSL certificate validation requires the ssl module(included in Python 2.6 and later.)(t	CERT_NONEt CertificateValidationUnsupportedRtsslR(
Rtkeyfiletcertfiletserver_sidet	cert_reqstssl_versiontca_certstdo_handshake_on_connecttsuppress_ragged_eofstsslob((sE/usr/lib64/python2.7/site-packages/mercurial/httpclient/socketutil.pytwrap_socketnsR(cBseZdZRS(sCException raised when cert validation is requested but unavailable.(R$R%R&(((sE/usr/lib64/python2.7/site-packages/mercurial/httpclient/socketutil.pyR(}s(R&tloggingRt	getLoggerR$RR)R3Rthave_ssltImportErrorthttplibturllib2tgetattrtFalseRtAttributeErrorR't
CERT_OPTIONALt
CERT_REQUIREDRt_PROTOCOL_SSLv23Rt	ExceptionR((((sE/usr/lib64/python2.7/site-packages/mercurial/httpclient/socketutil.pyt<module>"s@





			

MMCT - 2023