[EMAIL PROTECTED] (paxunix) wrote in message news:<[EMAIL PROTECTED]>...

[ ... searching source, find which component ... ]

> I was hopeful that perhaps nsITokenPasswordDialogs, nsITokenDialogs,
> nsIPK11Token, or nsIPK11TokenDB might do what I want, but it doesn't
> look promising.

After much searching and debugging (long live Venkman) I found a
solution.  You can get the nsIPK11TokenDB interface and retrieve the
internal token (for the "Software Security Device") and now you can
verify a password string against the password for that token.

Wrap some prompt-service goodies around that and there you go.

Those looking for code can take a look at the attachment to bug
#78754, specifically at ConfirmShowPasswords().

Given the idl for nsITokenPasswordDialogs, it looks like I should have
been able to use it instead of having to set up my own prompt, but I
couldn't figure out what I was supposed to pass as the first parameter
to nsITokenPasswordDialogs.getPassword().

-- 
paxunix

Reply via email to