Closed avatamaniuc closed 8 years ago
I guess this: hotp_set_counter(otp_params.key, T-i-1);
should be replaced with: hotp_set_counter(otp_params.key, T-i+1);
You're damn right and I can't believe this have gone unnoticed that long. I pushed a patch on my fork at https://github.com/calve/openvpn-otp, could you confirm it fix your issue ?
Calve could you please verify that everything works and raise a pull request? I'll merge the fix back.
It looks like now it's ok. Thank you!
Hello, I'm trying to make this work with Google Authenticator and HOTP type and it looks like counter writed to /var/spool/openvpn/hotp-counters/* is calculated incorrectly - on every authentication attempt the counter is decremented(-1) instead of being incremented(+1). Could you please check this?
Thank you!