summaryrefslogtreecommitdiff
path: root/Dbx_mmap_SA/security.c
diff options
context:
space:
mode:
Diffstat (limited to 'Dbx_mmap_SA/security.c')
-rw-r--r--Dbx_mmap_SA/security.c41
1 files changed, 7 insertions, 34 deletions
diff --git a/Dbx_mmap_SA/security.c b/Dbx_mmap_SA/security.c
index 50e4665..92a82a4 100644
--- a/Dbx_mmap_SA/security.c
+++ b/Dbx_mmap_SA/security.c
@@ -8,8 +8,6 @@ BOOL bEncProcess = 0;
extern HINSTANCE g_hInst;
extern HANDLE hSetPwdMenu = NULL;
-extern BOOL gl_bUnicodeAwareCore;
-
char encryptKey[255];
size_t encryptKeyLength;
@@ -197,23 +195,15 @@ int SelectEncoder()
int i;
if(ModulesCount == 0){
- if (gl_bUnicodeAwareCore)
- MessageBox(0, TranslateT("Crypto modules not found"), TranslateT("Error"), MB_OK);
- else
- MessageBoxA(0, Translate("Crypto modules not found"), Translate("Error"), MB_OK);
+ MessageBox(0, TranslateT("Crypto modules not found"), TranslateT("Error"), MB_OK);
return 1;
}
uid = DBGetContactSettingWord(NULL, "SecureMMAP", "CryptoModule", 0);
if(uid == 0){
- if (gl_bUnicodeAwareCore)
- MessageBox(0, TranslateT("Crypto module hasn't been chosen, using first one found"), TranslateT("Notice"), MB_OK);
- else
- MessageBoxA(0, Translate("Crypto module hasn't been chosen, using first one found"), Translate("Notice"), MB_OK);
-
+ MessageBox(0, TranslateT("Crypto module hasn't been chosen, using first one found"), TranslateT("Notice"), MB_OK);
DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", Modules[0]->cryptor->uid);
-
CryptoEngine = Modules[0]->cryptor;
}
else{
@@ -226,13 +216,8 @@ int SelectEncoder()
}
}
if(!Found){
- if (gl_bUnicodeAwareCore)
- MessageBox(0, TranslateT("Crypto module hasn't been chosen, using first one found"), TranslateT("Notice"), MB_OK);
- else
- MessageBoxA(0, Translate("Crypto module hasn't been chosen, using first one found"), Translate("Notice"), MB_OK);
-
+ MessageBox(0, TranslateT("Crypto module hasn't been chosen, using first one found"), TranslateT("Notice"), MB_OK);
DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", Modules[0]->cryptor->uid);
-
CryptoEngine = Modules[0]->cryptor;
}
}
@@ -313,10 +298,7 @@ void EncryptDB()
if(bEncProcess) return;
if(memcmp(dbHeader.signature, &dbSignatureSecured, sizeof(dbHeader.signature)) == 0){
- if (gl_bUnicodeAwareCore)
- MessageBox(0, TranslateT("DB is already secured!"), TranslateT("Error"), MB_OK);
- else
- MessageBoxA(0, Translate("DB is already secured!"), Translate("Error"), MB_OK);
+ MessageBox(0, TranslateT("DB is already secured!"), TranslateT("Error"), MB_OK);
return;
}
@@ -344,10 +326,7 @@ void EncryptDB()
WriteCryptHeader();
- if (gl_bUnicodeAwareCore)
- xModifyMenu(hSetPwdMenu, 0, LPGENT("Change Password"), 0);
- else
- xModifyMenu(hSetPwdMenu, 0, (TCHAR*) LPGEN ("Change Password"), 0); //ugly hack
+ xModifyMenu(hSetPwdMenu, 0, LPGENT("Change Password"), 0);
bEncProcess = 0;
}
@@ -369,10 +348,7 @@ void DecryptDB()
zero_fill(encryptKey, sizeof encryptKey);
- if (gl_bUnicodeAwareCore)
- xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
- else
- xModifyMenu(hSetPwdMenu, 0, (TCHAR*) LPGEN("Set Password"), 0); //ugly hack
+ xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", 0);
@@ -426,10 +402,7 @@ void ChangePwd()
zero_fill(encryptKey, sizeof encryptKey);
- if (gl_bUnicodeAwareCore)
- xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
- else
- xModifyMenu(hSetPwdMenu, 0, (TCHAR*) LPGEN("Set Password"), 0); //ugly hack
+ xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
}
if(action == IDOK){