Projekt

Allgemein

Profil

Bug #35 » aqbanking-rah-mode.patch

thbe, 07.08.2019 15:45

Unterschiede anzeigen:

src/libs/plugins/backends/aqhbci/banking/user.c
uint32_t keyHashLen;
char hashString[1024];
int rv;
int i;
/* check if NOTEPAD contained a key hash */
......
GWEN_Buffer_free(keyBuffer);
}
memset(hashString, 0, 1024);
for (i=0; i<GWEN_MDigest_GetDigestSize(md); i++)
sprintf(hashString+3*i, "%02x ", *(mdPtr+i));
DBG_INFO(AQHBCI_LOGDOMAIN, "Key Hash from the Bank Public %s key: Hash Length: %d, Hash: %s", keyName, keyHashLen,
hashString);
if (canVerifyWithHash) {
int i;
uint16_t matchingBytes=keySize;
char cardHashString[1024];
......
memset(cardHashString, 0, 1024);
for (i=0; i<keyHashLen; i++)
sprintf(cardHashString+3*i, "%02x ", keyHash[i]);
DBG_INFO(AQHBCI_LOGDOMAIN, "Key Hash on the Card: Hash Length: %d, Hash: %s", keyHashLen, hashString);
DBG_INFO(AQHBCI_LOGDOMAIN, "Key Hash on the Card: Hash Length: %d, Hash: %s", keyHashLen, cardHashString);
memset(hashString, 0, 1024);
for (i=0; i<GWEN_MDigest_GetDigestSize(md); i++)
sprintf(hashString+3*i, "%02x ", *(mdPtr+i));
DBG_INFO(AQHBCI_LOGDOMAIN, "Key Hash from the Bank Public %s key: Hash Length: %d, Hash: %s", keyName, keyHashLen,
hashString);
if (keyHashLen==mdSize) {
for (i = 0; i < mdSize; i++) {
......
snprintf(numBuf, sizeof(numBuf), "%d",
keyNum);
GWEN_Buffer_AppendString(msgBuffer, numBuf);
GWEN_Buffer_AppendString(msgBuffer, "Key Version: ");
GWEN_Buffer_AppendString(msgBuffer, "\nKey Version: ");
snprintf(numBuf, sizeof(numBuf), "%d",
keyNum);
GWEN_Buffer_AppendString(msgBuffer, numBuf);
......
snprintf(numBuf, sizeof(numBuf), "%d",
mdSize);
GWEN_Buffer_AppendString(msgBuffer, numBuf);
GWEN_Buffer_AppendString(msgBuffer, "Hash Value ");
GWEN_Buffer_AppendString(msgBuffer, ", value ");
if (keyHashAlgo==GWEN_Crypt_HashAlgoId_Sha256) {
/*SHA256*/
GWEN_Buffer_AppendString(msgBuffer, "(SHA256):\n");
src/libs/plugins/backends/aqhbci/dialogs/dlg_newkeyfile.c
/* preset */
xdlg->hbciVersion=210;
xdlg->rdhVersion=0;
xdlg->cryptMode = AH_CryptMode_Rdh;
/* done */
return dlg;
......
AH_User_SetTokenType(u, "ohbci");
AH_User_SetTokenName(u, AH_NewKeyFileDialog_GetFileName(dlg));
AH_User_SetTokenContextId(u, 1);
AH_User_SetCryptMode(u, AH_CryptMode_Rdh);
//AH_User_SetCryptMode(u, AH_CryptMode_Rdh);
AH_User_SetCryptMode(u, xdlg->cryptMode);
AH_User_SetStatus(u, AH_UserStatusPending);
AH_User_SetHbciVersion(u, xdlg->hbciVersion);
AH_User_SetRdhType(u, xdlg->rdhVersion);
......
else {
xdlg->hbciVersion=AH_RdhSpecialDialog_GetHbciVersion(dlg2);
xdlg->rdhVersion=AH_RdhSpecialDialog_GetRdhVersion(dlg2);
xdlg->cryptMode=AH_RdhSpecialDialog_GetCryptMode(dlg2);
xdlg->flags=AH_RdhSpecialDialog_GetFlags(dlg2);
}
src/libs/plugins/backends/aqhbci/dialogs/dlg_newkeyfile_p.h
int hbciVersion;
int rdhVersion;
int cryptMode;
uint32_t flags;
(4-4/7)