In message <[EMAIL PROTECTED]> on Wed, 10 Mar 2004 09:06:36 -0800 (PST), Josh Winkle <[EMAIL PROTECTED]> said:
securesockets2004> I was wondering what is the purpose of the ui_method securesockets2004> and callback_data arguments to this function. This is securesockets2004> what I want to do: securesockets2004> securesockets2004> Write a simple function that will prompt for a securesockets2004> passphrase for the hardware token at startup. securesockets2004> Initialize the engine infrastructure and load the securesockets2004> private key with a call to ENGINE_load_private_key(). securesockets2004> The token passphrase should somehow be available securesockets2004> whenever it's needed lower down. securesockets2004> securesockets2004> Do I need to define a UI method for this and write securesockets2004> open/close/read/write functions for it? Such heavy securesockets2004> machinery for so trivial a task? There's a generic console UI_METHOD returned by UI_OpenSSL(), so no, you don't need to write one if all you want is a simple console-based prompting thing. It doesn't use any callback data, so for that one, you can give callback_data a NULL. If you want to create your own, you might make it take a pass phrase from callback_data. You can find such an implementation in apps/apps.c (the functions ui_open(), ui_read(), ui_write(), ui_close(), setup_ui_method() and destroy_ui_method()). The reason for this complexity is that UI also supports event-based prompting, for example a graphical dialog box, or perhaps a separate PIN keyboard (I've seen one old smart card reader that comes with it's own keyboard. Unfortunately, it isn't sold or produced any more). ----- Please consider sponsoring my work on free software. See http://www.free.lp.se/sponsoring.html for details. -- Richard Levitte \ Tunnlandsv�gen 52 \ [EMAIL PROTECTED] [EMAIL PROTECTED] \ S-168 36 BROMMA \ T: +46-708-26 53 44 \ SWEDEN \ Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED] Member of the OpenSSL development team: http://www.openssl.org/ Unsolicited commercial email is subject to an archival fee of $400. See <http://www.stacken.kth.se/~levitte/mail/> for more info. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
