+
    :imn  c                   s   ^ RI t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIt^ RI	H
t
Ht ^ RIHtHtHtHt ^ RIHt ^ RIHt ^ R	IHtHtHtHtHtHtHtHt ^R
IHtH t H!t!H"t"H#t#H$t$H%t% ^RI&H't'H(t( ^RI)H*t*H+t+H,t,H-t-H.t.H/t/H0t0H1t1H2t2H3t3H4t4 ] Pj                  ! ]64      t7R t8R t9]Pt                  ! R]Pv                  ! RR.4      R R7      t<]Pz                  ! RRRRR7      t>Rt?R t@R tA].! ]].R7      ]P                  ]0]Pz                  ! RRRRR 7      R! 4       4       4       4       tRR" ltC]P                  4       ]P                  R# 4       4       tE]P                  4       ]-]P                  R$ 4       4       4       tF]P                  4       ]<]P                  ]Pz                  ! R%R&R'R(7      ]Pz                  ! R)R*]+! ]4      R+RR,R-7      R. 4       4       4       4       4       tG]P                  4       ]<]-]P                  R/ 4       4       4       4       tH]P                  4       ]<]Pz                  ! R0R1RR2R3R47      ]Pz                  ! R%R5RR]8! ^4      R6R77      ]Pz                  ! R8R9RR]8! ^4      R:R77      ]>]Pz                  ! R;R<RRR=R>7      ]Pz                  ! R?R@RRRAR>7      ]Pz                  ! RBRCRRRDR>7      ]Pz                  ! RERFRRRRG7      ]Pz                  ! RHRI]P                  ! RJ4      RRKRL7      ]-]P                  RM 4       4       4       4       4       4       4       4       4       4       4       4       4       tJ]P                  4       ]<]Pt                  ! RNRRO7      ]Pz                  ! R?RPRRQRR7      ]Pz                  ! RSRTRU]P                  ! ^^&4      ^&RRVRW7      ]Pz                  ! R8RX]+! ]'4      R3RRYR-7      ]>]-]P                  RZ 4       4       4       4       4       4       4       4       4       tL]P                  4       ]<]Pt                  ! R[RRO7      ]Pz                  ! R)R\RR]RR7      ]Pz                  ! R^R_RRR`R>7      ]Pz                  ! R?RPRRRaR>7      ]-]P                  Rb 4       4       4       4       4       4       4       4       tM]P                  4       ]<]Pt                  ! RcRRO7      ]Pz                  ! R^R_RRdRR7      ]Pz                  ! ReRf]Pv                  ! RgRh.4      RgRRiR-7      ]P                  Rj 4       4       4       4       4       4       tNRk tO]P                  4       ]<]Pt                  ! R[]/RRl7      ]Pz                  ! ReRf]Pv                  ! RgRh.4      RgRRmR-7      ]Pz                  ! RnRo]P^ RpRq7      ]Pz                  ! RrRsRtR(7      ]>]-]P                  Ru 4       4       4       4       4       4       4       4       4       tQ]P                  4       ]<]-]P                  ]Pz                  ! RvRwRRRxRy7      ]Pz                  ! RzRR{RR7      ]>]Pz                  ! R%R|]Pv                  ! . RO4      R}RR~R-7      ]Pz                  ! RRRRR7      ]Pz                  ! RRRRR7      R 4       4       4       4       4       4       4       4       4       4       tRR# )i    N)	b32encode)Event)time)	TRANSPORTCommandError)MODHEX_ALPHABETOtpConnectionmodhex_decodemodhex_encode)SmartCardConnection)
CAPABILITY)	NDEF_TYPESLOTHmacSha1SlotConfigurationHotpSlotConfigurationStaticPasswordSlotConfigurationUpdateConfigurationYubiOtpSessionYubiOtpSlotConfiguration)
format_csvformat_oath_codegenerate_static_pwis_in_fips_modeparse_b32_keyparse_oath_keytime_challenge)KEYBOARD_LAYOUTencode)CliFail
EnumChoiceclick_callbackclick_force_optionclick_groupclick_parse_b32_keyclick_postpone_executionclick_promptis_yk4_fipslog_or_echoprompt_for_touchc                 s.   a  \        4       V 3R  l4       pV# )c                 sp   < \         P                  V4      p\        V4      S8w  d   \        R S R24      hV# )zMust be exactly z bytes.)bytesfromhexlen
ValueError)ctxZparamZvallengths   &&&3/usr/lib/python3.14/site-packages/ykman/_cli/otp.pyinnerZparse_hex.<locals>.innerU   s7    mmC s8v/xw?@@
    )r   )r,   r.   s   f r-   	parse_hexr0   T   s      Lr/   c                 s     \         P                  V 4      p\	        T4      ^8w  d   \        R4      hT#   \         d   p\        T4      hR p?ii ; i)NzMust be exactly 6 bytes.)r'   r(   Z	TypeErrorr*   r)   )Zaccess_code_hexaccess_codees   &  r-   parse_access_code_hexr3   _   sR    mmO4 ;1344  ms   4 AA

AslotZ1Z2c                 s*    \        \        V4      4      # N)r   int)ZcZpZvs   &&&r-   <lambda>r7   k   s    DQLr/   )typecallbackz--enter/--no-enterTz)send an Enter keystroke after slot output)defaultshow_defaulthelpz|Failed to write to the YubiKey. Make sure the device does not have restricted access (see "ykman otp --help" for more info).c                 sr    V P                  V4      '       d    \        P                  ! R V R2RRR7       R# R# )Slot z0 is already configured. Overwrite configuration?TZabortZerrN)is_configuredclickconfirm)Z
slot_stater4   s   &&r-   _confirm_slot_overwriterB   |   s7    %%D6IJ	
 &r/   c                 s    \        V R V 4      # )Zname)Zgetattr)Zfobj   &r-   _fnamerD      s    4&&r/   )Zconnectionsz--access-codeFZHEXz;6 byte access code (use "-" as a value to prompt for input))requiredmetavarr<   c                s     Ve!   VR8X  d   \        RRR7      p \        V4      pWP                  R&   R#   \         d   p\        RT 24      hRp?ii ; i)al  
Manage the YubiOTP application.

The YubiKey provides two keyboard-based slots which can each be configured
with a credential. Several credential types are supported.

A slot configuration may be write-protected with an access code. This
prevents the configuration to be overwritten without the access code
provided. Mode switching the YubiKey is not possible when a slot is
configured with an access code. To provide an access code to commands
which require it, use the --access-code option. Note that this option must
be given directly after the "otp" command, before any sub-command.

Examples:


  Swap the configurations between the two slots:
  $ ykman otp swap


  Program a random challenge-response credential to slot 2:
  $ ykman otp chalresp --generate 2


  Program a Yubico OTP credential to slot 1, using the serial as public id:
  $ ykman otp yubiotp 1 --serial-public-id


  Program a random 38 characters long static password to slot 2:
  $ ykman otp static --generate 2 --length 38


  Remove a currently set access code from slot 2):
  $ ykman otp --access-code 0123456789ab settings 2 --delete-access-code
N-zEnter the access codeT)
hide_inputFailed to parse access code: r1   )r#   r3   	Exceptionr   obj)r+   r1   r2      && r-   otprM      sg    \
 #&'>4PK	?/<K )GGM  	?9!=>>	?s   6 AAAc                 s   V P                   R ,          pV P                   R,          pV'       g+   VP                  R8  d   \        \        .pM\        \        .pV P                   P	                  R4      pV'       d   \        V9   d	   \        .pM\        R4      hV Fg  pVP                  V4      '       g   K   VP                  V4      pV P                  VP                  4       V'       d
   V! V4      pMRp\        Wg4      u # 	  \        R4      h  \         d"   p\        P                  RT4        Rp?K  Rp?ii ; i)deviceinfoZscpz-SCP can only be used with SmartCardConnectionNzFailed to open connection: %szVThe connection type required for this command is not supported/enabled on the YubiKey.)i      i   )rK   Zversionr	   r   Zgetr   Zsupports_connectionZopen_connectionZcall_on_closeZcloser   rJ   loggerwarning)	r+   ZtypesdevrO   Zresolve_scpZ	conn_typeZconnZ
scp_paramsr2   s	   &&       r-   _get_sessionrT      s	   
''(
C776?D<<9$(-8E"$78E''++e$K%'()EIJJ	""9--
**95!!$**-!,T!2J!%J%d77  	 	  >Bs   93D-DD>D99D>c                s   \        V 4      pVP                  4       pVP                  \        P                  4      pVP                  \        P
                  4      p\        P                  ! RT;'       d    R;'       g    R 24       \        P                  ! RT;'       d    R;'       g    R 24       \        V P                  R,          4      '       d/   \        P                  ! R\        V4      '       d   RMR 24       R	# R	# )
z2
Display general status of the YubiKey OTP slots.
zSlot 1: Z
programmedZemptyzSlot 2: rO   zFIPS Approved Mode: ZYesZNoN)rT   get_config_stater?   r   ZONEZTWOr@   echor$   rK   r   )r+   sessionstateZslot1Zslot2s   &    r-   rO   rO      s     3G$$&E)E)E	JJ%00L;;G<=>	JJ%00L;;G<=>3776?##

)?73K3K%QU)VWX $r/   c                s    \        V 4      pV'       g   \        P                  ! RRRR7        VP                  4        \        P                  ! R4       R#   \
         d    \        \        4      hi ; i)z$
Swaps the two slot configurations.
z"Swap the two slots of the YubiKey?Tr>   zSlots swapped.N)rT   r@   rA   Z
swap_slotsrV   r   r   _WRITE_FAIL_MSG)r+   forcerW   rL   r-   swapr[     s^     3G0	
'

#$ 'o&&'s   &A A1z-pz--prefixz.added before the NDEF payload, typically a URI)r<   z-tz--ndef-typeZURIzNDEF payload type)r8   r:   r;   r<   c                sf   V P                   R,          p\        V 4      pVP                  4       pVP                  \        P
                  4      '       g   \        R4      hVP                  V4      '       g   \        RV R24      h VP                  WV P                   R,          V4       \        P                  VP                  P                  \        P
                  ,          9  d   \        P                  R4       \        P                   ! R4       R#   \"         d    \        \$        4      hi ; i)	z
Configure a slot to be used over NDEF (NFC).


If "--prefix" is not specified, a default value will be used, based on the type:
- For URI the default value is: "https://my.yubico.com/yk/#"
- For TEXT the default is an empty string
rO   z"This YubiKey does not support NFC.r=   z
 is empty.r1   zBNDEF is currently disabled. Enable using 'ykman config nfc -e otp'zNDEF configuration updated.N)rK   rT   rU   Zhas_transportr   NFCr   r?   Zset_ndef_configurationr
   ZOTPZconfigZenabled_capabilitiesrQ   rR   r@   rV   r   rY   )r+   r4   ZprefixZ	ndef_typerO   rW   rX   s   &&&&   r-   ndefr]     s    * 776?D3G$$&Eimm,,:;;t$$dV:.//	'&&tSWW]5KYW>>!A!A)--!PPNNT 	

01 'o&&'s   BD D0c                s   \        V 4      pVP                  4       pV'       g#   VP                  V4      '       g   \        R4      hV'       g   \        P
                  ! RV R2RRR7        VP                  WP                  R,          4       \        P                  ! RV R24       R	#   \         d    \        \        4      hi ; i)
z-
Deletes the configuration stored in a slot.
z%Not possible to delete an empty slot.z7Do you really want to delete the configuration of slot ?Tr>   r1   zConfiguration slot z	 deleted.N)rT   rU   r?   r   r@   rA   Zdelete_slotrK   rV   r   rY   )r+   r4   rZ   rW   rX   s   &&&  r-   deleter_   F  s     3G$$&E,,T22=>>EdV1M	

'D''-"89

(i89 'o&&'s   ,<B* *Cz-Pz--public-idzpublic identifier prefixZMODHEX)rE   r<   rF   z--private-idz6 byte private identifier)rE   rF   r9   r<   z-kz--keyz16 byte secret keyz-Sz--serial-public-idzGuse YubiKey serial number as public ID (can't be used with --public-id))is_flagrE   r<   z-gz--generate-private-idz>generate a random private ID (can't be used with --private-id)z-Gz--generate-keyz7generate a random secret key (can't be used with --key)z-uz--upload)r`   rE   Zhiddenz-Oz--config-outputZazGfile to output the configuration to (existing file will be appended to))r8   rE   r<   c                s   \        V 4      pRpV
'       d   \        R4      hV'       d   V'       d   \        R4      hV'       d   V'       d   \        R4      hV'       d   V	'       d   \        R4      hV'       gy   V'       dS    VP                  4       p\	        R\
        P                  ! RT4      ,           4      p\        P                  ! R	T 24       MV'       d   \        R
4      h\        R4      p\        V4      ^,          '       d   \        R4      h \        V4      pT'       gz   T'       d?   \        P                  ! ^4      p\        P                  ! RTP!                  4        24       M3T'       d   \        R4      h\        R4      p\"        P%                  T4      pT'       gz   T	'       d?   \        P                  ! ^4      p\        P                  ! RTP!                  4        24       M3T'       d   \        R4      h\        R4      p\"        P%                  T4      pT'       g   \        P&                  ! RT R2RRR7       T P(                  R,          p TP+                  T\-        YT4      P/                  T4      TT4       T'       d_   T;'       g    TP                  4       p\3        YY4T4      pTP5                  TR,           4       \7        R\9        T4       2\:        T4       R# R#   \         d    \        R4      hi ; i  \         d    \        R\         R24      hi ; i  \         d    \        \0        4      hi ; i)z"
Program a Yubico OTP credential.
NzAutomated YubiCloud upload support has been ended. You can manually upload a credential by saving it as a CSV file (use -O/--config-output) and then submitting it to https://upload.yubico.com.z?Invalid options: --public-id conflicts with --serial-public-id.zBInvalid options: --private-id conflicts with --generate-public-id.z5Invalid options: --key conflicts with --generate-key.z2Serial number not set, public ID must be provided.s    s   >Iz#Using YubiKey serial as public ID: zgPublic ID not given. Remove the --force flag, or add the --serial-public-id flag or --public-id option.zEnter public IDz2Invalid public ID, length must be a multiple of 2.z#Invalid public ID, must be modhex (z).z'Using a randomly generated private ID: zlPrivate ID not given. Remove the --force flag, or add the --generate-private-id flag or --private-id option.zEnter private IDz'Using a randomly generated secret key: z^Secret key not given. Remove the --force flag, or add the --generate-key flag or --key option.zEnter secret keyz%Program a YubiOTP credential in slot r^   Tr>   r1   Z
z$Configuration parameters written to )rT   r   
get_serialr   r   structZpackr@   rV   r#   r)   r   r*   r   osurandomhexr'   r(   rA   rK   put_configurationr   	append_crrY   r   Zwriter%   rD   rQ   )r+   r4   Z	public_idZ
private_idkeyenterrZ   Zserial_public_idZgenerate_private_idZgenerate_keyZuploadZconfig_outputrW   ZserialZpublic_id_bytesr1   Zcsvs   &&&&&&&&&&&&     r-   yubiotprj   _  s   b 3GF)
 	
 %WXX)P
 	
 |MNNT ++- &kFKKv4N&NOIJJ<YKHII 
 %%67I
9~JKKQ'	2 AJJJ@AQ@RSTM 
 &&89Jz2J**R.CJJ@LM? 
 12C--$C3D6;4T	
 ''-(K'!!$_#FPPQVW		
 //7--/*;OC$J'26-3H2IJ	
	 }   TRSST"  Q;O;LBOPPQT  'o&&'s$   K1 L -L- 1LL*-Mpassword)rE   z
--generatezgenerate a random password)r`   r<   z-lz--lengthZLENGTHzlength of generated password)rF   r8   r:   r;   r<   z--keyboard-layoutz.keyboard layout to use for the static passwordc                sn   \        V 4      pV'       d   \        V4      ^&8  d   \        R4      hV'       d   V'       g   \        R4      hV'       g   V'       g   \        R4      pMV'       g   V'       d   \	        WE4      p\        W%4      p	V'       g   \        VP                  4       V4        VP                  V\        V	4      P                  V4      V P                  R,          V P                  R,          4       \        P                  ! RV R24       R#   \         d    \        \        4      hi ; i)a
  
Configure a static password.

To avoid problems with different keyboard layouts, the following characters
(upper and lower case) are allowed by default: cbdefghijklnrtuv

Use the --keyboard-layout option to allow more characters based on
preferred keyboard layout.
z4Password too long (maximum length is 38 characters).z,Provide a length for the generated password.zEnter a static passwordr1   zStatic password stored in slot .N)rT   r)   r   r#   r   r   rB   rU   rf   r   rg   rK   r@   rV   r   rY   )
r+   r4   rk   generater,   Zkeyboard_layoutri   rZ   rW   Z
scan_codess
   &&&&&&&&  r-   staticrn     s    F 3GCMB&LMMDEEH 9:(%f>2J 8 8 :DA	'!!+J7AA%HGGM"GGM"		
 	

4TF!<= 'o&&'s   /A(D D4rh   z--touchz3require touch on the YubiKey to generate a responsez-Tz--totpzAuse a base32 encoded key (optionally padded) for TOTP credentialsz>generate a random secret key (can't be used with KEY argument)c                s   \        V 4      pV'       d4   V'       d   \        R4      hV'       d   \        V4      pM\        V4      pMV'       d   V'       g   \        R4      hV'       dz   \        P
                  ! ^4      pV'       d4   \        V4      P                  4       p\        P                  ! RV 24       M_\        P                  ! RVP                  4        24       M7V'       d    \        R4      p \        V4      pM\        R4      p\        V4      pV'       d   R	MR
p
V'       g!   \        P                  ! RV
 RV R2RRR7        VP                  V\        V4      P!                  V4      V P"                  R,          V P"                  R,          4       \        P                  ! V
 RV R24       R#   \         d"   p	\        P                  ! T	4        Rp	?	K  Rp	?	ii ; i  \$         d    \        \&        4      hi ; i)z
Program a challenge-response credential.

If KEY is not given, an interactive prompt will ask for it.


KEY     a key given in hex (or base32, if --totp is specified)
z8Invalid options: --generate conflicts with KEY argument.z^No secret key given. Remove the --force flag, set the KEY argument or set the --generate flag.z)Using a randomly generated key (base32): z&Using a randomly generated key (hex): TEnter a secret key (base32)NzEnter a secret keyZTOTPzchallenge-responsez
Program a z credential in slot r^   r>   r1   z credential stored in slot rl   )rT   r   r   r   rc   rd   r    Zdecoder@   rV   re   r#   rJ   rA   rf   r   Zrequire_touchrK   r   rY   )r+   r4   rh   totpZtouchrZ   rm   rW   Zb32keyr2   Z	cred_types   &&&&&&&    r-   chalresprq   R  s   D 3G
TUU$C %CC  **R.C"3..0

FvhOP

CCGGI;OP"#@A"',C 34C %C$8I#7vQ?	

	'!!%c*88?GGM"GGM"		
 	

i[ ;D6CD) ! "JJqMM"*  'o&&'s%   8F; A*G* ;G'G""G'*H	challengezBgenerate a TOTP code, use the current time if challenge is omittedz-dz--digitsZ6Z8zEnumber of digits in generated TOTP code, ignored unless --totp is setc                sZ  a
 V P                   R,          pVP                  \        P                  8X  d   \	        V \
        .4      pM\	        V \        .4      pV'       g   V'       g   \        R4      pVP                  4       P                  V4      '       g   \        R4      hV'       d8   Vf   \        \        \        4       4      4      pM+ \        \        V4      4      pM\"        P%                  V4      p \'        4       pV
3R lo
VP)                  WVS
4      pV'       d   \+        V\        V4      4      p	MVP-                  4       p	\.        P0                  ! V	4       R#   \         d"    \        P!                  R4       \        R4      hi ; i  \2         d    \        \4        4      hi ; i)z
Perform a challenge-response operation.

Send a challenge (in hex) to a YubiKey slot with a challenge-response
credential, and read the response. Supports output as a OATH-TOTP code.
rN   zEnter a challenge (hex)z3Cannot perform challenge-response on an empty slot.NzError parsing challengez0Timestamp challenge for TOTP must be an integer.c                 sp   < \        SR 4      '       g#   V ^8X  d   \        4        \        SR R4       R# R# R# )ZpromptedTN)Zhasattrr&   Zsetattr)Zstatuson_keepalives   &r-   rs   Zcalculate.<locals>.on_keepalive  s1    <441 "j$7 :E4r/   )rK   Z	transportr   r\   rT   r	   r   r#   rU   r?   r   r   r6   r   rJ   rQ   Z	exceptionr'   r(   r   Zcalculate_hmac_sha1r   re   r@   rV   r   rY   )r+   r4   rr   rp   digitsrS   rW   ZeventZresponsevaluers   s   &&&&&     @r-   	calculaterv     sR   2 ''(
C
}}	%s%8$9: s]O4T !:;	 ##%33D99KLL&s46{3IR*3y>:	
 MM),	'	8
 ..t|T$Xs6{;ELLNE

5)  R  !:;PQQR*  'o&&'s   E  7A'F  ,FF*c                 s     R \        V 4      3#   \         dA     \        T 4       R\        P	                  T 4      3u #   \         d    \        R4      hi ; ii ; i)TFzvalue must be modhex or decimal)r   r*   r6   r'   r(   )ru   rC   r-   parse_modhex_or_bcdrw     sg    @]5))) @	@J%--... 	@>??	@	@s    A!?AAA)r9   rE   z"number of digits in generated codez-cz	--counterzinitial counter value)r8   r:   r<   z-iz--identifierztoken identifierc                s   \        V 4      pRp	Rp
V'       Ed   VR8X  d   Rp\        V4      ^8X  d   WXP                  4       R ,          pM\        V4      ^8X  d
   RV,           p\        V4      ^8w  d   \        R4      h\	        VR,          4      w  r\	        VR,          4      w  r\	        VR,          4      w  ppV'       d   V'       g   \        R	4      hV'       d   V'       d	   V'       g   \        R
4      hW,           V,           pV'       d   R;rMV'       d   Rp
MV'       d   Rp	MRpV'       g    \        R4      p \        V4      p V'       g   \        P                  ! RV R2RRR7        VP                  V\        V4      P                  V4      P                  VW4      P                  \!        V4      ^8H  4      P#                  V4      V P$                  R,          V P$                  R,          4       \        P                  ! RV R24       R#   \         d#   p\        P                  ! T4        Rp?EK  Rp?ii ; i  \&         d    \)        \*        4      hi ; i)a  
Program an HMAC-SHA1 OATH-HOTP credential.

The YubiKey can be configured to output an OATH Token Identifier as a prefix
to the OTP itself, which consists of OMP+TT+MUI. Using the "--identifier" option,
you may specify the OMP+TT as 4 characters, the MUI as 8 characters, or the full
OMP+TT+MUI as 12 characters. If omitted, a default value of "ubhe" will be used for
OMP+TT, and the YubiKey serial number will be used as MUI.
FrG   ZubheZ08z&Incorrect length for token identifier.:N   N:rx   rP   N:rP   NNz0TT can only be modhex encoded if OMP is as well.z9MUI can only be modhex encoded if OMP and TT are as well.Tr/   ro   Nz"Program a HOTP credential in slot r^   r>   r1   zHOTP credential stored in slot rl   )rT   r)   ra   r*   rw   r#   r   rJ   r@   rV   rA   rf   r   Zimftoken_idZdigits8r6   rg   rK   r   r   rY   )r+   r4   rh   rt   ZcounterZ
identifierri   rZ   rW   Zmh1Zmh2Zomp_mZompZtt_mZttZmui_mZmuiry   r2   s   &&&&&&&&           r-   hotprz     s   4 3G
C
CzJz?a//1"56J_!*,Jz?b EFF(B8
&z#7(B8
sOPP%DK  8c>C#CC<=C#C( 0a8$	
'!!!#&S\Xh)WS[A%&YuGGM"GGM"		
 	

4TF!<=%  

1&  'o&&'s%   H 4B"I I#I  II#z-Az--new-access-codezHa new 6 byte access code to set (use "-" as a value to prompt for input))rF   rE   r<   z--delete-access-codez remove access code from the slotz--pacing0zJthrottle output speed by adding a delay (in ms) between characters emittedz--use-numeric-keypadzVuse scancodes for numeric keypad when sending digits (helps for some keyboard layouts)z--serial-usb-visiblez4make the serial number visible in the USB descriptorc	                s   \        V 4      p	V'       d   V'       d   \        R4      hV'       d%   V P                  R,          '       g   \        R4      hV	P                  4       P	                  V4      '       g   \        R4      hVf   V'       g   V P                  R,          pMhVR8X  d   \        RRRR	7      p \        V4      pT P                  R,          P                  '       d%   \        \        T4      4      ^8  d   \        R4      hV'       g   \        P                  ! RV R2RRR7       \        T;'       g    R4      ^,          p\        V^,          4      p\        V^,          4      p V	P!                  V\#        4       P%                  V4      P'                  V4      P)                  W4      P+                  V4      VV P                  R,          4       \        P,                  ! RV R24       R#   \         d!   p
\        R
\        T
4      ,           4      hRp
?
ii ; i  \.         d    \        \0        4      hi ; i)z
Update the settings for a slot.

Change the settings for a slot without changing the stored secret.
All settings not specified will be written with default values.
z6--new-access-code conflicts with --delete-access-code.r1   zb--delete-access-code used without providing an access code (see "ykman otp --help" for more info).z1Not possible to update settings on an empty slot.NrG   zEnter new access codeT)rH   Zconfirmation_promptrI   rO   z1Access code does not meet complexity requirement.zUpdate the settings for slot z,? All existing settings will be overwritten.r>   r{   zSettings for slot z	 updated.)rT   r   rK   rU   r?   r#   r3   rJ   ZstrZpin_complexityr)   Zsetr@   rA   r6   ZboolZupdate_configurationr   rg   Zuse_numericpacingserial_usb_visiblerV   r   rY   )r+   r4   Znew_access_codeZdelete_access_coderi   r|   Zuse_numeric_keypadr}   rZ   rW   r2   Zpacing_bitsZpacing_10msZpacing_20mss   &&&&&&&&&     r-   settingsr~   R  s   f 3G-NOO#''-"8"86
 	

 ##%33D99IJJ!!ggm4Oc!*'DdO	D3ODO 776?)))c#o2F.G!.KMNN+D6 29 9		
 fmm$*K{Q'K{Q'K'$$!Yu[+,VK- 23GGM"		
 	

'vY789  	D9CFBCC	D:  'o&&'s%   9G6 1BH$ 6H!HH!$H?r5   )r{   Z20Z40Z60)SZloggingrc   rb   Zbase64r    Z	threadingr   r   r@   Zyubikit.corer   r   Zyubikit.core.otpr   r   r   r   Zyubikit.core.smartcardr	   Zyubikit.managementr
   Zyubikit.yubiotpr   r   r   r   r   r   r   r   rM   r   r   r   r   r   r   r   Z	scancodesr   r   Zutilr   r   r   r   r    r!   r"   r#   r$   r%   r&   Z	getLoggerZ__name__rQ   r0   r3   ZargumentZChoiceZclick_slot_argumentZoptionZclick_enter_optionrY   rB   rD   Zpass_contextrT   ZcommandrO   r[   r]   r_   ZFilerj   ZIntRangern   rq   rv   rw   r6   rz   r~   ) r/   r-   <module>r      sX  8  	      0  7 )	 	 	   0    
		8	$ nn
sCj)4P  \\	4	 E 
' -)<=>	F	:)   ?:)z"J Y  Y  '   '& dJ%UV	I		' W   '< '    '* 	# q\	$ r]	 	R 	I 	B  	C	R r
     ~r
j 
U+dL$5QR	2		' 	O	$	9 $'    S ,  0$'N &	>	 	L 	I ;'   '  2;'| e,	M	 	sCj	!	P 1'  -  $1'h@  3eD	sCj	!	- dKc1;RSdN);<E'    = T E   E'P 	S D/Q 	-	.	U 
( 	?
H'     DH'r/   