+
     h!  c                  s
  a  0 t $ ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIHt ^ RIHt ^RIHtHtHt ]
P$                  R8w  g   Q h]P&                  ! ]4      tRt]P.                  ! R4      t]P.                  ! R	4      t]P.                  ! R
4      t]P6                  ! ]! R4      4      tRtRtRtRt Rt!Rt" ! R R]PF                  4      t$ ! R R]4      t%R t&R t'R t(R t)R t*R t+],! 4       t-R].R&   R t/R# )i    )annotationsN)array)find_library)FileCtapHidConnectionHidDescriptorparse_report_descriptorZwin32z/dev/zvendor=(0x[0-9a-fA-F]+)zproduct=(0x[0-9a-fA-F]+)zsernum="([^"]+)Zcl   U@  i U@iU  iU@i!U@i%U@@c                  s`   ] tR t^GtR]P
                  3R]P                  3R]P                  3R]P                  3R]P                  3R]P                  3R]P                  3R]P                  3R	]P                  3R
]P                  3R]P                  3R]P                  ^,          3.tRt	R# )usb_gen_descriptorugd_dataZugd_lang_id
ugd_maxlen
ugd_actlenZ
ugd_offsetZugd_config_indexZugd_string_indexZugd_iface_indexZugd_altif_indexZugd_endpt_indexugd_report_typeZreserved N)
__name__
__module____qualname____firstlineno__ctypesZc_void_pZc_uint16Zc_uint8Z_fields___static_attributes__r       6/usr/lib/python3.14/site-packages/fido2/hid/freebsd.pyr   r   G   s     OO	
 
(	v'	v'	v'	V^^,	V^^,	FNN+	FNN+	FNN+	FNN+	V^^a'(Hr   r   c                  s(   a  ] tR t^[tV 3R ltRtV ;t# )HidrawCtapHidConnectionc                	s<   < \         \        V `  R V,           4       R# )s    N)Zsuperr   write_packet)ZselfZpacket	__class__s   &&r   r   Z$HidrawCtapHidConnection.write_packet\   s    %t9%&.Ir   r   )r   r   r   r   r   r   Z__classcell__)r      @r   r   r   [   s    J Jr   r   c                s    V P                   P                  \        R ,           4      ^ 8X  d   \        V 4      # \	        V 4      # )hidraw)pathfinddevdirr   r   )Z
descriptors   &r   open_connectionr   a   s4    FX-.!3&z22$Z00r   c                sN   \         P                  ! R 4      p\        \         P                  ! V4      \         P                  ! V4      VR7      p\
        P                  V \        \         P                  ! V4      4      pV^ 8w  d   \        R4      hVP                  RVP                   # )i   )r   r   r
   zioctl failedN)r   create_string_bufferr   Z	addressofsizeoflibcioctlUSB_GET_REPORT_DESCbyref
ValueErrorZrawr	   )fdZreport_typedatadescZrets   &&   r   _get_report_datar'   h   s    &&t,D!!$'==&#D
 **R,fll4.@
AC
ax((88%doo&&r   c           	     s    \         P                  ! V\         P                  4      p\        V^4      p\         P                  ! V4       \        V4      w  rx\        W@WWV4      # )i   )osopenZO_RDONLYr'   Zcloser   r   )	vidpidnameserialr   r$   r%   max_in_sizemax_out_sizes	   &&&&&    r   _read_descriptorr0   u   sK    	r{{	#BB"DHHRL 7 =KCl&QQr   c               #  sF  "   \         P                   ! \        R ,           4       EFv  p V \        \        4      \        R4      ,           R pVP                  4       '       g   K>  RV,           R,           P	                  4       pRV,           R,           P	                  4       p\
        P                  ! R4      p\
        P                  ! \
        P                  ! V4      4      p\
        P                  ! V4      p\        P                  Wd\
        P                  ! V4      RR4      pV^ 8w  d   EK  / pV \        \        4      R VR&   WR&   VP                  RVP                   P                  4       p	\        P!                  V	4      p
V
'       d   \#        V
P%                  ^4      ^4      MRVR	&   \&        P!                  V	4      p
V
'       d   \#        V
P%                  ^4      ^4      MRVR
&   \(        P!                  V	4      p
V
'       d   V
P%                  ^4      MRVR&   \
        P                  ! V4      p\        P                  Wd\
        P                  ! V4      RR4      pV^ 8X  d5   VP                  RVP                   P                  4       ;'       g    RVR&   Vx  EKy  	  R# 5i)zuhid?*uhidNz	dev.uhid.z	.%pnpinfoz.%desci   r,   r   	vendor_id
product_idserial_numberproduct_desc)globr   ZlenZisdigitZencoder   r   Zc_size_tr   Zc_char_pr   Zsysctlbynamer"   valuedecode	vendor_reZsearchZintZgroup
product_re	sernum_re)r1   indexZpnpinfor&   ZovalueZolenZkeyZretvaldevr7   Zms              r   
_enumerater>   }   s    		&8+,S[3v;.01}}&4<<>e#h.668,,T2v}}V45oog&""3T0BD$OQ;+-3v;=)FF\tzz*113U#233qwwqz2.Ke$34C
B/$LU#-.qwwqzDOood#""3T0BD$OQ;"(,,|"<"C"C"E"M"MC	E -s   GJ!<J!BJ!J!c           	     sd   \        V R 4      ;_uu_ 4       p\        R^ .^,          4      p\        P                  ! V\        VR4       \
        P                  ! RV4      w  r4p\        R^ .^,          4      p\        P                  ! V\        VR4       VP                  ^ 4      ^,           pV^8  d%   \        VRV^,
           4      P                  R4      MRp \        R^ .^A,          4      p\        P                  ! V\        VR4       VP                  ^ 4      ^,           pV^8  d%   \        VRV^,
           4      P                  R4      MRp\        R^ .^,          4      p\        P                  ! V\        VR4       \
        P                  ! RV4      ^ ,          p	V\        R^ .V	,          4      ,          p\        P                  ! V\        VR4       RRR4       \        XR,          4      p
\        V
4      w  r\!        V XXWXX4      #   \         d    Rp Li ; i  + '       g   i     LR; i)ZrbZBTz<IHHNzutf-8z<I:i   NN)r)   r   fcntlr    HIDIOCGRAWINFOstructZunpackHIDIOCGRAWNAME_128r<   Z	bytearrayr8   HIDIOCGRAWUNIQ_64ZOSErrorHIDIOCGRDESCSIZEHIDIOCGRDESCr   r   )r   ZfZbufZ_r*   r+   Zlengthr,   r-   Zsizer%   r.   r/   s   &            r   get_hidraw_descriptorrF      s   	dD		QC!	*+A~sD1mmFC0 C!s#A)351!AG!y^
,-44W=QU	aS2X&CKK,c48YYq\A%FBH1*	#n!-.55g>RV  C!q!A'd3}}T3'*uS1#*%%A|S$/? 
B SWD 7 =KsCD&QQ  	F	/ 
	s2   CHA6HBHHHHHH/	c                sN   V P                  \        R ,           4      ^ 8X  d   \        V 4      # \        4        Fa  pVR,          V 8X  g   K  VR,          pVR,          pVR,          ;'       g    RpRV9   d
   VR,          MR;'       g    Rp\	        W#WEV 4      u # 	  \        R4      h)r   r   r2   r3   r5   Nr4   zDevice not found)r   r   rF   r>   r0   r#   )r   r=   r*   r+   r,   r-   s   &     r   get_descriptorrG      s    yy("#q($T**|v;$k"Cl#C~&..$D.=.Dc/*$WWSWF#CdDAA  '
((r   zset[str]_failed_cachec            
     s   \        \        4      p . p\        P                  ! \        R ,           4       F/  pV P	                  V4        VP                  \        V4      4       K1  	  V'       g   \        4        Fy  pVR,          pV P	                  V4        VR,          ;'       g    RpRV9   d
   VR,          MR;'       g    RpVP                  \        VR,          VR	,          VVV4      4       K{  	  \        P                  V 4       V#   \         d     K  \         dB    T\        9  d2   \        P                  RTRR7       \        P                  T4        EK-   EK1  i ; i  \         d     K  \         dB    T\        9  d2   \        P                  R
TRR7       \        P                  T4        EKD   EKH  i ; i)zhidraw?*zFailed opening device %sT)Zexc_infor   r5   Nr4   r2   r3   zFailed opening HID device %s)setrH   r6   r   ZdiscardZappendrG   r#   Z	ExceptionloggerZdebugZaddr>   r0   Zdifference_update)ZstaleZdescriptorsr   r=   r   r,   r-   s          r   list_descriptorsrK      s   EK))FZ/0f	*~f56 1 <Cv;DMM$,>*22d,;s,BC(   ""$K(L)  2 ##E*G  	 	*]*7$O!!&)) +	*.   ,},LL!?PTLU!%%d++ -,sH   DE(&E(/E(E%E%#9E%$E%(G6G?9G G)0__conditional_annotations__Z
__future__r    r   r?   r6   Zloggingr(   ZrerA   Zsysr   Zctypes.utilr   Zbaser   r   r   ZplatformZ	getLoggerr   rJ   r   Zcompiler9   r:   r;   ZCDLLr   r!   r@   rE   rD   rB   rC   Z	Structurer   r   r   r'   r0   r>   rF   rG   rI   rH   Z__annotations__rK   )rL   r   r   <module>rM      s  > # "     	 	  
  $ O O ||w 			8	$ 
JJ01	ZZ23
JJ()	{{<$% !     )) (J3 J1
'R#L$RN) %x *r   