fix slot detection on yubikeys

Signed-off-by: Adam Crowder <adam@adamcrowder.net>
This commit is contained in:
Adam Crowder 2020-07-09 16:43:26 -07:00 committed by Jonathan White
parent 07659547ce
commit 4f1d8943d6

View File

@ -176,7 +176,7 @@ void YubiKey::findValidKeys()
bool wouldBlock;
QList<QPair<int, QString>> ykSlots;
for (int slot = 1; slot <= 2; ++slot) {
auto config = (i == 1 ? CONFIG1_VALID : CONFIG2_VALID);
auto config = (slot == 1 ? CONFIG1_VALID : CONFIG2_VALID);
if (!(ykds_touch_level(st) & config)) {
// Slot is not configured
continue;