#include "ct_p.h"
#include "i18n_l.h"
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/gui.h>
Go to the source code of this file.
int GWEN_Crypt_Token__CreatePasswordName | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_PINTYPE | pt, | |||
GWEN_BUFFER * | nbuf | |||
) |
Definition at line 741 of file ct.c.
References DBG_ERROR, GWEN_Buffer_AppendString(), GWEN_Crypt_PinType_Manage, GWEN_Crypt_Token_GetTokenName(), GWEN_Crypt_Token_GetTypeName(), GWEN_ERROR_INVALID, and GWEN_LOGDOMAIN.
Referenced by GWEN_Crypt_Token_GetPin(), and GWEN_Crypt_Token_SetPinStatus().
void GWEN_Crypt_Token_AddFlags | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | f | |||
) |
void GWEN_Crypt_Token_AddModes | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | f | |||
) |
uint32_t GWEN_Crypt_Token_BeginEnterPin | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_UNUSED GWEN_CRYPT_PINTYPE | pt, | |||
uint32_t | gid | |||
) |
Definition at line 918 of file ct.c.
References GWEN_Gui_ShowBox(), GWEN_GUI_SHOWBOX_FLAGS_BEEP, and I18N.
int GWEN_Crypt_Token_ChangePin | ( | GWEN_CRYPT_TOKEN * | ct, | |
int | admin, | |||
uint32_t | gid | |||
) |
Definition at line 504 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
int GWEN_Crypt_Token_Close | ( | GWEN_CRYPT_TOKEN * | ct, | |
int | abandon, | |||
uint32_t | gid | |||
) |
int GWEN_Crypt_Token_Create | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | gid | |||
) |
int GWEN_Crypt_Token_Decipher | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | keyId, | |||
GWEN_CRYPT_PADDALGO * | a, | |||
const uint8_t * | pInData, | |||
uint32_t | inLen, | |||
uint8_t * | pOutData, | |||
uint32_t * | pOutLen, | |||
uint32_t | gid | |||
) |
Definition at line 463 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWEN_CRYPT_TOKEN_DEVICE GWEN_Crypt_Token_Device_fromString | ( | const char * | s | ) |
Definition at line 1081 of file ct.c.
References GWEN_Crypt_Token_Device_Any, GWEN_Crypt_Token_Device_Card, GWEN_Crypt_Token_Device_File, GWEN_Crypt_Token_Device_None, and GWEN_Crypt_Token_Device_Unknown.
const char* GWEN_Crypt_Token_Device_toString | ( | GWEN_CRYPT_TOKEN_DEVICE | d | ) |
Definition at line 1096 of file ct.c.
References GWEN_Crypt_Token_Device_Any, GWEN_Crypt_Token_Device_Card, GWEN_Crypt_Token_Device_File, and GWEN_Crypt_Token_Device_None.
Referenced by GWEN_Crypt_Token_PluginManager_GetPluginDescrs().
int GWEN_Crypt_Token_Encipher | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | keyId, | |||
GWEN_CRYPT_PADDALGO * | a, | |||
const uint8_t * | pInData, | |||
uint32_t | inLen, | |||
uint8_t * | pOutData, | |||
uint32_t * | pOutLen, | |||
uint32_t | gid | |||
) |
Definition at line 441 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
int GWEN_Crypt_Token_EndEnterPin | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_UNUSED GWEN_CRYPT_PINTYPE | pt, | |||
GWEN_UNUSED int | ok, | |||
uint32_t | id | |||
) |
void GWEN_Crypt_Token_free | ( | GWEN_CRYPT_TOKEN * | ct | ) |
Definition at line 56 of file ct.c.
References GWEN_FREE_OBJECT, GWEN_INHERIT_FINI, and GWEN_LIST_FINI.
int GWEN_Crypt_Token_GenerateKey | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | keyId, | |||
const GWEN_CRYPT_CRYPTALGO * | a, | |||
uint32_t | gid | |||
) |
Definition at line 486 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
const GWEN_CRYPT_TOKEN_CONTEXT* GWEN_Crypt_Token_GetContext | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | id, | |||
uint32_t | gid | |||
) |
int GWEN_Crypt_Token_GetContextIdList | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t * | pIdList, | |||
uint32_t * | pCount, | |||
uint32_t | gid | |||
) |
Definition at line 338 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWEN_CRYPT_TOKEN_DEVICE GWEN_Crypt_Token_GetDevice | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
Definition at line 75 of file ct.c.
Referenced by GWEN_Crypt_Token_InsertCorrectToken(), and GWEN_Crypt_Token_InsertToken().
uint32_t GWEN_Crypt_Token_GetFlags | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
const char* GWEN_Crypt_Token_GetFriendlyName | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
Definition at line 114 of file ct.c.
Referenced by GWEN_Crypt_Token_GetPin(), GWEN_Crypt_Token_InsertCorrectToken(), and GWEN_Crypt_Token_InsertToken().
int GWEN_Crypt_Token_GetKeyIdList | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t * | pIdList, | |||
uint32_t * | pCount, | |||
uint32_t | gid | |||
) |
Definition at line 282 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
const GWEN_CRYPT_TOKEN_KEYINFO* GWEN_Crypt_Token_GetKeyInfo | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | id, | |||
uint32_t | flags, | |||
uint32_t | gid | |||
) |
uint32_t GWEN_Crypt_Token_GetModes | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
int GWEN_Crypt_Token_GetPin | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_PINTYPE | pt, | |||
GWEN_CRYPT_PINENCODING | pe, | |||
uint32_t | flags, | |||
unsigned char * | pwbuffer, | |||
unsigned int | minLength, | |||
unsigned int | maxLength, | |||
unsigned int * | pinLength, | |||
uint32_t | gid | |||
) |
Definition at line 767 of file ct.c.
References DBG_INFO, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Crypt_PinEncoding_Ascii, GWEN_Crypt_PinType_Access, GWEN_Crypt_PinType_Manage, GWEN_Crypt_Token__CreatePasswordName(), GWEN_Crypt_Token_GetFriendlyName(), GWEN_Crypt_Token_GetTokenName(), GWEN_Crypt_TransformPin(), GWEN_Gui_GetPassword(), GWEN_GUI_INPUT_FLAGS_CONFIRM, GWEN_GUI_INPUT_FLAGS_NUMERIC, GWEN_LOGDOMAIN, and I18N.
const char* GWEN_Crypt_Token_GetTokenName | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
Definition at line 93 of file ct.c.
Referenced by GWEN_Crypt_Token__CreatePasswordName(), GWEN_Crypt_Token_GetPin(), GWEN_Crypt_Token_InsertCorrectToken(), GWEN_Crypt_Token_InsertToken(), GWEN_Crypt_TokenFile__CloseFile(), GWEN_Crypt_TokenFile__OpenFile(), GWEN_Crypt_TokenFile__Read(), GWEN_Crypt_TokenFile__ReloadIfNeeded(), GWEN_Crypt_TokenFile__Write(), and GWEN_Crypt_TokenFile_Create().
const char* GWEN_Crypt_Token_GetTypeName | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
Definition at line 84 of file ct.c.
Referenced by GWEN_Crypt_Token__CreatePasswordName(), and GWEN_Crypt_TokenFile__Write().
int GWEN_Crypt_Token_InsertCorrectToken | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | gid | |||
) |
Definition at line 1010 of file ct.c.
References DBG_ERROR, GWEN_Crypt_Token_Device_File, GWEN_Crypt_Token_GetDevice(), GWEN_Crypt_Token_GetFriendlyName(), GWEN_Crypt_Token_GetTokenName(), GWEN_ERROR_USER_ABORTED, GWEN_Gui_MessageBox(), GWEN_GUI_MSG_FLAGS_CONFIRM_B1, GWEN_GUI_MSG_FLAGS_SEVERITY_DANGEROUS, GWEN_GUI_MSG_FLAGS_TYPE_ERROR, GWEN_GUI_MSG_FLAGS_TYPE_WARN, GWEN_Gui_ProgressLog(), GWEN_LOGDOMAIN, GWEN_LoggerLevel_Notice, and I18N.
int GWEN_Crypt_Token_InsertToken | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | gid | |||
) |
Definition at line 955 of file ct.c.
References DBG_ERROR, GWEN_Crypt_Token_Device_File, GWEN_Crypt_Token_GetDevice(), GWEN_Crypt_Token_GetFriendlyName(), GWEN_Crypt_Token_GetTokenName(), GWEN_ERROR_USER_ABORTED, GWEN_Gui_MessageBox(), GWEN_GUI_MSG_FLAGS_CONFIRM_B1, GWEN_GUI_MSG_FLAGS_SEVERITY_DANGEROUS, GWEN_GUI_MSG_FLAGS_SEVERITY_NORMAL, GWEN_GUI_MSG_FLAGS_TYPE_ERROR, GWEN_GUI_MSG_FLAGS_TYPE_WARN, GWEN_Gui_ProgressLog(), GWEN_LOGDOMAIN, GWEN_LoggerLevel_Notice, and I18N.
int GWEN_Crypt_Token_IsOpen | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
GWEN_CRYPT_TOKEN* GWEN_Crypt_Token_new | ( | GWEN_CRYPT_TOKEN_DEVICE | dev, | |
const char * | typeName, | |||
const char * | tokenName | |||
) |
Definition at line 34 of file ct.c.
References GWEN_INHERIT_INIT, GWEN_LIST_INIT, and GWEN_NEW_OBJECT.
Referenced by GWEN_Crypt_TokenFile_new().
int GWEN_Crypt_Token_Open | ( | GWEN_CRYPT_TOKEN * | ct, | |
int | admin, | |||
uint32_t | gid | |||
) |
GWEN_CRYPT_TOKEN_CHANGEPIN_FN GWEN_Crypt_Token_SetChangePinFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_CHANGEPIN_FN | f | |||
) |
GWEN_CRYPT_TOKEN_CLOSE_FN GWEN_Crypt_Token_SetCloseFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_CLOSE_FN | f | |||
) |
int GWEN_Crypt_Token_SetContext | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | id, | |||
const GWEN_CRYPT_TOKEN_CONTEXT * | ctx, | |||
uint32_t | gid | |||
) |
Definition at line 375 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWEN_CRYPT_TOKEN_CREATE_FN GWEN_Crypt_Token_SetCreateFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_CREATE_FN | f | |||
) |
GWEN_CRYPT_TOKEN_DECIPHER_FN GWEN_Crypt_Token_SetDecipherFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_DECIPHER_FN | f | |||
) |
GWEN_CRYPT_TOKEN_ENCIPHER_FN GWEN_Crypt_Token_SetEncipherFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_ENCIPHER_FN | f | |||
) |
void GWEN_Crypt_Token_SetFlags | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | f | |||
) |
void GWEN_Crypt_Token_SetFriendlyName | ( | GWEN_CRYPT_TOKEN * | ct, | |
const char * | s | |||
) |
GWEN_CRYPT_TOKEN_GENERATEKEY_FN GWEN_Crypt_Token_SetGenerateKeyFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_GENERATEKEY_FN | f | |||
) |
GWEN_CRYPT_TOKEN_GETCONTEXT_FN GWEN_Crypt_Token_SetGetContextFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_GETCONTEXT_FN | f | |||
) |
GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN GWEN_Crypt_Token_SetGetContextIdListFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_GETCONTEXTIDLIST_FN | f | |||
) |
GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN GWEN_Crypt_Token_SetGetKeyIdListFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_GETKEYIDLIST_FN | f | |||
) |
GWEN_CRYPT_TOKEN_GETKEYINFO_FN GWEN_Crypt_Token_SetGetKeyInfoFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_GETKEYINFO_FN | f | |||
) |
int GWEN_Crypt_Token_SetKeyInfo | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | id, | |||
const GWEN_CRYPT_TOKEN_KEYINFO * | ki, | |||
uint32_t | gid | |||
) |
Definition at line 320 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
void GWEN_Crypt_Token_SetModes | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | f | |||
) |
GWEN_CRYPT_TOKEN_OPEN_FN GWEN_Crypt_Token_SetOpenFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_OPEN_FN | f | |||
) |
int GWEN_Crypt_Token_SetPinStatus | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_PINTYPE | pt, | |||
GWEN_CRYPT_PINENCODING | pe, | |||
GWEN_UNUSED uint32_t | flags, | |||
const unsigned char * | buffer, | |||
unsigned int | pinLength, | |||
int | isOk, | |||
uint32_t | gid | |||
) |
Definition at line 870 of file ct.c.
References DBG_ERROR, DBG_INFO, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Crypt_PinEncoding_Ascii, GWEN_Crypt_Token__CreatePasswordName(), GWEN_Crypt_TransformPin(), GWEN_ERROR_BUFFER_OVERFLOW, GWEN_Gui_PasswordStatus_Bad, GWEN_Gui_PasswordStatus_Ok, GWEN_Gui_SetPasswordStatus(), and GWEN_LOGDOMAIN.
GWEN_CRYPT_TOKEN_SETCONTEXT_FN GWEN_Crypt_Token_SetSetContextFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_SETCONTEXT_FN | f | |||
) |
GWEN_CRYPT_TOKEN_SETKEYINFO_FN GWEN_Crypt_Token_SetSetKeyInfoFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_SETKEYINFO_FN | f | |||
) |
GWEN_CRYPT_TOKEN_SIGN_FN GWEN_Crypt_Token_SetSignFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_SIGN_FN | f | |||
) |
void GWEN_Crypt_Token_SetTokenName | ( | GWEN_CRYPT_TOKEN * | ct, | |
const char * | s | |||
) |
GWEN_CRYPT_TOKEN_VERIFY_FN GWEN_Crypt_Token_SetVerifyFn | ( | GWEN_CRYPT_TOKEN * | ct, | |
GWEN_CRYPT_TOKEN_VERIFY_FN | f | |||
) |
int GWEN_Crypt_Token_Sign | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | keyId, | |||
GWEN_CRYPT_PADDALGO * | a, | |||
const uint8_t * | pInData, | |||
uint32_t | inLen, | |||
uint8_t * | pSignatureData, | |||
uint32_t * | pSignatureLen, | |||
uint32_t * | pSeqCounter, | |||
uint32_t | gid | |||
) |
Definition at line 393 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
void GWEN_Crypt_Token_SubFlags | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | f | |||
) |
void GWEN_Crypt_Token_SubModes | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | f | |||
) |
int GWEN_Crypt_Token_Verify | ( | GWEN_CRYPT_TOKEN * | ct, | |
uint32_t | keyId, | |||
GWEN_CRYPT_PADDALGO * | a, | |||
const uint8_t * | pInData, | |||
uint32_t | inLen, | |||
const uint8_t * | pSignatureData, | |||
uint32_t | signatureLen, | |||
uint32_t | seqCounter, | |||
uint32_t | gid | |||
) |
Definition at line 417 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.