#include "cryptmgrkeys_p.h"
#include "i18n_l.h"
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/mdigest.h>
#include <gwenhywfar/padd.h>
#include <gwenhywfar/crypthead.h>
#include <gwenhywfar/text.h>
Go to the source code of this file.
Functions | |
GWENHYWFAR_CB int | GWEN_CryptMgrKeys_DecryptKey (GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf) |
GWENHYWFAR_CB int | GWEN_CryptMgrKeys_EncryptKey (GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf) |
GWENHYWFAR_CB void | GWEN_CryptMgrKeys_FreeData (GWEN_UNUSED void *bp, void *p) |
GWEN_CRYPTMGR * | GWEN_CryptMgrKeys_new (const char *localName, GWEN_CRYPT_KEY *localKey, const char *peerName, GWEN_CRYPT_KEY *peerKey, int ownKeys) |
void | GWEN_CryptMgrKeys_SetPeerKey (GWEN_CRYPTMGR *cm, GWEN_CRYPT_KEY *peerKey, int ownKey) |
GWENHYWFAR_CB int | GWEN_CryptMgrKeys_SignData (GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, GWEN_BUFFER *dbuf) |
GWENHYWFAR_CB int | GWEN_CryptMgrKeys_VerifyData (GWEN_CRYPTMGR *cm, const uint8_t *pData, uint32_t lData, const uint8_t *pSignature, uint32_t lSignature) |
GWEN_INHERIT (GWEN_CRYPTMGR, GWEN_CRYPTMGR_KEYS) |
GWENHYWFAR_CB int GWEN_CryptMgrKeys_DecryptKey | ( | GWEN_CRYPTMGR * | cm, | |
const uint8_t * | pData, | |||
uint32_t | lData, | |||
GWEN_BUFFER * | dbuf | |||
) |
Definition at line 330 of file cryptmgrkeys.c.
References DBG_ERROR, DBG_INFO, GWEN_Buffer_AdjustUsedBytes(), GWEN_Buffer_AppendBuffer(), GWEN_Buffer_free(), GWEN_Buffer_GetMaxUnsegmentedWrite(), GWEN_Buffer_GetPosPointer(), GWEN_Buffer_IncrementPos(), GWEN_Buffer_new(), GWEN_Crypt_Key_Decipher(), GWEN_Crypt_Key_GetKeySize(), GWEN_ERROR_GENERIC, GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, GWEN_Padd_UnpaddWithIso9796_2(), and NULL.
Referenced by GWEN_CryptMgrKeys_new().
GWENHYWFAR_CB int GWEN_CryptMgrKeys_EncryptKey | ( | GWEN_CRYPTMGR * | cm, | |
const uint8_t * | pData, | |||
uint32_t | lData, | |||
GWEN_BUFFER * | dbuf | |||
) |
Definition at line 278 of file cryptmgrkeys.c.
References DBG_ERROR, DBG_INFO, GWEN_Buffer_AdjustUsedBytes(), GWEN_Buffer_AllocRoom(), GWEN_Buffer_AppendBytes(), GWEN_Buffer_free(), GWEN_Buffer_GetMaxUnsegmentedWrite(), GWEN_Buffer_GetPosPointer(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_IncrementPos(), GWEN_Buffer_new(), GWEN_Crypt_Key_Encipher(), GWEN_Crypt_Key_GetKeySize(), GWEN_ERROR_GENERIC, GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, GWEN_Padd_PaddWithIso9796_2(), and NULL.
Referenced by GWEN_CryptMgrKeys_new().
GWENHYWFAR_CB void GWEN_CryptMgrKeys_FreeData | ( | GWEN_UNUSED void * | bp, | |
void * | p | |||
) |
Definition at line 78 of file cryptmgrkeys.c.
References GWEN_Crypt_Key_free().
Referenced by GWEN_CryptMgrKeys_new().
GWEN_CRYPTMGR* GWEN_CryptMgrKeys_new | ( | const char * | localName, | |
GWEN_CRYPT_KEY * | localKey, | |||
const char * | peerName, | |||
GWEN_CRYPT_KEY * | peerKey, | |||
int | ownKeys | |||
) |
Definition at line 31 of file cryptmgrkeys.c.
References GWEN_Crypt_Key_GetKeyNumber(), GWEN_Crypt_Key_GetKeyVersion(), GWEN_CryptMgr_new(), GWEN_CryptMgr_SetDecryptKeyFn(), GWEN_CryptMgr_SetEncryptKeyFn(), GWEN_CryptMgr_SetLocalKeyName(), GWEN_CryptMgr_SetLocalKeyNumber(), GWEN_CryptMgr_SetLocalKeyVersion(), GWEN_CryptMgr_SetPeerKeyName(), GWEN_CryptMgr_SetPeerKeyNumber(), GWEN_CryptMgr_SetPeerKeyVersion(), GWEN_CryptMgr_SetSignDataFn(), GWEN_CryptMgr_SetVerifyDataFn(), GWEN_CryptMgrKeys_DecryptKey(), GWEN_CryptMgrKeys_EncryptKey(), GWEN_CryptMgrKeys_FreeData(), GWEN_CryptMgrKeys_SignData(), GWEN_CryptMgrKeys_VerifyData(), GWEN_INHERIT_SETDATA, and GWEN_NEW_OBJECT.
void GWEN_CryptMgrKeys_SetPeerKey | ( | GWEN_CRYPTMGR * | cm, | |
GWEN_CRYPT_KEY * | peerKey, | |||
int | ownKey | |||
) |
Definition at line 91 of file cryptmgrkeys.c.
References GWEN_Crypt_Key_free(), and GWEN_INHERIT_GETDATA.
GWENHYWFAR_CB int GWEN_CryptMgrKeys_SignData | ( | GWEN_CRYPTMGR * | cm, | |
const uint8_t * | pData, | |||
uint32_t | lData, | |||
GWEN_BUFFER * | dbuf | |||
) |
Definition at line 109 of file cryptmgrkeys.c.
References DBG_ERROR, DBG_INFO, GWEN_Buffer_AdjustUsedBytes(), GWEN_Buffer_AllocRoom(), GWEN_Buffer_AppendBytes(), GWEN_Buffer_free(), GWEN_Buffer_GetMaxUnsegmentedWrite(), GWEN_Buffer_GetPosPointer(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_IncrementPos(), GWEN_Buffer_new(), GWEN_Crypt_Key_GetKeySize(), GWEN_Crypt_Key_Sign(), GWEN_ERROR_GENERIC, GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, GWEN_MDigest_Begin(), GWEN_MDigest_End(), GWEN_MDigest_free(), GWEN_MDigest_GetDigestPtr(), GWEN_MDigest_GetDigestSize(), GWEN_MDigest_Rmd160_new(), GWEN_MDigest_Update(), GWEN_Padd_PaddWithIso9796_2(), and NULL.
Referenced by GWEN_CryptMgrKeys_new().
GWENHYWFAR_CB int GWEN_CryptMgrKeys_VerifyData | ( | GWEN_CRYPTMGR * | cm, | |
const uint8_t * | pData, | |||
uint32_t | lData, | |||
const uint8_t * | pSignature, | |||
uint32_t | lSignature | |||
) |
Definition at line 182 of file cryptmgrkeys.c.
References DBG_ERROR, DBG_INFO, GWEN_Buffer_AdjustUsedBytes(), GWEN_Buffer_free(), GWEN_Buffer_GetMaxUnsegmentedWrite(), GWEN_Buffer_GetPosPointer(), GWEN_Buffer_GetStart(), GWEN_Buffer_GetUsedBytes(), GWEN_Buffer_IncrementPos(), GWEN_Buffer_new(), GWEN_Crypt_Key_Encipher(), GWEN_Crypt_Key_GetKeySize(), GWEN_ERROR_GENERIC, GWEN_ERROR_VERIFY, GWEN_INHERIT_GETDATA, GWEN_LOGDOMAIN, GWEN_MDigest_Begin(), GWEN_MDigest_End(), GWEN_MDigest_free(), GWEN_MDigest_GetDigestPtr(), GWEN_MDigest_GetDigestSize(), GWEN_MDigest_Rmd160_new(), GWEN_MDigest_Update(), GWEN_Padd_UnpaddWithIso9796_2(), and NULL.
Referenced by GWEN_CryptMgrKeys_new().
GWEN_INHERIT | ( | GWEN_CRYPTMGR | , | |
GWEN_CRYPTMGR_KEYS | ||||
) |