Yubico / yubikey-personalization

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

ykpersonalize -x fails on neo-n's with yubico cloud in slot 1 and oath-hotp in slot 2 #64

Closed paul-pearce closed 8 years ago

paul-pearce commented 8 years ago

I'm observing the following behavior on fresh Neo-N's. I'm on a Mac (Mavericks) with ykpersonalize installed via brew.

This fails:

ykpersonalize -2 -ooath-hotp -ooath-hotp8 -oappend-cr
ykpersonalize -x

With error Yubikey core error: write error

However, this works fine.

ykpersonalize -2 -z # clear out the second slot from the above step
ykpersonalize -x
ykpersonalize -1 -ooath-hotp -ooath-hotp8 -oappend-cr
klali commented 8 years ago

For a slot to be switchable that allow update flag has to be set (-oallow-update)

/klas

paul-pearce commented 8 years ago

For what it's worth that is not at all clear from the documentation. I thought that flag related to -u not -x. Might be worth an update.

klali commented 8 years ago

I just added some text for that to the manpage. Do you think that's enough (or that we can have better wording)?

paul-pearce commented 8 years ago

That's perfect. Thanks.