case HWCRHK_CMD_SET_CALLBACK_DATA:
static int hwcrhk_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())	{	int to_return = 1;	switch(cmd)		{	case HWCRHK_CMD_SO_PATH:		if(hwcrhk_dso)			{			HWCRHKerr(HWCRHK_F_HWCRHK_CTRL,HWCRHK_R_ALREADY_LOADED);			return 0;			}		if(p == NULL)			{			HWCRHKerr(HWCRHK_F_HWCRHK_CTRL,ERR_R_PASSED_NULL_PARAMETER);			return 0;			}		HWCRHK_LIBNAME = (const char *)p;		return 1;	case ENGINE_CTRL_SET_LOGSTREAM:		{		BIO *bio = (BIO *)p;		CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);		if (logstream)			{			BIO_free(logstream);			logstream = NULL;			}		if (CRYPTO_add(&bio->references,1,CRYPTO_LOCK_BIO) > 1)			logstream = bio;		else			HWCRHKerr(HWCRHK_F_HWCRHK_CTRL,HWCRHK_R_BIO_WAS_FREED);		}		CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);		break;	case ENGINE_CTRL_SET_PASSWORD_CALLBACK:		CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);		password_context.password_callback = (pem_password_cb *)f;		CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);		break;	case ENGINE_CTRL_SET_USER_INTERFACE:		CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);		password_context.ui_method = (UI_METHOD *)p;		CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);		break;	case ENGINE_CTRL_SET_CALLBACK_DATA:		CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);		password_context.callback_data = p;		CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);		break;	/* this enables or disables the "SimpleForkCheck" flag used in the	 * initialisation structure. */	case ENGINE_CTRL_CHIL_SET_FORKCHECK:	case HWCRHK_CMD_FORK_CHECK:		CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);		if(i)			hwcrhk_globals.flags |=				HWCryptoHook_InitFlags_SimpleForkCheck;		else			hwcrhk_globals.flags &=				~HWCryptoHook_InitFlags_SimpleForkCheck;		CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);		break;	/* This will prevent the initialisation function from "installing"	 * the mutex-handling callbacks, even if they are available from	 * within the library (or were provided to the library from the	 * calling application). This is to remove any baggage for	 * applications not using multithreading. */	case ENGINE_CTRL_CHIL_NO_LOCKING:		CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);		disable_mutex_callbacks = 1;		CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);		break;	case HWCRHK_CMD_THREAD_LOCKING:		CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);		disable_mutex_callbacks = ((i == 0) ? 0 : 1);		CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);		break;	/* The command isn't understood by this engine */	default:		HWCRHKerr(HWCRHK_F_HWCRHK_CTRL,			HWCRHK_R_CTRL_COMMAND_NOT_IMPLEMENTED);		to_return = 0;		break;		}	return to_return;	}