fixed issue loading kdb files with key file
improved error message by adding messages to loading exceptions in Java
This commit is contained in:
@@ -43,6 +43,7 @@ namespace KeePassLib.Keys
|
||||
{
|
||||
private IOConnectionInfo m_ioc;
|
||||
private ProtectedBinary m_pbKeyData;
|
||||
private ProtectedBinary m_pbFileData;
|
||||
|
||||
/// <summary>
|
||||
/// 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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user