gwenhywfar
4.6.0beta
|
#include <gwenhywfar/list1.h>
#include <gwenhywfar/list2.h>
#include <gwenhywfar/ct_keyinfo.h>
#include <gwenhywfar/ct_context.h>
#include <gwenhywfar/paddalgo.h>
#include <gwenhywfar/hashalgo.h>
#include <gwenhywfar/cryptalgo.h>
#include <gwenhywfar/cryptdefs.h>
Go to the source code of this file.
Macros | |
#define | GWEN_CRYPT_TOKEN_FLAGS_MANAGES_SIGNSEQ 0x00000001 |
#define | GWEN_CRYPT_TOKEN_MODE_ALLOW_UPDATE 0x00000004 |
#define | GWEN_CRYPT_TOKEN_MODE_DIRECT_SIGN 0x00000010 |
#define | GWEN_CRYPT_TOKEN_MODE_EXP_65537 0x00000008 |
#define | GWEN_CRYPT_TOKEN_MODE_FORCE_PIN_ENTRY 0x00000002 |
#define | GWEN_CRYPT_TOKEN_MODE_SECURE_PIN_ENTRY 0x00000001 |
Typedefs | |
typedef struct GWEN_CRYPT_TOKEN | GWEN_CRYPT_TOKEN |
Enumerations | |
enum | GWEN_CRYPT_TOKEN_DEVICE { GWEN_Crypt_Token_Device_Unknown =-1, GWEN_Crypt_Token_Device_None =0, GWEN_Crypt_Token_Device_File, GWEN_Crypt_Token_Device_Card, GWEN_Crypt_Token_Device_Any =999 } |
#define GWEN_CRYPT_TOKEN_MODE_ALLOW_UPDATE 0x00000004 |
#define GWEN_CRYPT_TOKEN_MODE_DIRECT_SIGN 0x00000010 |
Definition at line 63 of file ct.h.
Referenced by GWEN_Crypt_TokenFile__ActivateKey(), and GWEN_Crypt_TokenFile__GenerateKey().
#define GWEN_CRYPT_TOKEN_MODE_EXP_65537 0x00000008 |
Definition at line 62 of file ct.h.
Referenced by GWEN_Crypt_TokenFile__GenerateKey().
typedef struct GWEN_CRYPT_TOKEN GWEN_CRYPT_TOKEN |
GWENHYWFAR_API int GWEN_Crypt_Token_ActivateKey | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t | id, | ||
uint32_t | gid | ||
) |
Definition at line 518 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWENHYWFAR_API void GWEN_Crypt_Token_AddModes | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t | f | ||
) |
GWENHYWFAR_API int GWEN_Crypt_Token_ChangePin | ( | GWEN_CRYPT_TOKEN * | ct, |
int | admin, | ||
uint32_t | gid | ||
) |
Definition at line 503 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWENHYWFAR_API int GWEN_Crypt_Token_Close | ( | GWEN_CRYPT_TOKEN * | ct, |
int | abandon, | ||
uint32_t | gid | ||
) |
Definition at line 247 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED.
GWENHYWFAR_API int GWEN_Crypt_Token_Create | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t | gid | ||
) |
Definition at line 229 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED.
GWENHYWFAR_API 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 462 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWENHYWFAR_API GWEN_CRYPT_TOKEN_DEVICE GWEN_Crypt_Token_Device_fromString | ( | const char * | s | ) |
Definition at line 1109 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.
GWENHYWFAR_API const char* GWEN_Crypt_Token_Device_toString | ( | GWEN_CRYPT_TOKEN_DEVICE | d | ) |
Definition at line 1124 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().
GWENHYWFAR_API 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 440 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWENHYWFAR_API void GWEN_Crypt_Token_free | ( | GWEN_CRYPT_TOKEN * | ct | ) |
Definition at line 55 of file ct.c.
References GWEN_FREE_OBJECT, GWEN_INHERIT_FINI, and GWEN_LIST_FINI.
GWENHYWFAR_API int GWEN_Crypt_Token_GenerateKey | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t | keyId, | ||
const GWEN_CRYPT_CRYPTALGO * | a, | ||
uint32_t | gid | ||
) |
Definition at line 485 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWENHYWFAR_API const GWEN_CRYPT_TOKEN_CONTEXT* GWEN_Crypt_Token_GetContext | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t | id, | ||
uint32_t | gid | ||
) |
Definition at line 355 of file ct.c.
References DBG_INFO, GWEN_LOGDOMAIN, and NULL.
GWENHYWFAR_API int GWEN_Crypt_Token_GetContextIdList | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t * | pIdList, | ||
uint32_t * | pCount, | ||
uint32_t | gid | ||
) |
Definition at line 337 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWENHYWFAR_API GWEN_CRYPT_TOKEN_DEVICE GWEN_Crypt_Token_GetDevice | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
Definition at line 74 of file ct.c.
Referenced by GWEN_Crypt_Token_InsertCorrectToken(), and GWEN_Crypt_Token_InsertToken().
GWENHYWFAR_API uint32_t GWEN_Crypt_Token_GetFlags | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
GWENHYWFAR_API const char* GWEN_Crypt_Token_GetFriendlyName | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
Definition at line 113 of file ct.c.
Referenced by GWEN_Crypt_Token_GetPin(), GWEN_Crypt_Token_InsertCorrectToken(), and GWEN_Crypt_Token_InsertToken().
GWENHYWFAR_API int GWEN_Crypt_Token_GetKeyIdList | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t * | pIdList, | ||
uint32_t * | pCount, | ||
uint32_t | gid | ||
) |
Definition at line 281 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWENHYWFAR_API const GWEN_CRYPT_TOKEN_KEYINFO* GWEN_Crypt_Token_GetKeyInfo | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t | id, | ||
uint32_t | flags, | ||
uint32_t | gid | ||
) |
Definition at line 299 of file ct.c.
References DBG_INFO, GWEN_LOGDOMAIN, and NULL.
GWENHYWFAR_API uint32_t GWEN_Crypt_Token_GetModes | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
Definition at line 170 of file ct.c.
Referenced by GWEN_Crypt_TokenFile__ActivateKey(), and GWEN_Crypt_TokenFile__GenerateKey().
GWENHYWFAR_API const char* GWEN_Crypt_Token_GetTokenName | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
Definition at line 92 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().
GWENHYWFAR_API const char* GWEN_Crypt_Token_GetTypeName | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
Definition at line 83 of file ct.c.
Referenced by GWEN_Crypt_Token__CreatePasswordName(), and GWEN_Crypt_TokenFile__Write().
GWENHYWFAR_API int GWEN_Crypt_Token_IsOpen | ( | const GWEN_CRYPT_TOKEN * | ct | ) |
GWENHYWFAR_API int GWEN_Crypt_Token_Open | ( | GWEN_CRYPT_TOKEN * | ct, |
int | admin, | ||
uint32_t | gid | ||
) |
Definition at line 206 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED.
GWENHYWFAR_API int GWEN_Crypt_Token_SetContext | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t | id, | ||
const GWEN_CRYPT_TOKEN_CONTEXT * | ctx, | ||
uint32_t | gid | ||
) |
Definition at line 374 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWENHYWFAR_API void GWEN_Crypt_Token_SetFriendlyName | ( | GWEN_CRYPT_TOKEN * | ct, |
const char * | s | ||
) |
GWENHYWFAR_API int GWEN_Crypt_Token_SetKeyInfo | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t | id, | ||
const GWEN_CRYPT_TOKEN_KEYINFO * | ki, | ||
uint32_t | gid | ||
) |
Definition at line 319 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWENHYWFAR_API void GWEN_Crypt_Token_SetModes | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t | f | ||
) |
GWENHYWFAR_API 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 392 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.
GWENHYWFAR_API void GWEN_Crypt_Token_SubModes | ( | GWEN_CRYPT_TOKEN * | ct, |
uint32_t | f | ||
) |
GWENHYWFAR_API 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 416 of file ct.c.
References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_ERROR_NOT_OPEN.