Yubico / yubikey-personalization

YubiKey Personalization cross-platform library and tool
https://developers.yubico.com/yubikey-personalization/
BSD 2-Clause "Simplified" License
299 stars 82 forks source link

ykinfo 1.18.0 returns truncated modhex serial numbers, for certain device serial numbers #112

Closed rgtx closed 6 years ago

rgtx commented 6 years ago

For an example device serial number (7123200), the yubikey_modhex_encode() within ykinfo.c doesn't appear to be returning the trailing "00" / "cc" characters:

/usr/bin/ykinfo -a serial: 7123200 serial_hex: 6cb100 serial_modhex: hrnb ...

/usr/bin/modhex -h 6cb100 hrnbcc

...returns the correct modhex value with the trailing zeroes ("cc"s), though.

ykinfo on Ubuntu, within 1.18.0-1~ppa2~xenial1 and 1.18.0-1~ppa@-artful1, are both confirmed to be affected by this bug.

klali commented 6 years ago

fixed by 152aec812c73349647f2225d9723649bb498e4f0