In message <[EMAIL PROTECTED]> on Wed, 25 Sep 2002 09:04:45 +0200, Michiels Olivier <[EMAIL PROTECTED]> said:
olivier.michiels> I'm trying to uderstand how the engine object is olivier.michiels> working with openssl-engine. olivier.michiels> I'm using a NFast crypto device (chil) and when I olivier.michiels> look into hw_ncipher.c I found three interristing olivier.michiels> functions: olivier.michiels> olivier.michiels> static int hwcrhk_insert_card(const char *prompt_info, olivier.michiels> const char *wrong_info, olivier.michiels> HWCryptoHook_PassphraseContext *ppctx, olivier.michiels> HWCryptoHook_CallerContext *cactx); olivier.michiels> static int hwcrhk_get_pass(const char *prompt_info, olivier.michiels> int *len_io, char *buf, olivier.michiels> HWCryptoHook_PassphraseContext *ppctx, olivier.michiels> HWCryptoHook_CallerContext *cactx); olivier.michiels> static void hwcrhk_log_message(void *logstr, const char *message); olivier.michiels> olivier.michiels> How can I use them ? They are all static. I found olivier.michiels> that they are in the HWCryptoHook_InitInfo olivier.michiels> hwcrhk_globals structure but how can I have access olivier.michiels> to this structure ? Those functions are callbacks that are called by the hwcrhk library when it needs to display certain messages or when it needs you to insert a password. hwcrhk_insert_card() will display a message telling you to insert some card (admin or operator), hwcrhk_log_message() will display a log message and hwcrhk_get_pass() will prompt you for a password. You should not tamper directly with those functions. However, you can provide password prompting callbacks with ENGINE_load_private_key() and ENGINE_load_public_key(). You can also affect where logs go by using ENGINE_ctrl(e, ENGINE_CTRL_SET_LOGSTREAM, 0, bio, NULL). -- Richard Levitte \ Spannvägen 38, II \ [EMAIL PROTECTED] Redakteur@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47 \ SWEDEN \ or +46-708-26 53 44 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]