+
    :i*  c                   s    ^ RI t ^ RIt^ RIHt ^ RIHtHt ^ RIHt ^ RI	H
t
 ] P                  ! ]4      t^@t]^,           t]^,           t]^,           t]^,           tR R ltR R	 ltR
 R ltR R ltR# )i    N)sleep)	ApduErrorCtap1FidoConnection)SWc                0    V ^8  d   QhR\         R\        /# )   fido_connectionZreturn)r   ZboolZformat   "//usr/lib/python3.14/site-packages/ykman/fido.py__annotate__r   1   s      ^      c                s     \        V 4      pVP                  \        R7       R#   \         d,   pTP                  \
        P                  8X  d    Rp?R# h Rp?ii ; i)z`Check if a YubiKey 4 FIPS is in FIPS approved mode.

:param fido_connection: A FIDO connection.
insTNF)r   	send_apduINS_FIPS_VERIFY_FIPS_MODEr   coder   ZFUNCTION_NOT_SUPPORTEDr   ctapZe   &  r   is_in_fips_moder   1   sK    
_%45 66R...	s   !% AAAAc                sJ    V ^8  d   QhR\         R\        R,          R\        /# )r   r   old_pinNnew_pinr   Zstrr	   r
   r   r   r   A   s&     4 4^ 4cDj 4SV 4r   c                s    \        V 4      pV'       d   VP                  4       MRpVP                  4       p\        V4      p\        P                  ! RV4      V,           V,           pVP                  \        VR7       R# )zChange the PIN on a YubiKey 4 FIPS.

If no PIN is set, pass None or an empty string as old_pin.

:param fido_connection: A FIDO connection.
:param old_pin: The old PIN.
:param new_pin: The new PIN.
r   ZBr   dataN)r   encodeZlenstructZpackr   INS_FIPS_SET_PIN)r   r   r   r   Zold_pin_bytesZnew_pin_bytesZ
new_lengthr   s   &&&     r   fips_change_pinr   A   s_     !D(/GNN$SMNN$M]#J;;sJ'-7-GDNN'dN3r   c                r   )r   r   pinr   r	   r
   r   r   r   U   s     ? ?^ ?# ?r   c                sf    \        V 4      pVP                  \        VP                  4       R7       R# )zUnlock the YubiKey 4 FIPS U2F module for credential creation.

:param fido_connection: A FIDO connection.
:param pin: The FIDO PIN.
r   N)r   r   INS_FIPS_VERIFY_PINr   )r   r    r   s   && r   fips_verify_pinr"   U   s%     !DNN*N>r   c                s$    V ^8  d   QhR\         /# )r   r   r   r	   r
   r   r   r   _   s       r   c                s    \        V 4      p  VP                  \        R7       R#   \         d8   pTP                  \
        P                  8X  d   \        R4        Rp?KU  ThRp?ii ; i)a#  Reset the FIDO module of a YubiKey 4 FIPS.

Note: This action is only permitted immediately after YubiKey power-up. It also
requires the user to touch the flashing button on the YubiKey, and will halt until
that happens, or the command times out.

:param fido_connection: A FIDO connection.
r   Ng      ?)r   r   INS_FIPS_RESETr   r   r   ZCONDITIONS_NOT_SATISFIEDr    r   r   r   
fips_resetr$   _   sW     !D
	NN~N. 	vv444c

		s   & A(*A#!A##A()Zloggingr   Ztimer    Zfido2.ctap1r   r   Zyubikit.core.fidor   Zyubikit.core.smartcardr   Z	getLoggerZ__name__ZloggerZU2F_VENDOR_FIRSTr!   r   r#   r   r   r   r"   r$   ) r   r   <module>r%      sr   8    ( , %			8	$   '* #a' !A%,q0  4(?r   