Challenge made from random string in HMAC authentication.

This commit is contained in:
Ondrej Mikle 2014-07-23 13:16:15 +02:00
parent b281c7a0bc
commit d4eff7da3a

View file

@ -1,3 +1,4 @@
import os
import sqlite3
import hmac
import hashlib
@ -110,7 +111,7 @@ class YubikeyHMACAuthenthicator(object):
nick = record[0]
secretKey = record[1].decode("hex")
challenge = 'Sample #2'
challenge = os.urandom(32)
# Select HMAC-SHA1 on slot 2 from Yubikey
apdusHex = [