PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  Uc@sdZddddddgZddlmZdd lZd ejfd YZdefd YZd efdYZdddYZ dddYZ ddl m Z m Z ddlmZmZeddZd S(s+ module for accessing a YubiKey In an attempt to support any future versions of the YubiKey which might not be USB HID devices, you should always use the yubikey.find_key() (or better yet, yubico.find_yubikey()) function to initialize communication with YubiKeys. Example usage (if using this module directly, see base module yubico) : import yubico.yubikey try: YK = yubico.yubikey.find_key() print "Version : %s " % YK.version() except yubico.yubico_exception.YubicoError as inst: print "ERROR: %s" % inst.reason tRESP_TIMEOUT_WAIT_FLAGtRESP_PENDING_FLAGtSLOT_WRITE_FLAGtfind_keytYubiKeytYubiKeyTimeouti(t __version__Nt YubiKeyErrorcBseZdZddZRS(su Exception raised concerning YubiKey operations. Attributes: reason -- explanation of the error s no detailscCstjj||dS(N(tyubico_exceptiont YubicoErrort__init__(tselftreason((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyR ,s(t__name__t __module__t__doc__R (((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyR%scBseZdZddZRS(sz Exception raised when a YubiKey operation timed out. Attributes: reason -- explanation of the error s no detailscCstj||dS(N(RR (R R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyR 6s(R RRR (((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyR/stYubiKeyVersionErrorcBseZdZddZRS(s Exception raised when the YubiKey is not capable of something requested. Attributes: reason -- explanation of the error s no detailscCstj||dS(N(RR (R R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyR @s(R RRR (((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyR9stYubiKeyCapabilitiescBseZdZdZdZdZeZddddZ dZ dZ dZ dZ dZd Zd Zd Zd Zd ZdZdZRS(s Class expressing the functionality of a YubiKey. This base class should be the superset of all sub-classes. In this base class, we lie and say 'yes' to all capabilities. If the base class is used (such as when creating a YubiKeyConfig() before getting a YubiKey()), errors must be handled at runtime (or later, when the user is unable to use the YubiKey). tUnknownicCse||_|dk r!||_n|dk ra||_|\}}}|d>|d>B|B|_ndS(Nii(tmodeltNonetdefault_answertversiont version_num(R RRRtmajortminortbuild((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyR Vs     cCs2d|jjtt||j|j|jfS(Ns/<%s instance at %s: Device %s %s (default: %s)>(t __class__R thextidRRR(R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyt__repr__as  cCs|jS(N(R(R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pythave_yubico_OTPjscCs|jS(N(R(R tmode((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyt have_OATHmscCs|jS(N(R(R R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pythave_challenge_responsepscCs|jS(N(R(R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pythave_serial_numbersscCs|jS(N(R(R tflag((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pythave_ticket_flagvscCs|jS(N(R(R R$((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pythave_config_flagyscCs|jS(N(R(R R$((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pythave_extended_flag|scCs|jS(N(R(R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pythave_extended_scan_code_modescCs|jS(N(R(R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pythave_shifted_1_modescCs|jS(N(R(R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyt have_nfc_ndefscCs|jS(N(R(R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pythave_configuration_slots(iiiN(R RRRRRtTrueRRR RRR!R"R#R%R&R'R(R)R*R+(((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyRDs$           cBsbeZdZd Zd Zd dZdZedZ ddeedZ dZ dZ RS( s+ Base class for accessing YubiKeys cCs7||_|dkr*tdt|_n ||_dS(NR(tdebugRRtFalset capabilities(R R-R/((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyR s    cCsdS(s2 Get the connected YubiKey's version as a string. N((R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyRscCsdS(s Get the connected YubiKey's serial number. Note that since version 2.?.? this requires the YubiKey to be configured with the extended flag SERIAL_API_VISIBLE. If the YubiKey is configured with SERIAL_BTN_VISIBLE set to True, it will start blinking and require a button press before revealing the serial number, with a 15 seconds timeout. Set `may_block' to False to abort if this is the case. N((R t may_block((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pytserials tHMACicCsdS(s Get the response to a challenge from a connected YubiKey. `mode' is either 'HMAC' or 'OTP'. `slot' is 1 or 2. `variable' is only relevant for mode == HMAC. If variable is True, challenge will be padded such that the YubiKey will compute the HMAC as if there were no padding. If variable is False, challenge will always be NULL-padded to 64 bytes. The special case of no input will be HMACed by the YubiKey (in variable HMAC mode) as data = 0x00, length = 1. In mode 'OTP', the challenge should be exactly 6 bytes. The response will be a YubiKey "ticket" with the 6-byte challenge in the ticket.uid field. The rest of the "ticket" will contain timestamp and counter information, so two identical challenges will NOT result in the same responses. The response is decryptable using AES ECB if you have access to the AES key programmed into the YubiKey. N((R t challengeR tslottvariableR0((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyR3scCsdS(sQ Return a YubiKey configuration object for this type of YubiKey. N((R ((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyt init_configscCsdS(sC Configure a YubiKey using a configuration object. N((R tcfgR4((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyt write_configsN( R RRRR-R/R RR,R1R3R6R8(((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyRs    (t YubiKeyUSBHIDtYubiKeyUSBHIDError(tYubiKeyNEO_USBHIDtYubiKeyNEO_USBHIDErroricCsytd|d|}|jd kr||jd kr|td|d|}|j|jkrm|Stdn|SWn7tk r}dt|krtd qnXd S( s Locate a connected YubiKey. Throws an exception if none is found. This function is supposed to be possible to extend if any other YubiKeys appear in the future. Attributes : skip -- number of YubiKeys to skip debug -- True or False R-tskipiiii s-Found YubiKey NEO BETA, but failed on rescan.sNo USB YubiKey foundsNo YubiKey foundN(iii(iii (R9RR;RR:tstr(R-R=tYKtYK2tinst((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyRs (((Rt__all__tyubicoRRR RRRRRtyubikey_usb_hidR9R:tyubikey_neo_usb_hidR;R<R.R(((s2/usr/lib/python2.7/site-packages/yubico/yubikey.pyts      GK