Hi,
Please have a look at the improved patch series in
https://github.com/marschap/openldap/commits/contrib-totp3
and
https://github.com/marschap/openldap/commits/contrib-totp4
They try to address the issues in the previous versions
Changes:
* contrib/passwd/totp: fix the big-endian case, support 32-bit archs
Use memcpy for the WORDS_BIGENDIAN case [much simpler]
Use uint64_t for same results in 32- and 64-bit cases
* contrib/passwd/totp: support compiling using nettle
Fix the botched previous patch.
The two branches differ only in that patch, giving the following
alternatives:
- contrib-totp3 continues to use the HMAC_... macros
It still requires the #if...#else...#endif to harmonize the setup
in do_hmac()
- contrib-totp4 gets rid of the HMAC_... macros
It uses the different implementations directly in do_hmac()
Of course separated by #if...#else..#endif
Functionally both patches are equivalent:
in my tests they yield the same results for OpenSSL and GnuTLS.
Best
PEter
--
Peter Marschall
[email protected]