KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/lib64/python2.4/site-packages/M2Crypto/SSL/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/site-packages/M2Crypto/SSL/Checker.pyo
mò
låìPc@s»dZdklZlZlZdkZdefd„ƒYZdefd„ƒYZdefd„ƒYZ	d	efd
„ƒYZ
dfd„ƒYZed
jodk
Z
e
iƒndS(s{
SSL peer certificate checking routines

Copyright (c) 2004-2007 Open Source Applications Foundation.
All rights reserved.
(sutilsEVPsm2NtSSLVerificationErrorcBstZRS(N(t__name__t
__module__(((t:/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Checker.pyRst
NoCertificatecBstZRS(N(RR(((RRstWrongCertificatecBstZRS(N(RR(((RRst	WrongHostcBstZdd„Zd„ZRS(Nt
commonNamecCsI|djotdƒ‚nti|ƒ||_||_||_dS(sz
        This exception will be raised if the certificate returned by the
        peer was issued for a different host than we tried to connect to.
        This could be due to a server misconfiguration or an active attack.
        
        @param expectedHost: The name of the host we expected to find in the
                             certificate.
        @param actualHost:   The name of the host we actually found in the
                             certificate.
        @param fieldName:    The field name where we noticed the error. This
                             should be either 'commonName' or 'subjectAltName'.
        RtsubjectAltNames@Unknown fieldName, should be either commonName or subjectAltNameN(s
commonNamessubjectAltName(t	fieldNamet
ValueErrorRt__init__tselftexpectedHostt
actualHost(RR
RR	((RRs

		cCsd|i|i|ifS(Ns<Peer certificate %s does not match host, expected %s, got %s(RR	R
R(R((Rt__str__*s(RRRR(((RRstCheckercBs8tZdddd„Zdd„Zd„Zd„ZRS(Ntsha1cCs1||_||_||_tidƒ|_dS(Ns^[0-9]+(\.[0-9]+)*$(	thostRtpeerCertHashtfingerprinttpeerCertDigesttdigesttretcompiletnumericIpMatch(RRRR((RR0s			cCsŸ|djotdƒ‚n|dj	o
||_n|ioð|idjotd|iƒ‚n|idjot|iƒdjp&|idjo&t|iƒdjot	dƒ‚n|i
ƒ}
ti
|iƒ}	|	i|
ƒ|	iƒ}ti|ƒt|idƒjot	d	ƒ‚q1n|io`t}t|_ye|id
ƒiƒ}|i|i|ƒo
t}n-|io"td|id|d
d
ƒ‚nWntj
onX|pËt}d}xx|i ƒi!t"i#ƒD]^}t}|i%ƒi&ƒ}|p
|}n|d|7}|i(|i|ƒot}PqñqñW|pt	dƒ‚n|p"td|id|d
dƒ‚q—q›ntS(Nspeer did not return certificateRtmd5sunsupported digest "%s"i(i s2peer certificate fingerprint length does not matchis+peer certificate fingerprint does not matchRR
RR	tt,s!no commonName in peer certificateR(RR()tpeerCerttNoneRRRRRR
tlenRtas_dertdertEVPt
MessageDigesttmdtupdatetfinaltutiltoctx_to_numtinttFalsethostValidationPassedtuseSubjectAltNameOnlytget_extt	get_valueRt_splitSubjectAltNametTrueRtLookupErrort
hasCommonNametcommonNamestget_subjecttget_entries_by_nidtm2tNID_commonNametentrytget_datatas_textRt_match(RRRR3RR2RRR+R$R!R8((Rt__call__6s`



L
"
	


	cCsvt|_xf|idƒD]U}|iƒiƒ}|d djo,t|_|i	||dƒotSqnqqWtS(sg
        >>> check = Checker()
        >>> check._splitSubjectAltName(host='my.example.com', subjectAltName='DNS:my.example.com')
        True
        >>> check._splitSubjectAltName(host='my.example.com', subjectAltName='DNS:*.example.com')
        True
        >>> check._splitSubjectAltName(host='my.example.com', subjectAltName='DNS:m*.example.com')
        True
        >>> check._splitSubjectAltName(host='my.example.com', subjectAltName='DNS:m*ample.com')
        False
        >>> check.useSubjectAltNameOnly
        True
        >>> check._splitSubjectAltName(host='my.example.com', subjectAltName='DNS:m*ample.com, othername:<unsupported>')
        False
        >>> check._splitSubjectAltName(host='my.example.com', subjectAltName='DNS:m*ample.com, DNS:my.example.org')
        False
        >>> check._splitSubjectAltName(host='my.example.com', subjectAltName='DNS:m*ample.com, DNS:my.example.com')
        True
        >>> check._splitSubjectAltName(host='my.example.com', subjectAltName='DNS:my.example.com, DNS:my.example.org')
        True
        >>> check.useSubjectAltNameOnly
        True
        >>> check._splitSubjectAltName(host='my.example.com', subjectAltName='')
        False
        >>> check._splitSubjectAltName(host='my.example.com', subjectAltName='othername:<unsupported>')
        False
        >>> check.useSubjectAltNameOnly
        False
        Risdns:N(R*RR,RtsplittcertHosttlowertstripR0R;R(RRRR>((RR/us		cCsð|iƒ}|iƒ}||jotSn|idƒdjotSn|ii|ƒp|ii|i	ddƒƒotSn|i
dƒdjotSn|i	ddƒ}|i	ddƒ}tid	|ƒi|ƒotSntS(s
        >>> check = Checker()
        >>> check._match(host='my.example.com', certHost='my.example.com')
        True
        >>> check._match(host='my.example.com', certHost='*.example.com')
        True
        >>> check._match(host='my.example.com', certHost='m*.example.com')
        True
        >>> check._match(host='my.example.com', certHost='m*.EXAMPLE.com')
        True
        >>> check._match(host='my.example.com', certHost='m*ample.com')
        False
        >>> check._match(host='my.example.com', certHost='*.*.com')
        False
        >>> check._match(host='1.2.3.4', certHost='1.2.3.4')
        True
        >>> check._match(host='1.2.3.4', certHost='*.2.3.4')
        False
        >>> check._match(host='1234', certHost='1234')
        True
        t*iRs\iÿÿÿÿt.s\.s[^\.]*s^%s$N(
RR?R>R0tcountR*RRtmatchtreplacetfindRR(RRR>((RR;s 
2(RRRRR<R/R;(((RR/s?	(t__main__(t__doc__tM2CryptoR'R"R6Rt	ExceptionRRRRRRtdoctestttestmod(
RRR'RRRKR6R"RR((Rt?s	¥
	

Anon7 - 2021