From 49c4fa5b05d322e9cac19ce15ba1426597ab000e Mon Sep 17 00:00:00 2001 From: Philipp Crocoll Date: Tue, 11 Nov 2014 17:19:22 +0100 Subject: [PATCH] fixed issue loading kdb files with key file improved error message by adding messages to loading exceptions in Java --- src/KeePassLib2Android/Keys/KcpKeyFile.cs | 7 +++ .../Serialization/IOConnection.cs | 7 ++- .../database/KdbDatabaseLoader.cs | 10 +--- src/Kp2aUnitTests/Kp2aUnitTests.csproj | 1 - src/Kp2aUnitTests/MainActivity.cs | 3 +- src/Kp2aUnitTests/TestLoadDb.cs | 54 ++++++++++++++++++ .../JavaFileStorage/bin/javafilestorage.jar | Bin 535559 -> 535559 bytes .../KP2AKdbLibrary/bin/kp2akdblibrary.jar | Bin 374659 -> 374816 bytes .../InvalidDBSignatureException.java | 2 +- .../exception/InvalidKeyFileException.java | 6 +- .../exception/InvalidPasswordException.java | 2 +- .../exception/KeyFileEmptyException.java | 2 +- .../bin/keepass2androidpluginsdk.jar | Bin 20359 -> 20359 bytes 13 files changed, 79 insertions(+), 15 deletions(-) diff --git a/src/KeePassLib2Android/Keys/KcpKeyFile.cs b/src/KeePassLib2Android/Keys/KcpKeyFile.cs index 39810ff3..8da75c49 100644 --- a/src/KeePassLib2Android/Keys/KcpKeyFile.cs +++ b/src/KeePassLib2Android/Keys/KcpKeyFile.cs @@ -43,6 +43,7 @@ namespace KeePassLib.Keys { private IOConnectionInfo m_ioc; private ProtectedBinary m_pbKeyData; + private ProtectedBinary m_pbFileData; /// /// Path to the key file. @@ -67,6 +68,11 @@ namespace KeePassLib.Keys get { return m_ioc; } } + public ProtectedBinary RawFileData + { + get { return m_pbFileData; } + } + public KcpKeyFile(string strKeyFile) { Construct(IOConnectionInfo.FromPath(strKeyFile), false); @@ -95,6 +101,7 @@ namespace KeePassLib.Keys private void Construct(byte[] pbFileData, IOConnectionInfo iocKeyFile, bool bThrowIfDbFile) { if (pbFileData == null) throw new Java.IO.FileNotFoundException(); + m_pbFileData = new ProtectedBinary(true, pbFileData); if (bThrowIfDbFile && (pbFileData.Length >= 8)) { diff --git a/src/KeePassLib2Android/Serialization/IOConnection.cs b/src/KeePassLib2Android/Serialization/IOConnection.cs index e02452be..aff3ad2d 100644 --- a/src/KeePassLib2Android/Serialization/IOConnection.cs +++ b/src/KeePassLib2Android/Serialization/IOConnection.cs @@ -647,14 +647,17 @@ namespace KeePassLib.Serialization try { sIn = IOConnection.OpenRead(ioc); - if(sIn == null) return null; + if (sIn == null) return null; ms = new MemoryStream(); MemUtil.CopyStream(sIn, ms); return ms.ToArray(); } - catch(Exception) { } + catch (Exception e) + { + Kp2aLog.Log("error opening file: " + e); + } finally { if(sIn != null) sIn.Close(); diff --git a/src/Kp2aBusinessLogic/database/KdbDatabaseLoader.cs b/src/Kp2aBusinessLogic/database/KdbDatabaseLoader.cs index 7f5c68a0..15831a9a 100644 --- a/src/Kp2aBusinessLogic/database/KdbDatabaseLoader.cs +++ b/src/Kp2aBusinessLogic/database/KdbDatabaseLoader.cs @@ -36,25 +36,21 @@ namespace keepass2android } KcpKeyFile passwordKeyfile = (KcpKeyFile)key.GetUserKey(typeof(KcpKeyFile)); - string keyfile = ""; + MemoryStream keyfileStream = null; if (passwordKeyfile != null) { - keyfile = passwordKeyfile.Path; + keyfileStream = new MemoryStream(passwordKeyfile.RawFileData.ReadData()); } try { - var dbv3 = importer.OpenDatabase(hashingStream, password, keyfile); + var dbv3 = importer.OpenDatabase(hashingStream, password, keyfileStream); db.Name = dbv3.Name; db.RootGroup = ConvertGroup(dbv3.RootGroup); } - catch (InvalidPasswordException e) { - - return; - } catch (Java.IO.FileNotFoundException e) { throw new FileNotFoundException( diff --git a/src/Kp2aUnitTests/Kp2aUnitTests.csproj b/src/Kp2aUnitTests/Kp2aUnitTests.csproj index 90ff6b5d..c4ff09f9 100644 --- a/src/Kp2aUnitTests/Kp2aUnitTests.csproj +++ b/src/Kp2aUnitTests/Kp2aUnitTests.csproj @@ -86,7 +86,6 @@ - diff --git a/src/Kp2aUnitTests/MainActivity.cs b/src/Kp2aUnitTests/MainActivity.cs index 71c1c621..62f0cc66 100644 --- a/src/Kp2aUnitTests/MainActivity.cs +++ b/src/Kp2aUnitTests/MainActivity.cs @@ -19,7 +19,8 @@ namespace Kp2aUnitTests TestRunner runner = new TestRunner(); // Run all tests from this assembly //runner.AddTests(Assembly.GetExecutingAssembly()); - runner.AddTests(new List { typeof(TestIntentsAndBundles) }); + //runner.AddTests(typeof(TestLoadDb).GetMethod("TestLoadKdb1WithKeyfileByDirectCall")); + runner.AddTests(typeof(TestLoadDb).GetMethod("TestLoadKdb1WithKeyfileOnly")); //runner.AddTests(new List { typeof(TestSynchronizeCachedDatabase)}); //runner.AddTests(typeof(TestLoadDb).GetMethod("LoadErrorWithCertificateTrustFailure")); //runner.AddTests(typeof(TestLoadDb).GetMethod("LoadWithAcceptedCertificateTrustFailure")); diff --git a/src/Kp2aUnitTests/TestLoadDb.cs b/src/Kp2aUnitTests/TestLoadDb.cs index 24d800bc..ecf1553b 100644 --- a/src/Kp2aUnitTests/TestLoadDb.cs +++ b/src/Kp2aUnitTests/TestLoadDb.cs @@ -2,11 +2,15 @@ using System.IO; using System.Linq; using Android.App; +using Com.Keepassdroid.Database.Load; +using Java.IO; using KeePassLib; +using KeePassLib.Keys; using KeePassLib.Serialization; using Microsoft.VisualStudio.TestTools.UnitTesting; using keepass2android; using keepass2android.Io; +using FileNotFoundException = System.IO.FileNotFoundException; namespace Kp2aUnitTests { @@ -72,6 +76,56 @@ namespace Kp2aUnitTests Assert.IsFalse(e.Binaries.Any()); } + [TestMethod] + public void TestLoadKdb1WithKeyfileByDirectCall() + { + ImporterV3 importer = new ImporterV3(); + + try + { + FileStream dbStream = new FileStream(TestDbDirectory+"withkeyfile_nopwd.kdb", FileMode.Open); + FileStream keyfileStream = new FileStream(TestDbDirectory + "withkeyfile.key", FileMode.Open); + /* + for (int i = 0; i < 10; i++) + { + int b = keyfileStream.ReadByte(); + Kp2aLog.Log(i+": " + b); + } + keyfileStream.Close(); + Kp2aLog.Log("stream 2"); + var keyfileStream2 = new MemoryStream(new KcpKeyFile(TestDbDirectory + "withkeyfile.key").RawFileData.ReadData()); + for (int i = 0; i < 10; i++) + { + int b = keyfileStream2.ReadByte(); + Kp2aLog.Log(i + ": " + b); + }*/ + importer.OpenDatabase(dbStream, "", keyfileStream); + } + catch (Exception e) + { + Kp2aLog.Log(e.ToString()); + Assert.Fail("exception occured: " + e); + } + + } + + [TestMethod] + public void TestLoadKdb1WithKeyfile() + { + var app = PerformLoad("withkeyfile.kdb", "test", TestDbDirectory + "withkeyfile.key"); + + } + + + [TestMethod] + public void TestLoadKdb1WithKeyfileOnly() + { + var app = PerformLoad("withkeyfile_nopwd.kdb", "", TestDbDirectory + "withkeyfile.key"); + + + + } + [TestMethod] public void TestLoadWithKeyfileOnly() { diff --git a/src/java/JavaFileStorage/bin/javafilestorage.jar b/src/java/JavaFileStorage/bin/javafilestorage.jar index 7d103bf2aff6bb4548dc24f444adc51c01cf24b5..ad0f8e83c8dd2de91d0595caa25bdca674fa5db3 100644 GIT binary patch delta 55 zcmZp_q0oLqfj7XLnMH(wgM)+Noo!|#Z!0fjD=$+kFLNs|ODivHD=*ttUiQob%s|QQ Jl?T}SvH_k%5B2~6 delta 55 zcmZp_q0oLqfj7XLnMH(wgM))1bxCj|Z!0fjD=$+kFLNs|ODivHD=*ttUiQob%s|QQ Jl?T}SvH_EZ4~75$ diff --git a/src/java/KP2AKdbLibrary/bin/kp2akdblibrary.jar b/src/java/KP2AKdbLibrary/bin/kp2akdblibrary.jar index 35d084ab3530b3866986866ce3cd51992db4ebed..a87e7d7ef4145eb1571f1a27454ef0617bdf86e0 100644 GIT binary patch delta 6103 zcmZvg2{={T`^TNV&k7kb&mkl!nM%e;L?kq8M5Pc{k&qmR%rYIUWFAtwWh~Mt>NeAG z3l*uGx=m=f4Og!JyU#wIPQT~h^LX<8yu*6;TJO8|uJ~bvvJnLd4_A^YCnO>wB6KMw zutB0JpDaoVm*^Ki}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-GE$Mev{Z}EHr+aW^tTANY%9eqkV_=xqgdd+?XMB`8)Dp1~WXq zbr5+nV$zid)4%!Sw_5okx-=p2*a5+1KHoaTE@6bEU-U)^0 z?}XsMsIMKQ$+T!jfpsuJht_|sDU$*guZ(4}7O{zgD!LW1nRY>@-Z+Y{#4{p_{aL(Y zE5$*{j0UOP#l|NO#HTDk+5E`?*xAA|Ulof++&* zpGWbOB0L>s=Tl>O0i50|M_}9<)Tkp9QZR6AP&7iX*AI76O{+zqYc#DhVhn|5Pso-H}I z8!tg-6G&S*yDg>oJJjn&jlxpsd6k}=0dGowKA-6A0iQ?SUt?)6yeLvj3izBDO7fRjIi z>klU=Hm!lK*q_1RAYiSN6u&w71*ft2@@W?9k;a42gu38L%NnT_aGjb|0hd;OoVE1{$%a3f}&-QMtpq`MN{NNG0)k+|D@1rkvOC-~0IZ*l!CIAyDBY=hPIV>g@j^J_33u#PBUcu?QECVHmi!3dNkabM0D TkzG#UDp!Mr((~Og{FUW@og?|? diff --git a/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidDBSignatureException.java b/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidDBSignatureException.java index d2ac4aea..5ae3d1c3 100644 --- a/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidDBSignatureException.java +++ b/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidDBSignatureException.java @@ -26,7 +26,7 @@ public class InvalidDBSignatureException extends InvalidDBException { private static final long serialVersionUID = -5358923878743513758L; public InvalidDBSignatureException() { - super(); + super("Invalid database signature"); } } diff --git a/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidKeyFileException.java b/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidKeyFileException.java index 11cd1d8b..38bf7c2f 100644 --- a/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidKeyFileException.java +++ b/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidKeyFileException.java @@ -25,6 +25,10 @@ public class InvalidKeyFileException extends InvalidDBException { private static final long serialVersionUID = 5540694419562294464L; public InvalidKeyFileException() { - super(); + super("invalid key file!"); + } + + public InvalidKeyFileException(String msg) { + super(msg); } } diff --git a/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidPasswordException.java b/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidPasswordException.java index 69096e53..234e4da4 100644 --- a/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidPasswordException.java +++ b/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/InvalidPasswordException.java @@ -31,6 +31,6 @@ public class InvalidPasswordException extends InvalidDBException { } public InvalidPasswordException() { - super(); + super("Invalid key!"); } } diff --git a/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/KeyFileEmptyException.java b/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/KeyFileEmptyException.java index 21a7a101..502e3da0 100644 --- a/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/KeyFileEmptyException.java +++ b/src/java/KP2AKdbLibrary/src/com/keepassdroid/database/exception/KeyFileEmptyException.java @@ -25,6 +25,6 @@ public class KeyFileEmptyException extends InvalidKeyFileException { private static final long serialVersionUID = -1630780661204212325L; public KeyFileEmptyException() { - super(); + super("key file is empty!"); } } diff --git a/src/java/Keepass2AndroidPluginSDK/bin/keepass2androidpluginsdk.jar b/src/java/Keepass2AndroidPluginSDK/bin/keepass2androidpluginsdk.jar index e6e333521129cbfdc9269829e778084ac25a434e..d0f80bff0bac198e97174b1be47d0219d01a445a 100644 GIT binary patch delta 33 ncmZpl&)7bnkvG7bnMH(wgM))Xz%FwmuY@Nvklw7}8P5g)e#!?! delta 33 ncmZpl&)7bnkvG7bnMH(wgM)*iYf11%UI|ZTAiY_`GoB3qkwysD