#include "ctplugin_p.h"
#include "i18n_l.h"
#include <gwenhywfar/gwenhywfar.h>
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/gui.h>
#include <gwenhywfar/pathmanager.h>
Go to the source code of this file.
#define DIRSEP "/" |
Definition at line 30 of file ctplugin.c.
Referenced by GWEN_Crypt_Token_ModuleInit().
#define DISABLE_DEBUGLOG |
Definition at line 14 of file ctplugin.c.
int GWEN_Crypt_Token_ModuleFini | ( | void | ) |
Definition at line 80 of file ctplugin.c.
References DBG_ERROR, GWEN_CRYPT_TOKEN_PLUGIN_TYPENAME, GWEN_LOGDOMAIN, GWEN_PluginManager_FindPluginManager(), GWEN_PluginManager_free(), and GWEN_PluginManager_Unregister().
Referenced by GWEN_Fini().
int GWEN_Crypt_Token_ModuleInit | ( | void | ) |
Definition at line 40 of file ctplugin.c.
References DBG_ERROR, DBG_INFO, DIRSEP, GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Buffer_Reset(), GWEN_CRYPT_TOKEN_FOLDER, GWEN_CRYPT_TOKEN_PLUGIN_TYPENAME, GWEN_LOGDOMAIN, GWEN_PathManager_GetPaths(), GWEN_PluginManager_AddPath(), GWEN_PluginManager_new(), GWEN_PluginManager_Register(), GWEN_PM_LIBNAME, GWEN_PM_PLUGINDIR, GWEN_StringList_FirstEntry(), GWEN_StringList_free(), GWEN_StringListEntry_Data(), and GWEN_StringListEntry_Next().
Referenced by GWEN_Init().
int GWEN_Crypt_Token_Plugin_CheckToken | ( | GWEN_PLUGIN * | pl, | |
GWEN_BUFFER * | name | |||
) |
This function is used to let a crypt token plugin check whether it supports a given plugin.
Initially the given buffers may contain some values to narrow the search. For chip cards the name argument may contain the serial number of the card (if known). For file based crypt tokens this argument must contain the path to the file to check.
This function should return one of the following error codes:
Definition at line 155 of file ctplugin.c.
References DBG_INFO, GWEN_INHERIT_GETDATA, and GWEN_LOGDOMAIN.
Referenced by GWEN_Crypt_Token_PluginManager_CheckToken().
GWEN_CRYPT_TOKEN* GWEN_Crypt_Token_Plugin_CreateToken | ( | GWEN_PLUGIN * | pl, | |
const char * | name | |||
) |
Definition at line 138 of file ctplugin.c.
References DBG_WARN, GWEN_INHERIT_GETDATA, and GWEN_LOGDOMAIN.
GWENHYWFAR_CB void GWEN_Crypt_Token_Plugin_FreeData | ( | GWEN_UNUSED void * | bp, | |
void * | p | |||
) |
Definition at line 128 of file ctplugin.c.
References GWEN_FREE_OBJECT.
Referenced by GWEN_Crypt_Token_Plugin_new().
GWEN_CRYPT_TOKEN_DEVICE GWEN_Crypt_Token_Plugin_GetDeviceType | ( | const GWEN_PLUGIN * | pl | ) |
Definition at line 172 of file ctplugin.c.
References GWEN_INHERIT_GETDATA.
GWEN_PLUGIN* GWEN_Crypt_Token_Plugin_new | ( | GWEN_PLUGIN_MANAGER * | mgr, | |
GWEN_CRYPT_TOKEN_DEVICE | devType, | |||
const char * | typeName, | |||
const char * | fileName | |||
) |
Definition at line 110 of file ctplugin.c.
References GWEN_Crypt_Token_Plugin_FreeData(), GWEN_INHERIT_SETDATA, GWEN_NEW_OBJECT, and GWEN_Plugin_new().
GWEN_CRYPT_TOKEN_PLUGIN_CHECKTOKEN_FN GWEN_Crypt_Token_Plugin_SetCheckTokenFn | ( | GWEN_PLUGIN * | pl, | |
GWEN_CRYPT_TOKEN_PLUGIN_CHECKTOKEN_FN | fn | |||
) |
Definition at line 201 of file ctplugin.c.
References GWEN_INHERIT_GETDATA.
GWEN_CRYPT_TOKEN_PLUGIN_CREATETOKEN_FN GWEN_Crypt_Token_Plugin_SetCreateTokenFn | ( | GWEN_PLUGIN * | pl, | |
GWEN_CRYPT_TOKEN_PLUGIN_CREATETOKEN_FN | fn | |||
) |
Definition at line 184 of file ctplugin.c.
References GWEN_INHERIT_GETDATA.
int GWEN_Crypt_Token_PluginManager_CheckToken | ( | GWEN_PLUGIN_MANAGER * | cm, | |
GWEN_CRYPT_TOKEN_DEVICE | devt, | |||
GWEN_BUFFER * | typeName, | |||
GWEN_BUFFER * | tokenName, | |||
uint32_t | guiid | |||
) |
This function tries to find a token plugin which is able to handle the token given by the device type and name.
Definition at line 289 of file ctplugin.c.
References DBG_ERROR, DBG_INFO, GWEN_Buffer_AppendBuffer(), GWEN_Buffer_AppendString(), GWEN_Buffer_dup(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_Reset(), GWEN_Crypt_Token_Plugin_CheckToken(), GWEN_Crypt_Token_PluginManager_GetPluginDescrs(), GWEN_ERROR_BAD_NAME, GWEN_ERROR_NOT_IMPLEMENTED, GWEN_ERROR_NOT_SUPPORTED, GWEN_ERROR_USER_ABORTED, GWEN_GUI_PROGRESS_ALLOW_EMBED, GWEN_GUI_PROGRESS_ALWAYS_SHOW_LOG, GWEN_GUI_PROGRESS_DELAY, GWEN_GUI_PROGRESS_SHOW_ABORT, GWEN_GUI_PROGRESS_SHOW_LOG, GWEN_GUI_PROGRESS_SHOW_PROGRESS, GWEN_Gui_ProgressAdvance(), GWEN_Gui_ProgressEnd(), GWEN_Gui_ProgressLog(), GWEN_Gui_ProgressStart(), GWEN_LOGDOMAIN, GWEN_LoggerLevel_Error, GWEN_LoggerLevel_Info, GWEN_LoggerLevel_Notice, GWEN_LoggerLevel_Warning, GWEN_Plugin_GetName(), GWEN_PluginDescription_GetName(), GWEN_PluginDescription_GetXmlNode(), GWEN_PluginDescription_List2_freeAll(), GWEN_PluginManager_GetPlugin(), I18N, and NULL.
GWEN_PLUGIN_DESCRIPTION_LIST2* GWEN_Crypt_Token_PluginManager_GetPluginDescrs | ( | GWEN_PLUGIN_MANAGER * | pm, | |
GWEN_CRYPT_TOKEN_DEVICE | devt | |||
) |
Definition at line 225 of file ctplugin.c.
References DBG_ERROR, GWEN_Crypt_Token_Device_Any, GWEN_Crypt_Token_Device_toString(), GWEN_LOGDOMAIN, GWEN_PluginDescription_dup(), GWEN_PluginDescription_GetXmlNode(), GWEN_PluginDescription_List2_freeAll(), GWEN_PluginManager_GetPluginDescrs(), and GWEN_XMLNode_GetProperty().
Referenced by GWEN_Crypt_Token_PluginManager_CheckToken().