mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
WIP Lib 2.37 - databases created by ModernKeepass work fine, but no interoperability...
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
/*
|
||||
KeePass Password Safe - The Open-Source Password Manager
|
||||
Copyright (C) 2003-2014 Dominik Reichl <dominik.reichl@t-online.de>
|
||||
Copyright (C) 2003-2017 Dominik Reichl <dominik.reichl@t-online.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@@ -19,24 +18,27 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Diagnostics;
|
||||
using Windows.Storage.Streams;
|
||||
using System.Threading.Tasks;
|
||||
using ModernKeePassLib.Native;
|
||||
#if (!ModernKeePassLib && !KeePassLibSD && !KeePassRT)
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
#if (!ModernKeePassLib && !KeePassLibSD && !KeePassUAP)
|
||||
using System.Net.Cache;
|
||||
using System.Net.Security;
|
||||
#endif
|
||||
|
||||
#if !ModernKeePassLib && !KeePassRT
|
||||
#if !ModernKeePassLib && !KeePassUAP
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
#endif
|
||||
|
||||
#if ModernKeePassLib
|
||||
using Windows.Storage;
|
||||
using Windows.Storage.Streams;
|
||||
#endif
|
||||
using ModernKeePassLib.Native;
|
||||
using ModernKeePassLib.Utility;
|
||||
|
||||
namespace ModernKeePassLib.Serialization
|
||||
@@ -44,10 +46,17 @@ namespace ModernKeePassLib.Serialization
|
||||
#if (!ModernKeePassLib && !KeePassLibSD && !KeePassRT)
|
||||
internal sealed class IOWebClient : WebClient
|
||||
{
|
||||
private IOConnectionInfo m_ioc;
|
||||
|
||||
public IOWebClient(IOConnectionInfo ioc) : base()
|
||||
{
|
||||
m_ioc = ioc;
|
||||
}
|
||||
|
||||
protected override WebRequest GetWebRequest(Uri address)
|
||||
{
|
||||
WebRequest request = base.GetWebRequest(address);
|
||||
IOConnection.ConfigureWebRequest(request);
|
||||
IOConnection.ConfigureWebRequest(request, m_ioc);
|
||||
return request;
|
||||
}
|
||||
}
|
||||
@@ -581,7 +590,7 @@ namespace ModernKeePassLib.Serialization
|
||||
new Uri(ioc.Path)));
|
||||
}
|
||||
#else
|
||||
public static Stream OpenRead(IOConnectionInfo ioc)
|
||||
public static Stream OpenRead(IOConnectionInfo ioc)
|
||||
{
|
||||
RaiseIOAccessPreEvent(ioc, IOAccessType.Read);
|
||||
|
||||
@@ -700,7 +709,7 @@ namespace ModernKeePassLib.Serialization
|
||||
catch(Exception) { Debug.Assert(false); }
|
||||
}
|
||||
#endif
|
||||
public static byte[] ReadFile(IOConnectionInfo ioc)
|
||||
public static byte[] ReadFile(IOConnectionInfo ioc)
|
||||
{
|
||||
Stream sIn = null;
|
||||
MemoryStream ms = null;
|
||||
|
Reference in New Issue
Block a user