Skip to content

Commit

Permalink
Fix login via PinPad on e.g ReinerSCT
Browse files Browse the repository at this point in the history
Setting in opensc.conf:
  reader_driver pcsc {
    enable_pinpad = true;
  }

Only call login once and return an empty pin
instead of a NULL pin, which indicated a failure
while an empty (non-NULL) return-value
indicates success.
  • Loading branch information
chris2511 committed Mar 11, 2024
1 parent 1725863 commit d30e47e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pkcs11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ QString pkcs11::tokenLogin(const QString &name, bool so, bool force)
if (!need_login)
logout();
if (tokenInfo().protAuthPath()) {
pin.clear();
pin = ""; // Indicate success
QDialog *pinpadbox = newPinPadBox();
pinpadbox->show();
pinPadLoginThread ppt(this, so);
Expand All @@ -258,8 +258,8 @@ QString pkcs11::tokenLogin(const QString &name, bool so, bool force)
} else {
if (PwDialogCore::execute(&p, &pin, false) != 1)
return QString();
login(pin.constUchar(), pin.size(), so);
}
login(pin.constUchar(), pin.size(), so);
} else {
return QString("");
}
Expand Down

0 comments on commit d30e47e

Please sign in to comment.