ctplugin.c File Reference

#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.

Defines

#define DIRSEP   "/"

Functions

int GWEN_Crypt_Token_ModuleFini ()
int GWEN_Crypt_Token_ModuleInit ()
int GWEN_Crypt_Token_Plugin_CheckToken (GWEN_PLUGIN *pl, GWEN_BUFFER *name)
GWEN_CRYPT_TOKENGWEN_Crypt_Token_Plugin_CreateToken (GWEN_PLUGIN *pl, const char *name)
GWENHYWFAR_CB void GWEN_Crypt_Token_Plugin_FreeData (GWEN_UNUSED void *bp, void *p)
GWEN_CRYPT_TOKEN_DEVICE GWEN_Crypt_Token_Plugin_GetDeviceType (const GWEN_PLUGIN *pl)
GWEN_PLUGINGWEN_Crypt_Token_Plugin_new (GWEN_PLUGIN_MANAGER *mgr, GWEN_CRYPT_TOKEN_DEVICE devType, const char *typeName, const char *fileName)
GWEN_CRYPT_TOKEN_PLUGIN_CHECKTOKEN_FN GWEN_Crypt_Token_Plugin_SetCheckTokenFn (GWEN_PLUGIN *pl, GWEN_CRYPT_TOKEN_PLUGIN_CHECKTOKEN_FN fn)
GWEN_CRYPT_TOKEN_PLUGIN_CREATETOKEN_FN GWEN_Crypt_Token_Plugin_SetCreateTokenFn (GWEN_PLUGIN *pl, GWEN_CRYPT_TOKEN_PLUGIN_CREATETOKEN_FN fn)
int GWEN_Crypt_Token_PluginManager_CheckToken (GWEN_PLUGIN_MANAGER *pm, GWEN_CRYPT_TOKEN_DEVICE devt, GWEN_BUFFER *typeName, GWEN_BUFFER *tokenName, uint32_t guiid)
GWEN_PLUGIN_DESCRIPTION_LIST2GWEN_Crypt_Token_PluginManager_GetPluginDescrs (GWEN_PLUGIN_MANAGER *pm, GWEN_CRYPT_TOKEN_DEVICE devt)


Define Documentation

#define DIRSEP   "/"

Definition at line 31 of file ctplugin.c.


Function Documentation

int GWEN_Crypt_Token_ModuleFini (  ) 

int GWEN_Crypt_Token_ModuleInit (  ) 

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:

  • GWEN_SUCCESS: CryptToken is supported by this plugin, the buffers for typeName, subTypeName and name are updated accordingly
  • GWEN_ERROR_CT_NOT_IMPLEMENTED: function not implmented
  • GWEN_ERROR_CT_NOT_SUPPORTED: medium not supported by this plugin
  • GWEN_ERROR_CT_BAD_NAME: Medium is supported but the name doesn't match that of the currently checked medium
  • GWEN_ERROR_CT_IO_ERROR: any type of IO error occurred
  • other codes as appropriate

Definition at line 156 of file ctplugin.c.

References DBG_INFO, GWEN_ERROR_NOT_IMPLEMENTED, 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 139 of file ctplugin.c.

References DBG_WARN, GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, and NULL.

GWENHYWFAR_CB void GWEN_Crypt_Token_Plugin_FreeData ( GWEN_UNUSED void *  bp,
void *  p 
)

Definition at line 129 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 173 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 
)

GWEN_CRYPT_TOKEN_PLUGIN_CHECKTOKEN_FN GWEN_Crypt_Token_Plugin_SetCheckTokenFn ( GWEN_PLUGIN pl,
GWEN_CRYPT_TOKEN_PLUGIN_CHECKTOKEN_FN  fn 
)

Definition at line 202 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 185 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 
)

GWEN_PLUGIN_DESCRIPTION_LIST2* GWEN_Crypt_Token_PluginManager_GetPluginDescrs ( GWEN_PLUGIN_MANAGER pm,
GWEN_CRYPT_TOKEN_DEVICE  devt 
)


Generated on Thu Aug 20 13:54:40 2009 for gwenhywfar by  doxygen 1.5.9