Yubico / python-yubico

Python code to talk to YubiKeys
https://developers.yubico.com/python-yubico/
BSD 2-Clause "Simplified" License
229 stars 33 forks source link

OTP challenge-response fails with timeout #34

Closed ghost closed 8 years ago

ghost commented 8 years ago

The following program fails with a timeout with my recently bought Yubikey 4. HMAC-SHA1 challenge-response works fine.

import sys
import yubico

# Look for and initialize the YubiKey
try:
    YK = yubico.find_yubikey()
    # Do challenge-response
    secret = b'Sample'
    print("Sending challenge : %s\n" % repr(secret))

    response = YK.challenge_response(secret, mode="OTP", slot=1)
except yubico.yubico_exception.YubicoError as inst:
    print("ERROR: %s" % inst.reason)
    sys.exit(1)

print("Response :\n%s\n" % yubico.yubico_util.hexdump(response))
ghost commented 8 years ago

Nevermind, it's actually an issue with the configuration tool, which showed only "HMAC-SHA1" until I upgraded it.