On Tue, May 25, 2010 at 05:00:50PM -0400, James Carlson wrote: > Nicolas Williams wrote: > > Hmmm, I think it'd have been better to have the function return an error > > when a PIN is need and let the app call it again with the PIN -- let the > > app prompt for a PIN. > > > > There's no way to deal with the fact that getpassphrase() is not > > MT-safe from within a library. The mutex you use to synchronize access > > to it will not be the same mutex that the application uses. > > Perhaps more important for a library function: there's no way to know > exactly how one gets input from a user. It might involve interactions > with a GUI or through some other sort of protocol (such as EAP).
Looking at the webrev I see a way to invoke an external command to produce the PIN. But even with that a GUI app would have to have an external command to do something that could be done without having to invoke an external command if only this API didn't require the ability to prompt for a PIN by itself. I recommend a callback and/or a PIN argument and pin-needed error code. Nico -- _______________________________________________ opensolaris-arc mailing list [email protected]
