Thank you so much. I am in the same situation exactly. return null is the key in getPasswordAgain(info). If you put a breakpoint here you can see it enters here to ask the password again.
I think, it will also work if we implement a logic of showing a dialog to ask the user the password again, but return null is the simpler approach. 在 2016年10月11日星期二 UTC+2下午9:11:18,Ernie Kovak写道: > Thanks for the reply, Robert! > > We're using OpenSC 0.16.0 and it's working well so far. The problem turned > out to be exactly what you suggested. > > The JSS PK11Token login method takes a password callback handler. The handler > has a getPasswordAgain method that's used for retries, and returning anything > but null will result in a locked card. > > The handler should look something like this: > > PasswordCallback pwcb = new PasswordCallback() { > @Override > public Password getPasswordFirstAttempt(PasswordCallbackInfo info) > throws GiveUpException { > return new Password(pin.toCharArray()); > } > @Override > public Password getPasswordAgain(PasswordCallbackInfo info) throws > GiveUpException { > return null; > } > }; -- dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto