https://dev.swisssign.com/projects/swissstick/ticket/1137 forget PIN/password feature incorrectly reports an error; refs #32

This commit is contained in:
Marc Wäckerlin
2014-06-03 07:21:49 +00:00
parent 19d6bde221
commit bb2fd695ee

View File

@@ -1254,7 +1254,6 @@ namespace cardos {
accordingly. */
void unlock(std::string pin, std::string puk, bool force=false) {
CRYPTOLOG("log");
if (pkcs15PinRetries()!=-1) return; // all ok
if (pukRetries()==-1) throw pin_locked(); // too late, puk broken
logonPuk(puk);
CRYPTOLOG("PUK accepted");