Closed pauldokas closed 10 years ago
I applied this patch and runned the test with setup.py test >/tmp/log
diff --git a/oath/_ocra.py b/oath/_ocra.py
index 1b80851..8932208 100644
--- a/oath/_ocra.py
+++ b/oath/_ocra.py
@@ -261,6 +261,9 @@ class OcraSuite(object):
def __call__(self, key, **kwargs):
data_input = self.ocrasuite_description + '\0' \
+ self.data_input(**kwargs)
+ import sys
+ print 'key', key, 'kwargs', kwargs
+ print 'data_input', data_input.encode('hex')
return self.crypto_function(key, data_input)
def accept(self, response, key, **kwargs):
It gave this result on Linux (tests pass), could you do the same so that we can diff and see what differ between Linux and FreeBSD/OSX ?
key 12345678901234567890123456789012 kwargs {'Qsc': 'CLI22220SRV11110'}
data_input 4f4352412d313a484f54502d5348413235362d383a5141303800434c493232323230535256313131313000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'CLI22220SRV11110'}
data_input 4f4352412d313a484f54502d5348413235362d383a5141303800434c493232323230535256313131313000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'SRV11110CLI22220'}
data_input 4f4352412d313a484f54502d5348413235362d383a51413038005352563131313130434c49323232323000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'SRV11110CLI22220'}
data_input 4f4352412d313a484f54502d5348413235362d383a51413038005352563131313130434c49323232323000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'CLI22221SRV11111'}
data_input 4f4352412d313a484f54502d5348413235362d383a5141303800434c493232323231535256313131313100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'CLI22221SRV11111'}
data_input 4f4352412d313a484f54502d5348413235362d383a5141303800434c493232323231535256313131313100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'SRV11111CLI22221'}
data_input 4f4352412d313a484f54502d5348413235362d383a51413038005352563131313131434c49323232323100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'SRV11111CLI22221'}
data_input 4f4352412d313a484f54502d5348413235362d383a51413038005352563131313131434c49323232323100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'CLI22222SRV11112'}
data_input 4f4352412d313a484f54502d5348413235362d383a5141303800434c493232323232535256313131313200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'CLI22222SRV11112'}
data_input 4f4352412d313a484f54502d5348413235362d383a5141303800434c493232323232535256313131313200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'SRV11112CLI22222'}
data_input 4f4352412d313a484f54502d5348413235362d383a51413038005352563131313132434c49323232323200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'SRV11112CLI22222'}
data_input 4f4352412d313a484f54502d5348413235362d383a51413038005352563131313132434c49323232323200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'CLI22223SRV11113'}
data_input 4f4352412d313a484f54502d5348413235362d383a5141303800434c493232323233535256313131313300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'CLI22223SRV11113'}
data_input 4f4352412d313a484f54502d5348413235362d383a5141303800434c493232323233535256313131313300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'SRV11113CLI22223'}
data_input 4f4352412d313a484f54502d5348413235362d383a51413038005352563131313133434c49323232323300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'SRV11113CLI22223'}
data_input 4f4352412d313a484f54502d5348413235362d383a51413038005352563131313133434c49323232323300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'CLI22224SRV11114'}
data_input 4f4352412d313a484f54502d5348413235362d383a5141303800434c493232323234535256313131313400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'CLI22224SRV11114'}
data_input 4f4352412d313a484f54502d5348413235362d383a5141303800434c493232323234535256313131313400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'SRV11114CLI22224'}
data_input 4f4352412d313a484f54502d5348413235362d383a51413038005352563131313134434c49323232323400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'SRV11114CLI22224'}
data_input 4f4352412d313a484f54502d5348413235362d383a51413038005352563131313134434c49323232323400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'CLI22220SRV11110'}
data_input 4f4352412d313a484f54502d5348413531322d383a5141303800434c493232323230535256313131313000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'CLI22220SRV11110'}
data_input 4f4352412d313a484f54502d5348413531322d383a5141303800434c493232323230535256313131313000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'SRV11110CLI22220', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413531322d383a514130382d5053484131005352563131313130434c493232323230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'SRV11110CLI22220', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413531322d383a514130382d5053484131005352563131313130434c493232323230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'CLI22221SRV11111'}
data_input 4f4352412d313a484f54502d5348413531322d383a5141303800434c493232323231535256313131313100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'CLI22221SRV11111'}
data_input 4f4352412d313a484f54502d5348413531322d383a5141303800434c493232323231535256313131313100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'SRV11111CLI22221', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413531322d383a514130382d5053484131005352563131313131434c493232323231000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'SRV11111CLI22221', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413531322d383a514130382d5053484131005352563131313131434c493232323231000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'CLI22222SRV11112'}
data_input 4f4352412d313a484f54502d5348413531322d383a5141303800434c493232323232535256313131313200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'CLI22222SRV11112'}
data_input 4f4352412d313a484f54502d5348413531322d383a5141303800434c493232323232535256313131313200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'SRV11112CLI22222', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413531322d383a514130382d5053484131005352563131313132434c493232323232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'SRV11112CLI22222', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413531322d383a514130382d5053484131005352563131313132434c493232323232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'CLI22223SRV11113'}
data_input 4f4352412d313a484f54502d5348413531322d383a5141303800434c493232323233535256313131313300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'CLI22223SRV11113'}
data_input 4f4352412d313a484f54502d5348413531322d383a5141303800434c493232323233535256313131313300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'SRV11113CLI22223', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413531322d383a514130382d5053484131005352563131313133434c493232323233000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'SRV11113CLI22223', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413531322d383a514130382d5053484131005352563131313133434c493232323233000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'CLI22224SRV11114'}
data_input 4f4352412d313a484f54502d5348413531322d383a5141303800434c493232323234535256313131313400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'CLI22224SRV11114'}
data_input 4f4352412d313a484f54502d5348413531322d383a5141303800434c493232323234535256313131313400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'SRV11114CLI22224', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413531322d383a514130382d5053484131005352563131313134434c493232323234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Qsc': 'SRV11114CLI22224', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413531322d383a514130382d5053484131005352563131313134434c493232323234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Qsc': '428p0Ld6YSnzksLs'}
data_input 4f4352412d313a484f54502d5348413235362d383a514130380034323870304c643659536e7a6b734c7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': '428p0Ld6YSnzksLs'}
data_input 4f4352412d313a484f54502d5348413235362d383a514130380034323870304c643659536e7a6b734c7300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'YSnzksLs428p0Ld6'}
data_input 4f4352412d313a484f54502d5348413235362d383a514130380059536e7a6b734c7334323870304c643600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Qsc': 'YSnzksLs428p0Ld6'}
data_input 4f4352412d313a484f54502d5348413235362d383a514130380059536e7a6b734c7334323870304c643600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890 kwargs {'Q': '00000000'}
data_input 4f4352412d313a484f54502d534841312d363a514e3038000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890 kwargs {'Q': '11111111'}
data_input 4f4352412d313a484f54502d534841312d363a514e303800a98ac70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890 kwargs {'Q': '22222222'}
data_input 4f4352412d313a484f54502d534841312d363a514e303800153158e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890 kwargs {'Q': '33333333'}
data_input 4f4352412d313a484f54502d534841312d363a514e3038001fca055000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890 kwargs {'Q': '44444444'}
data_input 4f4352412d313a484f54502d534841312d363a514e3038002a62b1c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890 kwargs {'Q': '55555555'}
data_input 4f4352412d313a484f54502d534841312d363a514e30380034fb5e3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890 kwargs {'Q': '66666666'}
data_input 4f4352412d313a484f54502d534841312d363a514e3038003f940aa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890 kwargs {'Q': '77777777'}
data_input 4f4352412d313a484f54502d534841312d363a514e3038004a2cb71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890 kwargs {'Q': '88888888'}
data_input 4f4352412d313a484f54502d534841312d363a514e30380054c5638000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890 kwargs {'Q': '99999999'}
data_input 4f4352412d313a484f54502d534841312d363a514e3038005f5e0ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 12345678901234567890123456789012 kwargs {'Q': '12345678', 'P': '1234', 'C': 0}
data_input 4f4352412d313a484f54502d5348413235362d383a432d514e30382d5053484131000000000000000000bc614e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '12345678', 'P': '1234', 'C': 1}
data_input 4f4352412d313a484f54502d5348413235362d383a432d514e30382d5053484131000000000000000001bc614e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '12345678', 'P': '1234', 'C': 2}
data_input 4f4352412d313a484f54502d5348413235362d383a432d514e30382d5053484131000000000000000002bc614e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '12345678', 'P': '1234', 'C': 3}
data_input 4f4352412d313a484f54502d5348413235362d383a432d514e30382d5053484131000000000000000003bc614e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '12345678', 'P': '1234', 'C': 4}
data_input 4f4352412d313a484f54502d5348413235362d383a432d514e30382d5053484131000000000000000004bc614e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '12345678', 'P': '1234', 'C': 5}
data_input 4f4352412d313a484f54502d5348413235362d383a432d514e30382d5053484131000000000000000005bc614e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '12345678', 'P': '1234', 'C': 6}
data_input 4f4352412d313a484f54502d5348413235362d383a432d514e30382d5053484131000000000000000006bc614e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '12345678', 'P': '1234', 'C': 7}
data_input 4f4352412d313a484f54502d5348413235362d383a432d514e30382d5053484131000000000000000007bc614e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '12345678', 'P': '1234', 'C': 8}
data_input 4f4352412d313a484f54502d5348413235362d383a432d514e30382d5053484131000000000000000008bc614e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '12345678', 'P': '1234', 'C': 9}
data_input 4f4352412d313a484f54502d5348413235362d383a432d514e30382d5053484131000000000000000009bc614e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '00000000', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413235362d383a514e30382d50534841310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '11111111', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413235362d383a514e30382d505348413100a98ac700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '22222222', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413235362d383a514e30382d505348413100153158e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '33333333', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413235362d383a514e30382d5053484131001fca0550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 12345678901234567890123456789012 kwargs {'Q': '44444444', 'P': '1234'}
data_input 4f4352412d313a484f54502d5348413235362d383a514e30382d5053484131002a62b1c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007110eda4d09e062aa5e4a390b0a572ac0d2c0220
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '00000000', 'C': '00000'}
data_input 4f4352412d313a484f54502d5348413531322d383a432d514e30380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '11111111', 'C': '00001'}
data_input 4f4352412d313a484f54502d5348413531322d383a432d514e3038000000000000000001a98ac70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '22222222', 'C': '00002'}
data_input 4f4352412d313a484f54502d5348413531322d383a432d514e3038000000000000000002153158e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '33333333', 'C': '00003'}
data_input 4f4352412d313a484f54502d5348413531322d383a432d514e30380000000000000000031fca055000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '44444444', 'C': '00004'}
data_input 4f4352412d313a484f54502d5348413531322d383a432d514e30380000000000000000042a62b1c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '55555555', 'C': '00005'}
data_input 4f4352412d313a484f54502d5348413531322d383a432d514e303800000000000000000534fb5e3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '66666666', 'C': '00006'}
data_input 4f4352412d313a484f54502d5348413531322d383a432d514e30380000000000000000063f940aa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '77777777', 'C': '00007'}
data_input 4f4352412d313a484f54502d5348413531322d383a432d514e30380000000000000000074a2cb71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '88888888', 'C': '00008'}
data_input 4f4352412d313a484f54502d5348413531322d383a432d514e303800000000000000000854c5638000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '99999999', 'C': '00009'}
data_input 4f4352412d313a484f54502d5348413531322d383a432d514e30380000000000000000095f5e0ff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '00000000', 'T_precomputed': 20107446}
data_input 4f4352412d313a484f54502d5348413531322d383a514e30382d54314d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000132d0b6
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '11111111', 'T_precomputed': 20107446}
data_input 4f4352412d313a484f54502d5348413531322d383a514e30382d54314d00a98ac70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000132d0b6
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '22222222', 'T_precomputed': 20107446}
data_input 4f4352412d313a484f54502d5348413531322d383a514e30382d54314d00153158e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000132d0b6
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '33333333', 'T_precomputed': 20107446}
data_input 4f4352412d313a484f54502d5348413531322d383a514e30382d54314d001fca055000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000132d0b6
key 1234567890123456789012345678901234567890123456789012345678901234 kwargs {'Q': '44444444', 'T_precomputed': 20107446}
data_input 4f4352412d313a484f54502d5348413531322d383a514e30382d54314d002a62b1c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000132d0b6
Also could you test to see if it worked before commit 5a2646b8b28e37bb604d818fe17e615b7164070a ?
Last question: what's the version of the python interpreter on your system ?
Commit 5a2646b does appear to be the problem. I get the test errors in 5a2646b, but not in f2bfde5 which is the commit immediately before 5a2646b.
Also, I'm using python 2.7.8
The following patch fixes the tests:
diff --git a/oath/_hotp.py b/oath/_hotp.py index 6e3ac99..a4042c2 100644 --- a/oath/_hotp.py +++ b/oath/_hotp.py @@ -22,7 +22,7 @@ See also http://tools.ietf.org/html/rfc4226 all = ( 'hotp', 'accept_hotp' )
def truncated_value(h):
% python ./setup.py test running test test_simple (tests.google_authenticator.GoogleAuthenticator) ... ok test_accept_hotp (tests.hotp.Hotp) ... ok test_dec8_regression_20130716 (tests.hotp.Hotp) ... ok test_hotp (tests.hotp.Hotp) ... ok test_mutual_challenge_response_rfc (tests.ocra.OCRA) ... ok test_mutual_challenge_response_simple (tests.ocra.OCRA) ... ok test_str2ocrasuite (tests.ocra.OCRA) ... ok test_totp (tests.totp.Totp) ... ok
Ran 8 tests in 0.008s
OK
Patch committed. Thank you.
I'm not sure what the problem is (yet). I'll comment if/when I figure out what's going on. I've reproduced this on FreeBSD and OS/X.
Paul
% python ./setup.py test running test test_simple (tests.google_authenticator.GoogleAuthenticator) ... ok test_accept_hotp (tests.hotp.Hotp) ... ok test_dec8_regression_20130716 (tests.hotp.Hotp) ... ok test_hotp (tests.hotp.Hotp) ... ok test_mutual_challenge_response_rfc (tests.ocra.OCRA) ... FAIL test_mutual_challenge_response_simple (tests.ocra.OCRA) ... ok test_str2ocrasuite (tests.ocra.OCRA) ... FAIL test_totp (tests.totp.Totp) ... ok
FAIL: test_mutual_challenge_response_rfc (tests.ocra.OCRA)
Traceback (most recent call last): File "/Users/paul.dokas/stuff/src/python-oath/tests/ocra.py", line 152, in test_mutual_challenge_response_rfc self.assertEqual(rs, server_instance['server_result']) AssertionError: '36733889' != '28247970'
FAIL: test_str2ocrasuite (tests.ocra.OCRA)
Traceback (most recent call last): File "/Users/paul.dokas/stuff/src/python-oath/tests/ocra.py", line 96, in test_str2ocrasuite self.assertEqual(ocrasuite(key, **params), result) AssertionError: '57519500' != '65347737'
Ran 8 tests in 0.008s
FAILED (failures=2)