+
     h  c                  s   R t ^ RIHt ^ RIt^ RIHt ]P                  P                  ]P                  P                  ]	4      R4      t
]! ]
R4      ;_uu_ 4       tR ]P                  4        4        U u. uF(  p V '       g   K  V P                  R4      '       d   K&  V NK*  	  up tRRR4       R R	 ltR# u up i   + '       g   i     L; i)
a6  
These functions validate RP_ID and APP_ID according to simplified TLD+1 rules,
using a bundled copy of the public suffix list fetched from:

  https://publicsuffix.org/list/public_suffix_list.dat

Advanced APP_ID values pointing to JSON files containing valid facets are not
supported by this implementation.
)annotationsN)urlparsezpublic_suffix_list.datZrbc              #  s^   "   T F#  qP                  R 4      P                  4       x  K%  	  R# 5i)Zutf8N)ZdecodeZstrip)Z.0Zlines   & //usr/lib/python3.14/site-packages/fido2/rpid.py	<genexpr>r   /   s#     Lmdkk&)//11ms   +-z//c               s$    V ^8  d   QhRRRRRR/# )i   rp_idZstroriginZreturnZbool) )Zformats   "r   __annotate__r   4   s!       S T     c                sj   V '       g   R# \        V4      pVP                  pVP                  R8w  dF   VP                  V3R8w  d3   VP                  R8X  d    V'       d   VP                  R4      '       g   R# W08X  d   R# V'       d,   VP                  RV ,           4      '       d   V \        9  d   R# R# )zChecks if a Webauthn RP ID is usable for a given origin.

:param rp_id: The RP ID to validate.
:param origin: The origin of the request.
:return: True if the RP ID is usable by the origin, False if not.
FZhttpshttpz
.localhostTZ.)r   Z	localhost)r   ZhostnameZschemeZendswithsuffixes)r   r   ZurlZhosts   &&  r   verify_rp_idr
   4   s     
6
C<<D
 	

gZZ"77v%$4==3N3N}cEk**uH/Dr   )Z__doc__Z
__future__r    ZosZurllib.parser   ZpathZjoinZdirnameZ__file__Z	tld_fnameZopenZfZ	readlinesZ
startswithr	   r
   )Zentrys   0r   <module>r      s   8 # 	 !GGLL24LM		)Ta MakkmLLE 	))$/ 	LH  s*   B93
B4B4B4!B94B99C		