gpaterno / otpd

Automatically exported from code.google.com/p/otpd
GNU General Public License v2.0
0 stars 0 forks source link

resynctool advances one code too far... #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use resynctool with two passcodes from token 
2. must advance token one more passcode
3. and then must advance token *again* in order to authenticate successfully

When you run the resynctool the following piece of code seems to cause the 
unwanted pain.

237        /* token is now at the subsequent counter value */
238        c2c(++counter, challenge);

The above code (++counter) sets the counter one ahead of where it should be. 
Which means that when you use the resynctool, you have to advance the token 
once and then once more to get to the next valid counter for otpd.
Why increment the counter one more than necessary? Is this required? Can we 
avoid this behavior?

I changed the code on line 238 to "c2c(counter,challenge);" and then 
recompiled/installed and this fixed it.

Original issue reported on code.google.com by patrioti...@gmail.com on 13 Aug 2010 at 1:55

GoogleCodeExporter commented 9 years ago
Though, this needs to be documented because I wrote scripts around this 
problem. And I would imagine others would have done the same. Now that the 
problem is fixed, it broke my scripts which now need some editing.

Original comment by patrioti...@gmail.com on 13 Aug 2010 at 2:25

GoogleCodeExporter commented 9 years ago
r65

Original comment by fr...@gmail.com on 26 Aug 2010 at 7:39