hyb
2026-01-30 44480e71b27aa9d4cb8441f50c873f1b110e9691
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Ë
ê^iÕãó¶—dZddlmZddlZddlZddlZddlmZmZejrddl    m
Z
dZ Gd„d    e «Z     d                             dd
„Zdd „Z    d                            dd „Zy)zHThe match_hostname() function from Python 3.5, essential when using SSL.é)Ú annotationsN)Ú IPv4AddressÚ IPv6Addressé)Ú_TYPE_PEER_CERT_RET_DICTz3.5.0.1có —eZdZy)ÚCertificateErrorN)Ú__name__Ú
__module__Ú __qualname__©óõrH:\项目\archive\测试组\脚本\Change_password\venv_build\Lib\site-packages\urllib3/util/ssl_match_hostname.pyr    r    s„Ørr    có—g}|sy|jd«}|d}|dd}|jd«}||kDrtdt|«z«‚|s*t    |j «|j «k(«S|dk(r|j d«n{|jd    «s|jd    «r%|j tj|««n4|j tj|«jd
d ««|D]&}|j tj|««Œ(tjd d j|«zdztj«}    |    j|«S)zhMatching according to RFC 6125, section 6.4.3
 
    http://tools.ietf.org/html/rfc6125#section-6.4.3
    Fú.rrNÚ*z,too many wildcards in certificate DNS name: z[^.]+zxn--z\*z[^.]*z\Az\.z\Z)ÚsplitÚcountr    ÚreprÚboolÚlowerÚappendÚ
startswithÚreÚescapeÚreplaceÚcompileÚjoinÚ
IGNORECASEÚmatch)
ÚdnÚhostnameÚ max_wildcardsÚpatsÚpartsÚleftmostÚ    remainderÚ    wildcardsÚfragÚpats
          rÚ_dnsname_matchr+sO€ð €DÙ Øð H‰HT‹N€EؐQ‰x€Hؐab    €Ià—‘˜sÓ#€Iؐ=Ò ô
Ø :¼TÀ"»XÑ Eó
ð    
ñ
ܐB—H‘H“J (§.¡.Ó"2Ñ2Ó3Ð3ð
3‚ð      ‰ GÕØ    ×    Ñ    ˜VÔ    $¨×(;Ñ(;¸FÔ(Cð
      ‰ ”B—I‘I˜hÓ'Õ(ð      ‰ ”B—I‘I˜hÓ'×/Ñ/°°wÓ?Ô@ðò%ˆØ  ‰ ”B—I‘I˜d“OÕ$ð%ô *‰*U˜UŸZ™Z¨Ó-Ñ-°Ñ5´r·}±}Ó
E€CØ 9‰9XÓ ÐrcóŒ—tj|j««}t|j|jk(«S)a…Exact matching of IP addresses.
 
    RFC 9110 section 4.3.5: "A reference identity of IP-ID contains the decoded
    bytes of the IP address. An IP version 4 address is 4 octets, and an IP
    version 6 address is 16 octets. [...] A reference identity of type IP-ID
    matches if the address is identical to an iPAddress value of the
    subjectAltName extension of the certificate."
    )Ú    ipaddressÚ
ip_addressÚrstriprÚpacked)ÚipnameÚhost_ipÚips   rÚ_ipaddress_matchr4Ps2€ô
×    Ñ    ˜fŸm™m›oÓ    .€BÜ —    ‘    ˜WŸ^™^Ñ+Ó ,Ð,rc ó—|s td«‚    d|vr(tj|d|jd««}ntj|«}g}|j    dd«}|D]S\}}|dk(r"|€t ||«ry|j |«Œ-|dk(sŒ3|t||«ry|j |«ŒU|rK|€I|sG|j    dd«D]2}|D]+\}}|d    k(sŒ t ||«ry|j |«Œ-Œ4t|«d
kDr.td |›d d jtt|««›«‚t|«d
k(rtd |›d|d›«‚td«‚#t$rd}YŒ0wxYw)a)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.
    ztempty or no certificate, match_hostname needs a SSL socket or SSL context with either CERT_OPTIONAL or CERT_REQUIREDú%NÚsubjectAltNamer ÚDNSz
IP AddressÚsubjectÚ
commonNamerz    hostname z doesn't match either of z, z doesn't match rz/no appropriate subjectAltName fields were found) Ú
ValueErrorr-r.ÚrfindÚgetr+rr4Úlenr    rÚmapr)    Úcertr"Úhostname_checks_common_namer2ÚdnsnamesÚsanÚkeyÚvalueÚsubs             rÚmatch_hostnamerG_s¬€ñ Üð -ó
ð    
ð
ð (‰?Ü×*Ñ*¨8Ð4I°h·n±nÀSÓ6IÐ+JÓK‰Gä×*Ñ*¨8Ó4ˆGð
€HØ'+§x¡xÐ0@À"Ó'E€Cðò#‰
ˆˆUØ %Š<؈¤>°%¸Ô#BÙØ O‰O˜EÕ "Ø LÓ  ØÐ"Ô'7¸¸wÔ'GÙØ O‰O˜EÕ "ð#ñ# w ¹xØ—8‘8˜I rÓ*ò    +ˆCØ!ò +‘
Uؘ,Ó&Ü% e¨XÔ6ÚØ—O‘O EÕ*ñ     +ð    +ô ˆ8ƒ}qÒÝâ,4°d·i±iÄÄDÈ(Ó@SÔ6Tð Vó
ð    
ô
ˆX‹˜!Ò    Ü ¨8¨,°oÀhÈqÁkÀ_ÐUÓVÐVäÐPÓQÐQøôG òà‹ðúsAE2Å2 FÆF)r)r!z
typing.Anyr"Ústrr#ÚintÚreturnztyping.Match[str] | None | bool)r1rHr2zIPv4Address | IPv6AddressrJr)F)r@z_TYPE_PEER_CERT_RET_DICT | Noner"rHrArrJÚNone)Ú__doc__Ú
__future__rr-rÚtypingrrÚ TYPE_CHECKINGÚssl_rÚ __version__r;r    r+r4rGr rrú<module>rRsžðÙNõ #ãÛ    Û ß.à    ×ÒÝ.à€ ô    zô    ð
9:ð5Øð5Ø!ð5Ø25ð5à$ó5óp -ð$).ð@RØ
)ð@Ràð@Rð"&ð@Rð
ô    @Rr