summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbcrypt.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-12-05 20:46:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-12-05 20:46:18 +0000
commit41ab2ffa22eab57c55ba73a8a6292a490414eabc (patch)
tree6cd8811f1599f45d4e0af940bda08dc5fe3e58c0 /plugins/Db3x_mmap/src/dbcrypt.cpp
parent0b0980ca4414e0f3771db1e70b16d81914e75596 (diff)
full cycle: setting, resetting, changing password
git-svn-id: http://svn.miranda-ng.org/main/trunk@7058 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbcrypt.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbcrypt.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp
index 179698fb1f..e6bb7e704b 100644
--- a/plugins/Db3x_mmap/src/dbcrypt.cpp
+++ b/plugins/Db3x_mmap/src/dbcrypt.cpp
@@ -161,8 +161,11 @@ LBL_SetNewKey:
if (dbv.cpbVal != (WORD)iKeyLength)
goto LBL_SetNewKey;
- if (!m_crypto->setKey(dbv.pbVal, iKeyLength))
- goto LBL_SetNewKey;
+ if (!m_crypto->setKey(dbv.pbVal, iKeyLength)) {
+ if (!EnterPassword(dbv.pbVal, iKeyLength)) // password protected?
+ return 4;
+ m_bUsesPassword = true;
+ }
FreeVariant(&dbv);
}