gwenhywfar
4.8.0beta
|
#include "cryptkey_p.h"
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
#include <gcrypt.h>
Go to the source code of this file.
Macros | |
#define | DISABLE_DEBUGLOG |
#define DISABLE_DEBUGLOG |
Definition at line 15 of file cryptkey.c.
int GWEN_Crypt3_ModuleFini | ( | void | ) |
Definition at line 53 of file cryptkey.c.
Referenced by GWEN_Fini().
int GWEN_Crypt3_ModuleInit | ( | void | ) |
Definition at line 34 of file cryptkey.c.
References DBG_ERROR, GWEN_ERROR_GENERIC, and GWEN_LOGDOMAIN.
Referenced by GWEN_Init().
int GWEN_Crypt_Key_Decipher | ( | GWEN_CRYPT_KEY * | k, |
const uint8_t * | pInData, | ||
uint32_t | inLen, | ||
uint8_t * | pOutData, | ||
uint32_t * | pOutLen | ||
) |
Definition at line 298 of file cryptkey.c.
References GWEN_ERROR_NOT_IMPLEMENTED.
Referenced by _decodeData(), GWEN_Crypt_TokenFile__Decipher(), GWEN_CryptMgr_Decrypt(), and GWEN_CryptMgrKeys_DecryptKey().
GWEN_CRYPT_KEY* GWEN_Crypt_Key_dup | ( | const GWEN_CRYPT_KEY * | k | ) |
Definition at line 132 of file cryptkey.c.
References GWEN_Crypt_Key_new(), and NULL.
int GWEN_Crypt_Key_Encipher | ( | GWEN_CRYPT_KEY * | k, |
const uint8_t * | pInData, | ||
uint32_t | inLen, | ||
uint8_t * | pOutData, | ||
uint32_t * | pOutLen | ||
) |
Definition at line 284 of file cryptkey.c.
References GWEN_ERROR_NOT_IMPLEMENTED.
Referenced by _encode(), _encodeData(), GWEN_Crypt_TokenFile__Encipher(), GWEN_Crypt_TokenFile__Verify(), GWEN_CryptMgr_Encrypt(), GWEN_CryptMgrKeys_EncryptKey(), and GWEN_CryptMgrKeys_VerifyData().
void GWEN_Crypt_Key_free | ( | GWEN_CRYPT_KEY * | k | ) |
Definition at line 148 of file cryptkey.c.
References GWEN_FREE_OBJECT, GWEN_INHERIT_FINI, and GWEN_LIST_FINI.
Referenced by _decodeData(), _encode(), _encodeData(), GWEN_Crypt_KeyRsa_fromDb(), GWEN_Crypt_KeySym__fromDb(), GWEN_Crypt_KeySym_fromData(), GWEN_Crypt_KeySym_fromDb(), GWEN_Crypt_KeySym_Generate(), GWEN_Crypt_KeySym_SetKeyData(), GWEN_Crypt_TokenFile__ActivateKey(), GWEN_Crypt_TokenFile__GenerateKey(), GWEN_Crypt_TokenFile__SetKeyInfo(), GWEN_CryptMgr_Decrypt(), GWEN_CryptMgr_Encrypt(), GWEN_CryptMgrKeys_FreeData(), GWEN_CryptMgrKeys_SetPeerKey(), GWEN_CTF_Context_freeData(), GWEN_CTF_Context_SetLocalAuthKey(), GWEN_CTF_Context_SetLocalCryptKey(), GWEN_CTF_Context_SetLocalSignKey(), GWEN_CTF_Context_SetRemoteAuthKey(), GWEN_CTF_Context_SetRemoteCryptKey(), GWEN_CTF_Context_SetRemoteSignKey(), and GWEN_CTF_Context_SetTempLocalSignKey().
GWEN_CRYPT_KEY* GWEN_Crypt_Key_fromDb | ( | GWEN_DB_NODE * | db | ) |
Definition at line 77 of file cryptkey.c.
References DBG_ERROR, GWEN_CRYPT_CRYPTALGOID, GWEN_Crypt_CryptAlgoId_fromString(), GWEN_Crypt_Key_new(), GWEN_DB_GetCharValue(), GWEN_DB_GetIntValue(), GWEN_LOGDOMAIN, and NULL.
Referenced by GWEN_Crypt_KeyRsa_fromDb(), GWEN_Crypt_KeySym__fromDb(), and GWEN_Crypt_KeySym_fromDb().
GWEN_CRYPT_CRYPTALGOID GWEN_Crypt_Key_GetCryptAlgoId | ( | const GWEN_CRYPT_KEY * | k | ) |
Definition at line 164 of file cryptkey.c.
Referenced by GWEN_Crypt_KeyRsa_fromDb(), GWEN_Crypt_KeySym__fromDb(), GWEN_Crypt_KeySym_dup(), GWEN_Crypt_KeySym_fromDb(), and GWEN_Crypt_KeySym_toDb().
int GWEN_Crypt_Key_GetKeyNumber | ( | const GWEN_CRYPT_KEY * | k | ) |
Definition at line 178 of file cryptkey.c.
Referenced by GWEN_Crypt_TokenFile__ActivateKey(), GWEN_Crypt_TokenFile__GenerateKey(), and GWEN_CryptMgrKeys_new().
int GWEN_Crypt_Key_GetKeySize | ( | const GWEN_CRYPT_KEY * | k | ) |
Definition at line 171 of file cryptkey.c.
Referenced by GWEN_Crypt_KeyRsa_Decipher(), GWEN_Crypt_KeyRsa_Encipher(), GWEN_Crypt_KeyRsa_Sign(), GWEN_Crypt_KeyRsa_Verify(), GWEN_Crypt_KeySym__fromDb(), GWEN_Crypt_KeySym_dup(), GWEN_Crypt_KeySym_fromDb(), GWEN_CryptMgrKeys_DecryptKey(), GWEN_CryptMgrKeys_EncryptKey(), GWEN_CryptMgrKeys_SignData(), and GWEN_CryptMgrKeys_VerifyData().
int GWEN_Crypt_Key_GetKeyVersion | ( | const GWEN_CRYPT_KEY * | k | ) |
Definition at line 192 of file cryptkey.c.
Referenced by GWEN_Crypt_TokenFile__ActivateKey(), GWEN_Crypt_TokenFile__GenerateKey(), and GWEN_CryptMgrKeys_new().
GWEN_CRYPT_KEY* GWEN_Crypt_Key_new | ( | GWEN_CRYPT_CRYPTALGOID | cryptAlgoId, |
int | keySize | ||
) |
Definition at line 61 of file cryptkey.c.
References GWEN_INHERIT_INIT, GWEN_LIST_INIT, and GWEN_NEW_OBJECT.
Referenced by GWEN_Crypt_Key_dup(), GWEN_Crypt_Key_fromDb(), GWEN_Crypt_KeyRsa_GeneratePair2(), GWEN_Crypt_KeySym_fromData(), and GWEN_Crypt_KeySym_Generate().
GWEN_CRYPT_KEY_DECIPHER_FN GWEN_Crypt_Key_SetDecipherFn | ( | GWEN_CRYPT_KEY * | k, |
GWEN_CRYPT_KEY_DECIPHER_FN | f | ||
) |
Definition at line 243 of file cryptkey.c.
Referenced by GWEN_Crypt_KeyRsa_fromDb(), GWEN_Crypt_KeyRsa_GeneratePair2(), GWEN_Crypt_KeySym__fromDb(), GWEN_Crypt_KeySym_fromData(), GWEN_Crypt_KeySym_fromDb(), and GWEN_Crypt_KeySym_Generate().
GWEN_CRYPT_KEY_ENCIPHER_FN GWEN_Crypt_Key_SetEncipherFn | ( | GWEN_CRYPT_KEY * | k, |
GWEN_CRYPT_KEY_ENCIPHER_FN | f | ||
) |
Definition at line 230 of file cryptkey.c.
Referenced by GWEN_Crypt_KeyRsa_fromDb(), GWEN_Crypt_KeyRsa_GeneratePair2(), GWEN_Crypt_KeySym__fromDb(), GWEN_Crypt_KeySym_fromData(), GWEN_Crypt_KeySym_fromDb(), and GWEN_Crypt_KeySym_Generate().
void GWEN_Crypt_Key_SetKeyNumber | ( | GWEN_CRYPT_KEY * | k, |
int | i | ||
) |
Definition at line 185 of file cryptkey.c.
Referenced by GWEN_Crypt_TokenFile__SetKeyInfo().
void GWEN_Crypt_Key_SetKeyVersion | ( | GWEN_CRYPT_KEY * | k, |
int | i | ||
) |
Definition at line 199 of file cryptkey.c.
Referenced by GWEN_Crypt_TokenFile__SetKeyInfo().
GWEN_CRYPT_KEY_SIGN_FN GWEN_Crypt_Key_SetSignFn | ( | GWEN_CRYPT_KEY * | k, |
GWEN_CRYPT_KEY_SIGN_FN | f | ||
) |
Definition at line 206 of file cryptkey.c.
Referenced by GWEN_Crypt_KeyRsa_fromDb(), and GWEN_Crypt_KeyRsa_GeneratePair2().
GWEN_CRYPT_KEY_VERIFY_FN GWEN_Crypt_Key_SetVerifyFn | ( | GWEN_CRYPT_KEY * | k, |
GWEN_CRYPT_KEY_VERIFY_FN | f | ||
) |
Definition at line 218 of file cryptkey.c.
Referenced by GWEN_Crypt_KeyRsa_fromDb(), and GWEN_Crypt_KeyRsa_GeneratePair2().
int GWEN_Crypt_Key_Sign | ( | GWEN_CRYPT_KEY * | k, |
const uint8_t * | pInData, | ||
uint32_t | inLen, | ||
uint8_t * | pSignatureData, | ||
uint32_t * | pSignatureLen | ||
) |
Definition at line 256 of file cryptkey.c.
References GWEN_ERROR_NOT_IMPLEMENTED.
Referenced by GWEN_Crypt_TokenFile__Sign(), and GWEN_CryptMgrKeys_SignData().
int GWEN_Crypt_Key_toDb | ( | const GWEN_CRYPT_KEY * | k, |
GWEN_DB_NODE * | db | ||
) |
Definition at line 113 of file cryptkey.c.
References GWEN_Crypt_CryptAlgoId_toString(), GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_SetCharValue(), and GWEN_DB_SetIntValue().
Referenced by GWEN_Crypt_KeyRsa_toDb(), GWEN_Crypt_KeySym__toDb(), and GWEN_Crypt_KeySym_toDb().
int GWEN_Crypt_Key_Verify | ( | GWEN_CRYPT_KEY * | k, |
const uint8_t * | pInData, | ||
uint32_t | inLen, | ||
const uint8_t * | pSignatureData, | ||
uint32_t | signatureLen | ||
) |
Definition at line 270 of file cryptkey.c.
References GWEN_ERROR_NOT_IMPLEMENTED.
Referenced by GWEN_Crypt_TokenFile__Verify().