From ce56190f9f3216681be52f2336bb25308fd25c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schramke?= Date: Thu, 9 Oct 2014 09:46:21 +0200 Subject: [PATCH 01/34] add some methods to Poco::Path for make it easy to follow XDG Base Directory Specification --- Foundation/include/Poco/Path.h | 28 +++++++++ Foundation/include/Poco/Path_UNIX.h | 5 ++ Foundation/src/Path.cpp | 49 ++++++++++++++++ Foundation/src/Path_UNIX.cpp | 60 ++++++++++++++++++++ Util/include/Poco/Util/SystemConfiguration.h | 5 ++ Util/src/SystemConfiguration.cpp | 31 ++++++++++ 6 files changed, 178 insertions(+) diff --git a/Foundation/include/Poco/Path.h b/Foundation/include/Poco/Path.h index 5e6f5a0be..ded731f1c 100644 --- a/Foundation/include/Poco/Path.h +++ b/Foundation/include/Poco/Path.h @@ -291,9 +291,37 @@ public: static std::string home(); /// Returns the user's home directory. + static std::string configHome(); + /// Returns the user's config directory. + /// + /// On Unix systems, this is the '~/.config/'. On Windows systems, + /// this is '%APPDATA%'. + + static std::string dataHome(); + /// Returns the user's data directory. + /// + /// On Unix systems, this is the '~/.local/share/'. On Windows systems, + /// this is '%APPDATA%'. + + static std::string tempHome(); + /// Returns the user's temp directory. + /// + /// On Unix systems, this is the '~/.local/temp/'. + + static std::string cacheHome(); + /// Returns the user's cache directory. + /// + /// On Unix systems, this is the '~/.cache/'. On Windows systems, + /// this is '%APPDATA%'. + static std::string temp(); /// Returns the temporary directory. + static std::string config(); + /// Returns the systemwide config directory. + /// + /// On Unix systems, this is the '/etc/'. + static std::string null(); /// Returns the name of the null device. diff --git a/Foundation/include/Poco/Path_UNIX.h b/Foundation/include/Poco/Path_UNIX.h index 89cd14847..744d64242 100644 --- a/Foundation/include/Poco/Path_UNIX.h +++ b/Foundation/include/Poco/Path_UNIX.h @@ -32,7 +32,12 @@ class PathImpl public: static std::string currentImpl(); static std::string homeImpl(); + static std::string configHomeImpl(); + static std::string dataHomeImpl(); + static std::string tempHomeImpl(); + static std::string cacheHomeImpl(); static std::string tempImpl(); + static std::string configImpl(); static std::string nullImpl(); static std::string expandImpl(const std::string& path); static void listRootsImpl(std::vector& roots); diff --git a/Foundation/src/Path.cpp b/Foundation/src/Path.cpp index 6b4e09788..14a605ff9 100644 --- a/Foundation/src/Path.cpp +++ b/Foundation/src/Path.cpp @@ -595,11 +595,60 @@ std::string Path::home() } +std::string Path::configHome() +{ +#if defined(POCO_OS_FAMILY_UNIX) + return PathImpl::configHomeImpl(); +#else + return PathImpl::homeImpl(); +#endif +} + + +std::string Path::dataHome() +{ +#if defined(POCO_OS_FAMILY_UNIX) + return PathImpl::dataHomeImpl(); +#else + return PathImpl::homeImpl(); +#endif +} + + +std::string Path::tempHome() +{ +#if defined(POCO_OS_FAMILY_UNIX) + return PathImpl::tempHomeImpl(); +#else + return PathImpl::tempImpl(); +#endif +} + + +std::string Path::cacheHome() +{ +#if defined(POCO_OS_FAMILY_UNIX) + return PathImpl::cacheHomeImpl(); +#else + return PathImpl::homeImpl(); +#endif +} + + std::string Path::temp() { return PathImpl::tempImpl(); } + +std::string Path::config() +{ +#if defined(POCO_OS_FAMILY_UNIX) + return PathImpl::configImpl(); +#else + return PathImpl::currentImpl(); +#endif +} std::string Path::null() { diff --git a/Foundation/src/Path_UNIX.cpp b/Foundation/src/Path_UNIX.cpp index 6ec7b7ae3..c099689fb 100644 --- a/Foundation/src/Path_UNIX.cpp +++ b/Foundation/src/Path_UNIX.cpp @@ -76,6 +76,58 @@ std::string PathImpl::homeImpl() } +std::string PathImpl::configHomeImpl() +{ +#if defined(POCO_VXWORKS) + return PathImpl::homeImpl(); +#else + std::string path = PathImpl::homeImpl(); + std::string::size_type n = path.size(); + if (n > 0 && path[n - 1] == '/') path.append(".config/"); + return path; +#endif +} + + +std::string PathImpl::dataHomeImpl() +{ +#if defined(POCO_VXWORKS) + return PathImpl::homeImpl(); +#else + std::string path = PathImpl::homeImpl(); + std::string::size_type n = path.size(); + if (n > 0 && path[n - 1] == '/') path.append(".local/share/"); + return path; +#endif +} + + +std::string PathImpl::cacheHomeImpl() +{ +#if defined(POCO_VXWORKS) + return PathImpl::tempImpl(); +#else + std::string path = PathImpl::homeImpl(); + std::string::size_type n = path.size(); + if (n > 0 && path[n - 1] == '/') path.append(".cache/"); + return path; +#endif +} + + +std::string PathImpl::tempHomeImpl() +{ +#if defined(POCO_VXWORKS) + return PathImpl::tempImpl(); +#else + std::string path = PathImpl::homeImpl(); + std::string::size_type n = path.size(); + if (n > 0 && path[n - 1] == '/') path.append(".local/tmp/"); + return path; +#endif +} + + std::string PathImpl::tempImpl() { std::string path; @@ -94,6 +146,14 @@ std::string PathImpl::tempImpl() } +std::string PathImpl::configImpl() +{ + std::string path; + path = "/etc/"; + return path; +} + + std::string PathImpl::nullImpl() { #if defined(POCO_VXWORKS) diff --git a/Util/include/Poco/Util/SystemConfiguration.h b/Util/include/Poco/Util/SystemConfiguration.h index 22458f4fe..c37dec0bf 100644 --- a/Util/include/Poco/Util/SystemConfiguration.h +++ b/Util/include/Poco/Util/SystemConfiguration.h @@ -76,7 +76,12 @@ private: static const std::string NODEID; static const std::string CURRENTDIR; static const std::string HOMEDIR; + static const std::string CONFIGHOMEDIR; + static const std::string CACHEHOMEDIR; + static const std::string DATAHOMEDIR; + static const std::string TEMPHOMEDIR; static const std::string TEMPDIR; + static const std::string CONFIGDIR; static const std::string DATETIME; #if !defined(POCO_VXWORKS) static const std::string PID; diff --git a/Util/src/SystemConfiguration.cpp b/Util/src/SystemConfiguration.cpp index eca32a3d9..abc121763 100644 --- a/Util/src/SystemConfiguration.cpp +++ b/Util/src/SystemConfiguration.cpp @@ -26,6 +26,7 @@ #endif #include "Poco/Exception.h" #include +#include "../../Foundation/include/Poco/Path.h" using Poco::Environment; @@ -43,7 +44,12 @@ const std::string SystemConfiguration::NODENAME = "system.nodeName"; const std::string SystemConfiguration::NODEID = "system.nodeId"; const std::string SystemConfiguration::CURRENTDIR = "system.currentDir"; const std::string SystemConfiguration::HOMEDIR = "system.homeDir"; +const std::string SystemConfiguration::CONFIGHOMEDIR = "system.configHomeDir"; +const std::string SystemConfiguration::CACHEHOMEDIR = "system.cacheHomeDir"; +const std::string SystemConfiguration::DATAHOMEDIR = "system.dataHomeDir"; +const std::string SystemConfiguration::TEMPHOMEDIR = "system.tempHomeDir"; const std::string SystemConfiguration::TEMPDIR = "system.tempDir"; +const std::string SystemConfiguration::CONFIGDIR = "system.configDir"; const std::string SystemConfiguration::DATETIME = "system.dateTime"; #if !defined(POCO_VXWORKS) const std::string SystemConfiguration::PID = "system.pid"; @@ -108,10 +114,30 @@ bool SystemConfiguration::getRaw(const std::string& key, std::string& value) con { value = Path::home(); } + else if (key == CONFIGHOMEDIR) + { + value = Path::configHome(); + } + else if (key == CACHEHOMEDIR) + { + value = Path::cacheHome(); + } + else if (key == DATAHOMEDIR) + { + value = Path::dataHome(); + } + else if (key == TEMPHOMEDIR) + { + value = Path::tempHome(); + } else if (key == TEMPDIR) { value = Path::temp(); } + else if (key == CONFIGDIR) + { + value = Path::config(); + } else if (key == DATETIME) { value = Poco::DateTimeFormatter::format(Poco::DateTime(), Poco::DateTimeFormat::ISO8601_FORMAT); @@ -153,7 +179,12 @@ void SystemConfiguration::enumerate(const std::string& key, Keys& range) const range.push_back("nodeId"); range.push_back("currentDir"); range.push_back("homeDir"); + range.push_back("configHomeDir"); + range.push_back("cacheHomeDir"); + range.push_back("dataHomeDir"); + range.push_back("tempHomeDir"); range.push_back("tempDir"); + range.push_back("configDir"); range.push_back("dateTime"); #if !defined(POCO_VXWORKS) range.push_back("pid"); From 1aaa61f3c8926dc6c9772e709256cc9a5b16cae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schramke?= Date: Thu, 9 Oct 2014 17:48:42 +0200 Subject: [PATCH 02/34] add new path values (configHome,cacheHome, etc) application config --- Util/include/Poco/Util/Application.h | 1 + Util/src/Application.cpp | 28 +++++++++++++++++++++++++++- Util/src/SystemConfiguration.cpp | 1 - 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Util/include/Poco/Util/Application.h b/Util/include/Poco/Util/Application.h index 30b826d9b..bc87863ea 100644 --- a/Util/include/Poco/Util/Application.h +++ b/Util/include/Poco/Util/Application.h @@ -366,6 +366,7 @@ private: void getApplicationPath(Poco::Path& path) const; void processOptions(); bool findAppConfigFile(const std::string& appName, const std::string& extension, Poco::Path& path) const; + bool findAppConfigFile(const Path& basePath,const std::string& appName, const std::string& extension, Poco::Path& path) const; typedef Poco::AutoPtr SubsystemPtr; typedef std::vector SubsystemVec; diff --git a/Util/src/Application.cpp b/Util/src/Application.cpp index bba976495..f5c05c3e3 100644 --- a/Util/src/Application.cpp +++ b/Util/src/Application.cpp @@ -162,7 +162,10 @@ void Application::init() _pConfig->setString("application.name", appPath.getFileName()); _pConfig->setString("application.baseName", appPath.getBaseName()); _pConfig->setString("application.dir", appPath.parent().toString()); - _pConfig->setString("application.configDir", appPath.parent().toString()); + _pConfig->setString("application.configDir", Path::configHome() + appPath.getBaseName() + Path::separator()); + _pConfig->setString("application.cacheDir", Path::cacheHome() + appPath.getBaseName() + Path::separator()); + _pConfig->setString("application.tempDir", Path::tempHome() + appPath.getBaseName() + Path::separator()); + _pConfig->setString("application.dataDir", Path::dataHome() + appPath.getBaseName() + Path::separator()); processOptions(); } @@ -482,6 +485,29 @@ bool Application::findAppConfigFile(const std::string& appName, const std::strin } +bool Application::findAppConfigFile(const Path& basePath, const std::string& appName, const std::string& extension, Path& path) const +{ + poco_assert (!appName.empty()); + + Path p(basePath,appName); + p.setExtension(extension); + bool found = findFile(p); + if (!found) + { +#if defined(_DEBUG) + if (appName[appName.length() - 1] == 'd') + { + p.setBaseName(appName.substr(0, appName.length() - 1)); + found = findFile(p); + } +#endif + } + if (found) + path = p; + return found; +} + + void Application::defineOptions(OptionSet& options) { for (SubsystemVec::iterator it = _subsystems.begin(); it != _subsystems.end(); ++it) diff --git a/Util/src/SystemConfiguration.cpp b/Util/src/SystemConfiguration.cpp index abc121763..c37830a3d 100644 --- a/Util/src/SystemConfiguration.cpp +++ b/Util/src/SystemConfiguration.cpp @@ -26,7 +26,6 @@ #endif #include "Poco/Exception.h" #include -#include "../../Foundation/include/Poco/Path.h" using Poco::Environment; From cd1195275e0f0a01070dd7fb9ed19d8e8b1f54f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schramke?= Date: Thu, 9 Oct 2014 17:57:56 +0200 Subject: [PATCH 03/34] add new path values (configHome,cacheHome, etc) application config --- Util/include/Poco/Util/Application.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Util/include/Poco/Util/Application.h b/Util/include/Poco/Util/Application.h index bc87863ea..30b826d9b 100644 --- a/Util/include/Poco/Util/Application.h +++ b/Util/include/Poco/Util/Application.h @@ -366,7 +366,6 @@ private: void getApplicationPath(Poco::Path& path) const; void processOptions(); bool findAppConfigFile(const std::string& appName, const std::string& extension, Poco::Path& path) const; - bool findAppConfigFile(const Path& basePath,const std::string& appName, const std::string& extension, Poco::Path& path) const; typedef Poco::AutoPtr SubsystemPtr; typedef std::vector SubsystemVec; From 8b5e855b6f63a7a24a843f091d6b942eadd7112c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schramke?= Date: Fri, 10 Oct 2014 16:12:13 +0200 Subject: [PATCH 04/34] Update Application.h Add missing method declaration --- Util/include/Poco/Util/Application.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Util/include/Poco/Util/Application.h b/Util/include/Poco/Util/Application.h index 30b826d9b..9ae92e2c0 100644 --- a/Util/include/Poco/Util/Application.h +++ b/Util/include/Poco/Util/Application.h @@ -366,6 +366,7 @@ private: void getApplicationPath(Poco::Path& path) const; void processOptions(); bool findAppConfigFile(const std::string& appName, const std::string& extension, Poco::Path& path) const; + bool findAppConfigFile(const Path& basePath, const std::string& appName, const std::string& extension, Poco::Path& path) const; typedef Poco::AutoPtr SubsystemPtr; typedef std::vector SubsystemVec; From 8c06af97221dc067b2ff9f873a99dd3cae413dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schramke?= Date: Sat, 11 Oct 2014 08:58:54 +0200 Subject: [PATCH 05/34] add OSX compliant implementation of XDG Base Directory Specification --- Foundation/src/Path_UNIX.cpp | 39 +++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/Foundation/src/Path_UNIX.cpp b/Foundation/src/Path_UNIX.cpp index c099689fb..a5b0c2782 100644 --- a/Foundation/src/Path_UNIX.cpp +++ b/Foundation/src/Path_UNIX.cpp @@ -83,7 +83,13 @@ std::string PathImpl::configHomeImpl() #else std::string path = PathImpl::homeImpl(); std::string::size_type n = path.size(); - if (n > 0 && path[n - 1] == '/') path.append(".config/"); + if (n > 0 && path[n - 1] == '/') +#if POCO_OS == POCO_OS_MAC_OS_X + path.append("Library/Preferences/"); +#else + path.append(".config/"); +#endif + return path; #endif } @@ -96,7 +102,13 @@ std::string PathImpl::dataHomeImpl() #else std::string path = PathImpl::homeImpl(); std::string::size_type n = path.size(); - if (n > 0 && path[n - 1] == '/') path.append(".local/share/"); + if (n > 0 && path[n - 1] == '/') +#if POCO_OS == POCO_OS_MAC_OS_X + path.append("Library/Application Support/"); +#else + path.append(".local/share/"); +#endif + return path; #endif } @@ -109,7 +121,13 @@ std::string PathImpl::cacheHomeImpl() #else std::string path = PathImpl::homeImpl(); std::string::size_type n = path.size(); - if (n > 0 && path[n - 1] == '/') path.append(".cache/"); + if (n > 0 && path[n - 1] == '/') +#if POCO_OS == POCO_OS_MAC_OS_X + path.append("Library/Caches/"); +#else + path.append(".cache/"); +#endif + return path; #endif } @@ -122,7 +140,13 @@ std::string PathImpl::tempHomeImpl() #else std::string path = PathImpl::homeImpl(); std::string::size_type n = path.size(); - if (n > 0 && path[n - 1] == '/') path.append(".local/tmp/"); + if (n > 0 && path[n - 1] == '/') +#if POCO_OS == POCO_OS_MAC_OS_X + path.append("Library/Caches/"); +#else + path.append(".local/tmp/"); +#endif + return path; #endif } @@ -149,7 +173,12 @@ std::string PathImpl::tempImpl() std::string PathImpl::configImpl() { std::string path; - path = "/etc/"; + +#if POCO_OS == POCO_OS_MAC_OS_X + path = "/Library/Preferences/"; +#else + path = "/etc/"; +#endif return path; } From 2a90e7de92bb7501fe369c31a8489c6b36cc8980 Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Sun, 19 Oct 2014 10:59:08 +0100 Subject: [PATCH 06/34] Moved work for isue 532 into it's own branch. --- Foundation/include/Poco/Mutex_WIN32.h | 22 +++- Foundation/src/Mutex_WIN32.cpp | 94 ++++++++++++++ Foundation/testsuite/Makefile-Driver | 2 +- Foundation/testsuite/TestSuite.vxbuild | 1 + Foundation/testsuite/TestSuite_CE_vs90.vcproj | 8 ++ .../testsuite/TestSuite_WEC2013_vs110.vcxproj | 2 + .../TestSuite_WEC2013_vs110.vcxproj.filters | 6 + .../testsuite/TestSuite_WEC2013_vs120.vcxproj | 2 + .../TestSuite_WEC2013_vs120.vcxproj.filters | 6 + Foundation/testsuite/TestSuite_vs100.vcxproj | 2 + .../testsuite/TestSuite_vs100.vcxproj.filters | 6 + Foundation/testsuite/TestSuite_vs110.vcxproj | 2 + .../testsuite/TestSuite_vs110.vcxproj.filters | 6 + Foundation/testsuite/TestSuite_vs120.vcxproj | 2 + .../testsuite/TestSuite_vs120.vcxproj.filters | 6 + Foundation/testsuite/TestSuite_vs71.vcproj | 6 + Foundation/testsuite/TestSuite_vs80.vcproj | 8 ++ Foundation/testsuite/TestSuite_vs90.vcproj | 8 ++ .../testsuite/TestSuite_x64_vs100.vcxproj | 2 + .../TestSuite_x64_vs100.vcxproj.filters | 6 + .../testsuite/TestSuite_x64_vs110.vcxproj | 2 + .../TestSuite_x64_vs110.vcxproj.filters | 6 + .../testsuite/TestSuite_x64_vs120.vcxproj | 2 + .../TestSuite_x64_vs120.vcxproj.filters | 6 + .../testsuite/TestSuite_x64_vs90.vcproj | 8 ++ Foundation/testsuite/src/MutexTest.cpp | 122 ++++++++++++++++++ Foundation/testsuite/src/MutexTest.h | 40 ++++++ .../testsuite/src/ThreadingTestSuite.cpp | 2 + 28 files changed, 383 insertions(+), 2 deletions(-) create mode 100644 Foundation/testsuite/src/MutexTest.cpp create mode 100644 Foundation/testsuite/src/MutexTest.h diff --git a/Foundation/include/Poco/Mutex_WIN32.h b/Foundation/include/Poco/Mutex_WIN32.h index 110fcf4b7..dc871bfb3 100644 --- a/Foundation/include/Poco/Mutex_WIN32.h +++ b/Foundation/include/Poco/Mutex_WIN32.h @@ -43,7 +43,20 @@ private: }; -typedef MutexImpl FastMutexImpl; +class Foundation_API FastMutexImpl +{ +protected: + FastMutexImpl(); + ~FastMutexImpl(); + void lockImpl(); + bool tryLockImpl(); + bool tryLockImpl(long milliseconds); + void unlockImpl(); + +private: + CRITICAL_SECTION _cs; + int _lockCount; +}; // @@ -81,6 +94,13 @@ inline void MutexImpl::unlockImpl() } +inline void FastMutexImpl::unlockImpl() +{ + --_lockCount; + LeaveCriticalSection(&_cs); +} + + } // namespace Poco diff --git a/Foundation/src/Mutex_WIN32.cpp b/Foundation/src/Mutex_WIN32.cpp index e80064f77..5700cc35b 100644 --- a/Foundation/src/Mutex_WIN32.cpp +++ b/Foundation/src/Mutex_WIN32.cpp @@ -15,6 +15,7 @@ #include "Poco/Mutex_WIN32.h" +#include "Poco/Thread.h" #include "Poco/Timestamp.h" @@ -58,4 +59,97 @@ bool MutexImpl::tryLockImpl(long milliseconds) } +FastMutexImpl::FastMutexImpl() + : _lockCount(0) +{ + // the fct has a boolean return value under WInnNt/2000/XP but not on Win98 + // the return only checks if the input address of &_cs was valid, so it is safe to omit it + InitializeCriticalSectionAndSpinCount(&_cs, 4000); +} + + +FastMutexImpl::~FastMutexImpl() +{ + DeleteCriticalSection(&_cs); +} + + +void FastMutexImpl::lockImpl() +{ + try + { + EnterCriticalSection(&_cs); + ++_lockCount; + + if (_lockCount > 1) + { + // We're trying to go recursive so self-deadlock + Thread::current()->join(); + } + } + catch (...) + { + throw SystemException("cannot lock mutex"); + } +} + + +bool FastMutexImpl::tryLockImpl() +{ + try + { + if (TryEnterCriticalSection(&_cs) == 0) + return false; + + if (_lockCount > 0) + { + // We're trying to go recursive + LeaveCriticalSection(&_cs); + return false; + } + + ++_lockCount; + return true; + } + catch (...) + { + } + throw SystemException("cannot lock mutex"); +} + + +bool FastMutexImpl::tryLockImpl(long milliseconds) +{ + const int sleepMillis = 5; + Timestamp now; + Timestamp::TimeDiff diff(Timestamp::TimeDiff(milliseconds)*1000); + + do + { + try + { + if (TryEnterCriticalSection(&_cs) == TRUE) + { + if (_lockCount == 0) + { + ++_lockCount; + return true; + } + + // We're trying to go recursive + LeaveCriticalSection(&_cs); + Sleep(milliseconds); + return false; + } + } + catch (...) + { + throw SystemException("cannot lock mutex"); + } + Sleep(sleepMillis); + } while (!now.isElapsed(diff)); + return false; +} + + } // namespace Poco diff --git a/Foundation/testsuite/Makefile-Driver b/Foundation/testsuite/Makefile-Driver index f6e6ed18b..e8c63c2f2 100644 --- a/Foundation/testsuite/Makefile-Driver +++ b/Foundation/testsuite/Makefile-Driver @@ -24,7 +24,7 @@ objects = ActiveMethodTest ActivityTest ActiveDispatcherTest \ NotificationsTestSuite NullStreamTest NumberFormatterTest \ NumberParserTest PathTest PatternFormatterTest PBKDF2EngineTest RWLockTest \ RandomStreamTest RandomTest RegularExpressionTest SHA1EngineTest \ - SemaphoreTest ConditionTest SharedLibraryTest SharedLibraryTestSuite \ + SemaphoreTest MutexTest ConditionTest SharedLibraryTest SharedLibraryTestSuite \ SimpleFileChannelTest StopwatchTest \ StreamConverterTest StreamCopierTest StreamTokenizerTest \ StreamsTestSuite StringTest StringTokenizerTest TaskTestSuite TaskTest \ diff --git a/Foundation/testsuite/TestSuite.vxbuild b/Foundation/testsuite/TestSuite.vxbuild index f6bc668d3..973cc8671 100644 --- a/Foundation/testsuite/TestSuite.vxbuild +++ b/Foundation/testsuite/TestSuite.vxbuild @@ -66,6 +66,7 @@ SOURCES=" ManifestTest.cpp MemoryPoolTest.cpp MemoryStreamTest.cpp + MutexTest.cpp NDCTest.cpp NotificationCenterTest.cpp NotificationQueueTest.cpp diff --git a/Foundation/testsuite/TestSuite_CE_vs90.vcproj b/Foundation/testsuite/TestSuite_CE_vs90.vcproj index ec965cc18..133be0ef7 100644 --- a/Foundation/testsuite/TestSuite_CE_vs90.vcproj +++ b/Foundation/testsuite/TestSuite_CE_vs90.vcproj @@ -1074,6 +1074,10 @@ RelativePath=".\src\ConditionTest.cpp" > + + @@ -1122,6 +1126,10 @@ RelativePath=".\src\ConditionTest.h" > + + diff --git a/Foundation/testsuite/TestSuite_WEC2013_vs110.vcxproj b/Foundation/testsuite/TestSuite_WEC2013_vs110.vcxproj index ef0272349..6a61bb9ab 100644 --- a/Foundation/testsuite/TestSuite_WEC2013_vs110.vcxproj +++ b/Foundation/testsuite/TestSuite_WEC2013_vs110.vcxproj @@ -340,6 +340,7 @@ + @@ -477,6 +478,7 @@ + diff --git a/Foundation/testsuite/TestSuite_WEC2013_vs110.vcxproj.filters b/Foundation/testsuite/TestSuite_WEC2013_vs110.vcxproj.filters index 09c1055a8..d6753d31a 100644 --- a/Foundation/testsuite/TestSuite_WEC2013_vs110.vcxproj.filters +++ b/Foundation/testsuite/TestSuite_WEC2013_vs110.vcxproj.filters @@ -336,6 +336,9 @@ Threading\Source Files + + Threading\Source Files + Threading\Source Files @@ -746,6 +749,9 @@ Threading\Header Files + + Threading\Header Files + Threading\Header Files diff --git a/Foundation/testsuite/TestSuite_WEC2013_vs120.vcxproj b/Foundation/testsuite/TestSuite_WEC2013_vs120.vcxproj index bf0f80d9c..adf82a629 100644 --- a/Foundation/testsuite/TestSuite_WEC2013_vs120.vcxproj +++ b/Foundation/testsuite/TestSuite_WEC2013_vs120.vcxproj @@ -343,6 +343,7 @@ + @@ -480,6 +481,7 @@ + diff --git a/Foundation/testsuite/TestSuite_WEC2013_vs120.vcxproj.filters b/Foundation/testsuite/TestSuite_WEC2013_vs120.vcxproj.filters index 09c1055a8..d6753d31a 100644 --- a/Foundation/testsuite/TestSuite_WEC2013_vs120.vcxproj.filters +++ b/Foundation/testsuite/TestSuite_WEC2013_vs120.vcxproj.filters @@ -336,6 +336,9 @@ Threading\Source Files + + Threading\Source Files + Threading\Source Files @@ -746,6 +749,9 @@ Threading\Header Files + + Threading\Header Files + Threading\Header Files diff --git a/Foundation/testsuite/TestSuite_vs100.vcxproj b/Foundation/testsuite/TestSuite_vs100.vcxproj index 5c00215c6..4a6303364 100644 --- a/Foundation/testsuite/TestSuite_vs100.vcxproj +++ b/Foundation/testsuite/TestSuite_vs100.vcxproj @@ -360,6 +360,7 @@ + @@ -498,6 +499,7 @@ + diff --git a/Foundation/testsuite/TestSuite_vs100.vcxproj.filters b/Foundation/testsuite/TestSuite_vs100.vcxproj.filters index 3d1e13b6c..448b4375a 100644 --- a/Foundation/testsuite/TestSuite_vs100.vcxproj.filters +++ b/Foundation/testsuite/TestSuite_vs100.vcxproj.filters @@ -330,6 +330,9 @@ Threading\Source Files + + Threading\Source Files + Threading\Source Files @@ -740,6 +743,9 @@ Threading\Header Files + + Threading\Header Files + Threading\Header Files diff --git a/Foundation/testsuite/TestSuite_vs110.vcxproj b/Foundation/testsuite/TestSuite_vs110.vcxproj index 12af3746f..ce4a95364 100644 --- a/Foundation/testsuite/TestSuite_vs110.vcxproj +++ b/Foundation/testsuite/TestSuite_vs110.vcxproj @@ -365,6 +365,7 @@ + @@ -503,6 +504,7 @@ + diff --git a/Foundation/testsuite/TestSuite_vs110.vcxproj.filters b/Foundation/testsuite/TestSuite_vs110.vcxproj.filters index 5826f6b50..da77db8bd 100644 --- a/Foundation/testsuite/TestSuite_vs110.vcxproj.filters +++ b/Foundation/testsuite/TestSuite_vs110.vcxproj.filters @@ -336,6 +336,9 @@ Threading\Source Files + + Threading\Source Files + Threading\Source Files @@ -746,6 +749,9 @@ Threading\Header Files + + Threading\Header Files + Threading\Header Files diff --git a/Foundation/testsuite/TestSuite_vs120.vcxproj b/Foundation/testsuite/TestSuite_vs120.vcxproj index 7b9b07f68..184c63e2a 100644 --- a/Foundation/testsuite/TestSuite_vs120.vcxproj +++ b/Foundation/testsuite/TestSuite_vs120.vcxproj @@ -388,6 +388,7 @@ + @@ -525,6 +526,7 @@ + diff --git a/Foundation/testsuite/TestSuite_vs120.vcxproj.filters b/Foundation/testsuite/TestSuite_vs120.vcxproj.filters index 57dee76b7..f8a87ea2c 100644 --- a/Foundation/testsuite/TestSuite_vs120.vcxproj.filters +++ b/Foundation/testsuite/TestSuite_vs120.vcxproj.filters @@ -336,6 +336,9 @@ Threading\Source Files + + Threading\Source Files + Threading\Source Files @@ -743,6 +746,9 @@ Threading\Header Files + + Threading\Header Files + Threading\Header Files diff --git a/Foundation/testsuite/TestSuite_vs71.vcproj b/Foundation/testsuite/TestSuite_vs71.vcproj index c9c589105..a5cf195cc 100644 --- a/Foundation/testsuite/TestSuite_vs71.vcproj +++ b/Foundation/testsuite/TestSuite_vs71.vcproj @@ -775,6 +775,9 @@ + + @@ -812,6 +815,9 @@ + + diff --git a/Foundation/testsuite/TestSuite_vs80.vcproj b/Foundation/testsuite/TestSuite_vs80.vcproj index 369511176..9931f9202 100644 --- a/Foundation/testsuite/TestSuite_vs80.vcproj +++ b/Foundation/testsuite/TestSuite_vs80.vcproj @@ -1043,6 +1043,10 @@ RelativePath=".\src\ConditionTest.cpp" > + + @@ -1091,6 +1095,10 @@ RelativePath=".\src\ConditionTest.h" > + + diff --git a/Foundation/testsuite/TestSuite_vs90.vcproj b/Foundation/testsuite/TestSuite_vs90.vcproj index ce71ad1b5..f49443a71 100644 --- a/Foundation/testsuite/TestSuite_vs90.vcproj +++ b/Foundation/testsuite/TestSuite_vs90.vcproj @@ -1029,6 +1029,10 @@ RelativePath=".\src\ConditionTest.cpp" > + + @@ -1077,6 +1081,10 @@ RelativePath=".\src\ConditionTest.h" > + + diff --git a/Foundation/testsuite/TestSuite_x64_vs100.vcxproj b/Foundation/testsuite/TestSuite_x64_vs100.vcxproj index c0dd320a8..4d1533133 100644 --- a/Foundation/testsuite/TestSuite_x64_vs100.vcxproj +++ b/Foundation/testsuite/TestSuite_x64_vs100.vcxproj @@ -359,6 +359,7 @@ + @@ -498,6 +499,7 @@ + diff --git a/Foundation/testsuite/TestSuite_x64_vs100.vcxproj.filters b/Foundation/testsuite/TestSuite_x64_vs100.vcxproj.filters index 731605748..95fa60b22 100644 --- a/Foundation/testsuite/TestSuite_x64_vs100.vcxproj.filters +++ b/Foundation/testsuite/TestSuite_x64_vs100.vcxproj.filters @@ -339,6 +339,9 @@ Threading\Source Files + + Threading\Source Files + Threading\Source Files @@ -752,6 +755,9 @@ Threading\Header Files + + Threading\Header Files + Threading\Header Files diff --git a/Foundation/testsuite/TestSuite_x64_vs110.vcxproj b/Foundation/testsuite/TestSuite_x64_vs110.vcxproj index d6f2f49bc..d4925a7a2 100644 --- a/Foundation/testsuite/TestSuite_x64_vs110.vcxproj +++ b/Foundation/testsuite/TestSuite_x64_vs110.vcxproj @@ -365,6 +365,7 @@ + @@ -504,6 +505,7 @@ + diff --git a/Foundation/testsuite/TestSuite_x64_vs110.vcxproj.filters b/Foundation/testsuite/TestSuite_x64_vs110.vcxproj.filters index 6a1fd5330..e93991ff3 100644 --- a/Foundation/testsuite/TestSuite_x64_vs110.vcxproj.filters +++ b/Foundation/testsuite/TestSuite_x64_vs110.vcxproj.filters @@ -336,6 +336,9 @@ Threading\Source Files + + Threading\Source Files + Threading\Source Files @@ -749,6 +752,9 @@ Threading\Header Files + + Threading\Header Files + Threading\Header Files diff --git a/Foundation/testsuite/TestSuite_x64_vs120.vcxproj b/Foundation/testsuite/TestSuite_x64_vs120.vcxproj index af0a446fa..5042d647f 100644 --- a/Foundation/testsuite/TestSuite_x64_vs120.vcxproj +++ b/Foundation/testsuite/TestSuite_x64_vs120.vcxproj @@ -372,6 +372,7 @@ + @@ -510,6 +511,7 @@ + diff --git a/Foundation/testsuite/TestSuite_x64_vs120.vcxproj.filters b/Foundation/testsuite/TestSuite_x64_vs120.vcxproj.filters index ebd700818..f1072639f 100644 --- a/Foundation/testsuite/TestSuite_x64_vs120.vcxproj.filters +++ b/Foundation/testsuite/TestSuite_x64_vs120.vcxproj.filters @@ -336,6 +336,9 @@ Threading\Source Files + + Threading\Source Files + Threading\Source Files @@ -749,6 +752,9 @@ Threading\Header Files + + Threading\Header Files + Threading\Header Files diff --git a/Foundation/testsuite/TestSuite_x64_vs90.vcproj b/Foundation/testsuite/TestSuite_x64_vs90.vcproj index 704ac1cf2..49979b696 100644 --- a/Foundation/testsuite/TestSuite_x64_vs90.vcproj +++ b/Foundation/testsuite/TestSuite_x64_vs90.vcproj @@ -1023,6 +1023,10 @@ RelativePath=".\src\ConditionTest.cpp" > + + @@ -1071,6 +1075,10 @@ RelativePath=".\src\ConditionTest.h" > + + diff --git a/Foundation/testsuite/src/MutexTest.cpp b/Foundation/testsuite/src/MutexTest.cpp new file mode 100644 index 000000000..3bab661b6 --- /dev/null +++ b/Foundation/testsuite/src/MutexTest.cpp @@ -0,0 +1,122 @@ +// +// MutexTest.cpp +// +// $Id: //poco/1.4/Foundation/testsuite/src/MutexTest.cpp#1 $ +// +// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#include "MutexTest.h" +#include "CppUnit/TestCaller.h" +#include "CppUnit/TestSuite.h" +#include "Poco/Exception.h" +#include "Poco/Mutex.h" +#include "Poco/Runnable.h" +#include "Poco/Thread.h" +#include "Poco/Timestamp.h" + + +using Poco::FastMutex; +using Poco::Runnable; +using Poco::SystemException; +using Poco::Thread; +using Poco::Timestamp; + +namespace +{ + class SelfDeadlockRunnable: public Runnable + { + public: + SelfDeadlockRunnable(): + _ran(false) + { + } + + void run() + { + try + { + FastMutex mtx; + mtx.lock(); + mtx.lock(); + } + catch (...) + { + } + + _ran = true; + } + + bool ran() const + { + return _ran; + } + + private: + bool _ran; + }; +} + + +MutexTest::MutexTest(const std::string& name): CppUnit::TestCase(name) +{ +} + + +MutexTest::~MutexTest() +{ +} + + +void MutexTest::testFastMutexRecursion() +{ + FastMutex mtx; + mtx.lock(); + + bool success = mtx.tryLock(); + assert (!success); + + Timestamp mark; + success = mtx.tryLock(2000); // Wait 2 seconds + assert (!success); + + // Test that we waited approx. 2 sec + Timestamp::TimeDiff elapsed = mark.elapsed(); + assert (elapsed > 1000000); + assert (elapsed < 3000000); + + success = mtx.tryLock(0); + assert (!success); + + SelfDeadlockRunnable r; + Thread t; + + t.start(r); + success = t.tryJoin(2000); + assert (!success); + assert (!r.ran()); +} + + +void MutexTest::setUp() +{ +} + + +void MutexTest::tearDown() +{ +} + + +CppUnit::Test* MutexTest::suite() +{ + CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("MutexTest"); + + CppUnit_addTest(pSuite, MutexTest, testFastMutexRecursion); + + return pSuite; +} diff --git a/Foundation/testsuite/src/MutexTest.h b/Foundation/testsuite/src/MutexTest.h new file mode 100644 index 000000000..3d3a5586c --- /dev/null +++ b/Foundation/testsuite/src/MutexTest.h @@ -0,0 +1,40 @@ +// +// MutexTest.h +// +// $Id: //poco/1.4/Foundation/testsuite/src/MutexTest.h#1 $ +// +// Definition of the MutexTest class. +// +// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#ifndef MutexTest_INCLUDED +#define MutexTest_INCLUDED + + +#include "Poco/Foundation.h" +#include "CppUnit/TestCase.h" + + +class MutexTest: public CppUnit::TestCase +{ +public: + MutexTest(const std::string& name); + ~MutexTest(); + + void testFastMutexRecursion(); + + void setUp(); + void tearDown(); + + static CppUnit::Test* suite(); + +private: +}; + + +#endif // MutexTest_INCLUDED diff --git a/Foundation/testsuite/src/ThreadingTestSuite.cpp b/Foundation/testsuite/src/ThreadingTestSuite.cpp index 481396b8f..f06d470c0 100644 --- a/Foundation/testsuite/src/ThreadingTestSuite.cpp +++ b/Foundation/testsuite/src/ThreadingTestSuite.cpp @@ -12,6 +12,7 @@ #include "ThreadingTestSuite.h" #include "ThreadTest.h" +#include "MutexTest.h" #include "SemaphoreTest.h" #include "RWLockTest.h" #include "ThreadPoolTest.h" @@ -28,6 +29,7 @@ CppUnit::Test* ThreadingTestSuite::suite() CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ThreadingTestSuite"); pSuite->addTest(ThreadTest::suite()); + pSuite->addTest(MutexTest::suite()); pSuite->addTest(SemaphoreTest::suite()); pSuite->addTest(RWLockTest::suite()); pSuite->addTest(ThreadPoolTest::suite()); From 120fd4433cbb31e683f5879ab60e07098986c1b7 Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Sun, 19 Oct 2014 18:11:43 +0100 Subject: [PATCH 07/34] Simplified the timed try lock implementation. --- Foundation/src/Mutex_WIN32.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Foundation/src/Mutex_WIN32.cpp b/Foundation/src/Mutex_WIN32.cpp index 5700cc35b..5dda34e1f 100644 --- a/Foundation/src/Mutex_WIN32.cpp +++ b/Foundation/src/Mutex_WIN32.cpp @@ -128,19 +128,8 @@ bool FastMutexImpl::tryLockImpl(long milliseconds) { try { - if (TryEnterCriticalSection(&_cs) == TRUE) - { - if (_lockCount == 0) - { - ++_lockCount; - return true; - } - - // We're trying to go recursive - LeaveCriticalSection(&_cs); - Sleep(milliseconds); - return false; - } + if (tryLockImpl()) + return true; } catch (...) { From 728e71116c0db468315c35a2610b9637fbd4198f Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Mon, 27 Oct 2014 09:36:08 +0000 Subject: [PATCH 08/34] Updated CMakeLists files so test suites will build with wdexpress2012. Possibly requiring update are: Data/MySQL/testsuite/CMakeLists.txt NetSSL_OpenSSL/testsuite/CMakeLists.txt --- CMakeLists.txt | 1 + CppUnit/CMakeLists.txt | 4 +++- Data/ODBC/testsuite/CMakeLists.txt | 18 ++++++++++++----- Data/SQLite/testsuite/CMakeLists.txt | 20 +++++++++++++------ Data/testsuite/CMakeLists.txt | 20 +++++++++++++------ Foundation/testsuite/CMakeLists.txt | 17 ++++++++++------ JSON/testsuite/CMakeLists.txt | 18 ++++++++++++----- MongoDB/testsuite/CMakeLists.txt | 20 +++++++++++++------ Net/testsuite/CMakeLists.txt | 18 ++++++++++++----- PDF/testsuite/CMakeLists.txt | 18 ++++++++++++----- Util/testsuite/CMakeLists.txt | 30 ++++++++++++++++++++-------- XML/testsuite/CMakeLists.txt | 18 ++++++++++++----- Zip/testsuite/CMakeLists.txt | 18 ++++++++++++----- 13 files changed, 157 insertions(+), 63 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d92438f68..b7af45041 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,7 @@ option(ENABLE_DATA "Enable Data" ON) option(ENABLE_SEVENZIP "Enable SevenZip" ON) option(ENABLE_ZIP "Enable Zip" ON) option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" ON) +option(ENABLE_WINTESTRUNNER "Enable GUI test runner for WIN32 platforms" ON) option(ENABLE_TESTS "Set to OFF|ON (default is OFF) to control build of POCO tests & samples" OFF) diff --git a/CppUnit/CMakeLists.txt b/CppUnit/CMakeLists.txt index 9fbec4b0b..826e98245 100644 --- a/CppUnit/CMakeLists.txt +++ b/CppUnit/CMakeLists.txt @@ -16,5 +16,7 @@ set_target_properties( ${LIBNAME} target_link_libraries( ${LIBNAME} ) if(WIN32) - add_subdirectory(WinTestRunner) + if(ENABLE_WINTESTRUNNER) + add_subdirectory(WinTestRunner) + endif(ENABLE_WINTESTRUNNER) endif(WIN32) diff --git a/Data/ODBC/testsuite/CMakeLists.txt b/Data/ODBC/testsuite/CMakeLists.txt index c5abab781..ec38b30b5 100644 --- a/Data/ODBC/testsuite/CMakeLists.txt +++ b/Data/ODBC/testsuite/CMakeLists.txt @@ -2,21 +2,29 @@ set(TESTUNIT "${LIBNAME}-testrunner") # Sources file(GLOB SRCS_G "src/*.cpp") +file(GLOB SRCS_G_REMOVE + src/WinDriver.cpp +) +list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE}) POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) # Headers file(GLOB_RECURSE HDRS_G "src/*.h" ) POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G}) -POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 - src/WinDriver.cpp -) +if(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinDriver.cpp + ) +endif(ENABLE_WINTESTRUNNER) add_executable( ${TESTUNIT} ${TEST_SRCS} ) add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all) target_link_libraries( ${TESTUNIT} PocoDataODBC PocoData PocoFoundation CppUnit ) if( WIN32) - add_definitions("-D_AFXDLL") - target_link_libraries( ${TESTUNIT} WinTestRunner) + if(ENABLE_WINTESTRUNNER) + add_definitions("-D_AFXDLL") + target_link_libraries( ${TESTUNIT} WinTestRunner) + endif(ENABLE_WINTESTRUNNER) endif(WIN32) diff --git a/Data/SQLite/testsuite/CMakeLists.txt b/Data/SQLite/testsuite/CMakeLists.txt index dc330a978..712848e8b 100644 --- a/Data/SQLite/testsuite/CMakeLists.txt +++ b/Data/SQLite/testsuite/CMakeLists.txt @@ -2,22 +2,30 @@ set(TESTUNIT "${LIBNAME}-testrunner") # Sources file(GLOB SRCS_G "src/*.cpp") +file(GLOB SRCS_G_REMOVE + src/WinDriver.cpp +) +list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE}) POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) # Headers file(GLOB_RECURSE HDRS_G "src/*.h" ) POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G}) -POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 - src/WinDriver.cpp -) +if(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinDriver.cpp + ) +endif(ENABLE_WINTESTRUNNER) add_executable( ${TESTUNIT} ${TEST_SRCS} ) add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all) target_link_libraries( ${TESTUNIT} PocoDataSQLite PocoData PocoFoundation CppUnit ) if( WIN32) - #TODO: Is this flag always required? - add_definitions("-D_AFXDLL") - target_link_libraries( ${TESTUNIT} WinTestRunner) + if(ENABLE_WINTESTRUNNER) + #TODO: Is this flag always required? + add_definitions("-D_AFXDLL") + target_link_libraries( ${TESTUNIT} WinTestRunner) + endif(ENABLE_WINTESTRUNNER) endif(WIN32) diff --git a/Data/testsuite/CMakeLists.txt b/Data/testsuite/CMakeLists.txt index e61d85b9a..c2af0402e 100644 --- a/Data/testsuite/CMakeLists.txt +++ b/Data/testsuite/CMakeLists.txt @@ -2,15 +2,21 @@ set(TESTUNIT "${LIBNAME}-testrunner") # Sources file(GLOB SRCS_G "src/*.cpp") +file(GLOB SRCS_G_REMOVE + src/WinDriver.cpp +) +list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE}) POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) # Headers file(GLOB_RECURSE HDRS_G "src/*.h" ) POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G}) -POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 - src/WinDriver.cpp -) +if(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinDriver.cpp + ) +endif(ENABLE_WINTESTRUNNER) #TODO: Why is this file there? It doesn't compile if it is include in the sources POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF @@ -21,7 +27,9 @@ add_executable( ${TESTUNIT} ${TEST_SRCS} ) add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all) target_link_libraries( ${TESTUNIT} PocoData PocoUtil PocoXML PocoFoundation CppUnit) if( WIN32) - #TODO: Is this flag always required? - add_definitions("-D_AFXDLL") - target_link_libraries( ${TESTUNIT} WinTestRunner) + if(ENABLE_WINTESTRUNNER) + #TODO: Is this flag always required? + add_definitions("-D_AFXDLL") + target_link_libraries( ${TESTUNIT} WinTestRunner) + endif(ENABLE_WINTESTRUNNER) endif(WIN32) diff --git a/Foundation/testsuite/CMakeLists.txt b/Foundation/testsuite/CMakeLists.txt index 7c00313ed..ad9f966f5 100644 --- a/Foundation/testsuite/CMakeLists.txt +++ b/Foundation/testsuite/CMakeLists.txt @@ -2,11 +2,12 @@ set(TESTUNIT "${LIBNAME}-testrunner") # Sources file(GLOB SRCS_G "src/*.cpp") -file(GLOB SRCS_G_REMOVE +file(GLOB SRCS_G_REMOVE src/TestApp.cpp src/TestApp_WINCE.cpp src/TestLibrary.cpp src/TestPlugin.cpp + src/WinDriver.cpp ) list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE}) POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) @@ -15,9 +16,11 @@ POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) file(GLOB_RECURSE HDRS_G "src/*.h" ) POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G}) -POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 - src/WinDriver.cpp -) +if(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinDriver.cpp + ) +endif(ENABLE_WINTESTRUNNER) POCO_SOURCES_PLAT( TEST_SRCS FoundationTest WINCE src/WinCEDriver.cpp @@ -29,8 +32,10 @@ set_tests_properties(${LIBNAME} PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=.") # Th #set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} ) target_link_libraries( ${TESTUNIT} PocoFoundation CppUnit ) if( WIN32) - add_definitions("-D_AFXDLL") - target_link_libraries( ${TESTUNIT} WinTestRunner) + if(ENABLE_WINTESTRUNNER) + add_definitions("-D_AFXDLL") + target_link_libraries( ${TESTUNIT} WinTestRunner) + endif(ENABLE_WINTESTRUNNER) else() target_link_libraries( ${TESTUNIT} pthread) endif(WIN32) diff --git a/JSON/testsuite/CMakeLists.txt b/JSON/testsuite/CMakeLists.txt index 65fa85d5b..24fc64d9b 100644 --- a/JSON/testsuite/CMakeLists.txt +++ b/JSON/testsuite/CMakeLists.txt @@ -2,22 +2,30 @@ set(TESTUNIT "${LIBNAME}-testrunner") # Sources file(GLOB SRCS_G "src/*.cpp") +file(GLOB SRCS_G_REMOVE + src/WinDriver.cpp +) +list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE}) POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) # Headers file(GLOB_RECURSE HDRS_G "src/*.h" ) POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G}) -POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 - src/WinDriver.cpp -) +if(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinDriver.cpp + ) +endif(ENABLE_WINTESTRUNNER) add_executable( ${TESTUNIT} ${TEST_SRCS} ) add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all) target_link_libraries( ${TESTUNIT} PocoJSON PocoFoundation CppUnit ) if( WIN32) - add_definitions("-D_AFXDLL") - target_link_libraries( ${TESTUNIT} WinTestRunner) + if(ENABLE_WINTESTRUNNER) + add_definitions("-D_AFXDLL") + target_link_libraries( ${TESTUNIT} WinTestRunner) + endif(ENABLE_WINTESTRUNNER) endif(WIN32) # The test is run in the build directory. So the test data is copied there too diff --git a/MongoDB/testsuite/CMakeLists.txt b/MongoDB/testsuite/CMakeLists.txt index 6a0c9ce23..235575f09 100644 --- a/MongoDB/testsuite/CMakeLists.txt +++ b/MongoDB/testsuite/CMakeLists.txt @@ -2,15 +2,21 @@ set(TESTUNIT "${LIBNAME}-testrunner") # Sources file(GLOB SRCS_G "src/*.cpp") +file(GLOB SRCS_G_REMOVE + src/WinDriver.cpp +) +list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE}) POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) # Headers file(GLOB_RECURSE HDRS_G "src/*.h" ) POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G}) -POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 - src/WinDriver.cpp -) +if(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinDriver.cpp + ) +endif(ENABLE_WINTESTRUNNER) set(TESTUNIT "${LIBNAME}-testrunner") @@ -18,7 +24,9 @@ add_executable( ${TESTUNIT} ${TEST_SRCS} ) add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all) target_link_libraries( ${TESTUNIT} PocoMongoDB PocoFoundation CppUnit ) if( WIN32) - #TODO: Is this flag always required? - add_definitions("-D_AFXDLL") - target_link_libraries( ${TESTUNIT} WinTestRunner) + if(ENABLE_WINTESTRUNNER) + #TODO: Is this flag always required? + add_definitions("-D_AFXDLL") + target_link_libraries( ${TESTUNIT} WinTestRunner) + endif(ENABLE_WINTESTRUNNER) endif(WIN32) diff --git a/Net/testsuite/CMakeLists.txt b/Net/testsuite/CMakeLists.txt index 4eb688052..1eb6e618b 100644 --- a/Net/testsuite/CMakeLists.txt +++ b/Net/testsuite/CMakeLists.txt @@ -2,20 +2,28 @@ set(TESTUNIT "${LIBNAME}-testrunner") # Sources file(GLOB SRCS_G "src/*.cpp") +file(GLOB SRCS_G_REMOVE + src/WinDriver.cpp +) +list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE}) POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) # Headers file(GLOB_RECURSE HDRS_G "src/*.h" ) POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G}) -POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 - src/WinDriver.cpp -) +if(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinDriver.cpp + ) +endif(ENABLE_WINTESTRUNNER) add_executable( ${TESTUNIT} ${TEST_SRCS} ) add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all) target_link_libraries( ${TESTUNIT} PocoNet PocoUtil PocoXML PocoFoundation CppUnit) if( WIN32) - add_definitions("-D_AFXDLL") - target_link_libraries( ${TESTUNIT} WinTestRunner) + if(ENABLE_WINTESTRUNNER) + add_definitions("-D_AFXDLL") + target_link_libraries( ${TESTUNIT} WinTestRunner) + endif(ENABLE_WINTESTRUNNER) endif(WIN32) diff --git a/PDF/testsuite/CMakeLists.txt b/PDF/testsuite/CMakeLists.txt index f4046d781..2e51188f7 100644 --- a/PDF/testsuite/CMakeLists.txt +++ b/PDF/testsuite/CMakeLists.txt @@ -2,21 +2,29 @@ set(TESTUNIT "${LIBNAME}-testrunner") # Sources file(GLOB SRCS_G "src/*.cpp") +file(GLOB SRCS_G_REMOVE + src/WinDriver.cpp +) +list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE}) POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) # Headers file(GLOB_RECURSE HDRS_G "src/*.h" ) POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G}) -POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 - src/WinDriver.cpp -) +if(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinDriver.cpp + ) +endif(ENABLE_WINTESTRUNNER) add_executable( ${TESTUNIT} ${TEST_SRCS} ) add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all) target_link_libraries( ${TESTUNIT} PocoPDF PocoFoundation CppUnit ) if( WIN32) - add_definitions("-D_AFXDLL") - target_link_libraries( ${TESTUNIT} WinTestRunner) + if(ENABLE_WINTESTRUNNER) + add_definitions("-D_AFXDLL") + target_link_libraries( ${TESTUNIT} WinTestRunner) + endif(ENABLE_WINTESTRUNNER) endif(WIN32) diff --git a/Util/testsuite/CMakeLists.txt b/Util/testsuite/CMakeLists.txt index 30e30225b..44e0e23ce 100644 --- a/Util/testsuite/CMakeLists.txt +++ b/Util/testsuite/CMakeLists.txt @@ -2,18 +2,30 @@ set(TESTUNIT "${LIBNAME}-testrunner") # Sources file(GLOB SRCS_G "src/*.cpp") +file(GLOB SRCS_G_REMOVE + src/WinDriver.cpp +) +list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE}) POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) # Headers file(GLOB_RECURSE HDRS_G "src/*.h" ) POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G}) -POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 - src/WinDriver.cpp - src/WinConfigurationTest.cpp - src/WinRegistryTest.cpp - src/WindowsTestSuite.cpp -) +if(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinDriver.cpp + src/WinConfigurationTest.cpp + src/WinRegistryTest.cpp + src/WindowsTestSuite.cpp + ) +else(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinConfigurationTest.cpp + src/WinRegistryTest.cpp + src/WindowsTestSuite.cpp + ) +endif(ENABLE_WINTESTRUNNER) POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE src/WinCEDriver.cpp @@ -23,6 +35,8 @@ add_executable( ${TESTUNIT} ${TEST_SRCS} ) add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all) target_link_libraries( ${TESTUNIT} PocoUtil PocoJSON PocoXML PocoFoundation CppUnit) if( WIN32) - add_definitions("-D_AFXDLL") - target_link_libraries( ${TESTUNIT} WinTestRunner) + if(ENABLE_WINTESTRUNNER) + add_definitions("-D_AFXDLL") + target_link_libraries( ${TESTUNIT} WinTestRunner) + endif(ENABLE_WINTESTRUNNER) endif(WIN32) diff --git a/XML/testsuite/CMakeLists.txt b/XML/testsuite/CMakeLists.txt index d7983d223..301b38137 100644 --- a/XML/testsuite/CMakeLists.txt +++ b/XML/testsuite/CMakeLists.txt @@ -2,15 +2,21 @@ set(TESTUNIT "${LIBNAME}-testrunner") # Sources file(GLOB SRCS_G "src/*.cpp") +file(GLOB SRCS_G_REMOVE + src/WinDriver.cpp +) +list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE}) POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) # Headers file(GLOB_RECURSE HDRS_G "src/*.h" ) POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G}) -POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 - src/WinDriver.cpp -) +if(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinDriver.cpp + ) +endif(ENABLE_WINTESTRUNNER) POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE src/WinCEDriver.cpp @@ -20,7 +26,9 @@ add_executable( ${TESTUNIT} ${TEST_SRCS} ) add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${TESTUNIT} -all) target_link_libraries( ${TESTUNIT} PocoXML PocoFoundation CppUnit) if( WIN32) - add_definitions("-D_AFXDLL") - target_link_libraries( ${TESTUNIT} WinTestRunner) + if(ENABLE_WINTESTRUNNER) + add_definitions("-D_AFXDLL") + target_link_libraries( ${TESTUNIT} WinTestRunner) + endif(ENABLE_WINTESTRUNNER) endif(WIN32) diff --git a/Zip/testsuite/CMakeLists.txt b/Zip/testsuite/CMakeLists.txt index af1547ec9..7ab973a25 100644 --- a/Zip/testsuite/CMakeLists.txt +++ b/Zip/testsuite/CMakeLists.txt @@ -2,15 +2,21 @@ set(TESTUNIT "${LIBNAME}-testrunner") # Sources file(GLOB SRCS_G "src/*.cpp") +file(GLOB SRCS_G_REMOVE + src/WinDriver.cpp +) +list(REMOVE_ITEM SRCS_G ${SRCS_G_REMOVE}) POCO_SOURCES_AUTO( TEST_SRCS ${SRCS_G}) # Headers file(GLOB_RECURSE HDRS_G "src/*.h" ) POCO_HEADERS_AUTO( TEST_SRCS ${HDRS_G}) -POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 - src/WinDriver.cpp -) +if(ENABLE_WINTESTRUNNER) + POCO_SOURCES_AUTO_PLAT( TEST_SRCS WIN32 + src/WinDriver.cpp + ) +endif(ENABLE_WINTESTRUNNER) POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE src/WinCEDriver.cpp @@ -21,8 +27,10 @@ add_test(NAME ${LIBNAME} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND $ #set_target_properties( ${TESTUNIT} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} ) target_link_libraries( ${TESTUNIT} PocoZip PocoNet PocoFoundation CppUnit ) if( WIN32) - add_definitions("-D_AFXDLL") - target_link_libraries( ${TESTUNIT} WinTestRunner) + if(ENABLE_WINTESTRUNNER) + add_definitions("-D_AFXDLL") + target_link_libraries( ${TESTUNIT} WinTestRunner) + endif(ENABLE_WINTESTRUNNER) endif(WIN32) # The test is run in the build directory. So the test data is copied there too From 1e1822f6c62a7644d72e0a772aa9889865487fb0 Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Sat, 1 Nov 2014 09:38:56 +0000 Subject: [PATCH 09/34] Updated FastMutex documentation. --- Foundation/include/Poco/Mutex.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Foundation/include/Poco/Mutex.h b/Foundation/include/Poco/Mutex.h index 40c9dc0ac..c4f849e7d 100644 --- a/Foundation/include/Poco/Mutex.h +++ b/Foundation/include/Poco/Mutex.h @@ -96,10 +96,11 @@ private: class Foundation_API FastMutex: private FastMutexImpl /// A FastMutex (mutual exclusion) is similar to a Mutex. - /// Unlike a Mutex, however, a FastMutex is not recursive, - /// which means that a deadlock will occur if the same - /// thread tries to lock a mutex it has already locked again. - /// Locking a FastMutex is faster than locking a recursive Mutex. + /// Locking a FastMutex is guaranteed to be at least as + /// fast as locking a Mutex. However, a FastMutex is not + /// guaranteed to be either recursive or non-recursive. + /// It is best suited to thread safe components like pools, + /// caches and queues where locking is internal to the component. /// Using the ScopedLock class is the preferred way to automatically /// lock and unlock a mutex. { From b3ed2d94b51fe56284cfff99881119062b446e4e Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Sat, 1 Nov 2014 12:29:49 +0000 Subject: [PATCH 10/34] Supress VS compiler warning C4512: assignment operator could not be generated --- Foundation/include/Poco/Mutex_WIN32.h | 4 ++++ Foundation/include/Poco/Mutex_WINCE.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Foundation/include/Poco/Mutex_WIN32.h b/Foundation/include/Poco/Mutex_WIN32.h index ee6e3dc0a..6ae48d005 100644 --- a/Foundation/include/Poco/Mutex_WIN32.h +++ b/Foundation/include/Poco/Mutex_WIN32.h @@ -42,6 +42,10 @@ private: CRITICAL_SECTION _cs; int _lockCount; const bool _recursive; + +private: + MutexImpl(const MutexImpl&); + MutexImpl& operator = (const MutexImpl&); }; diff --git a/Foundation/include/Poco/Mutex_WINCE.h b/Foundation/include/Poco/Mutex_WINCE.h index ba9123f17..8f672d46d 100644 --- a/Foundation/include/Poco/Mutex_WINCE.h +++ b/Foundation/include/Poco/Mutex_WINCE.h @@ -42,6 +42,10 @@ private: HANDLE _mutex; int _lockCount; const bool _recursive; + +private: + MutexImpl(const MutexImpl&); + MutexImpl& operator = (const MutexImpl&); }; From 6ec97847436ae2f1b5e02af5942a084fb791dd84 Mon Sep 17 00:00:00 2001 From: Martin Osborne Date: Wed, 5 Nov 2014 17:08:36 +0000 Subject: [PATCH 11/34] Added simple benchmark of mutex performance. --- Foundation/samples/Benchmark/CMakeLists.txt | 7 ++ .../samples/Benchmark/src/Benchmark.cpp | 72 +++++++++++++++++++ Foundation/samples/CMakeLists.txt | 1 + 3 files changed, 80 insertions(+) create mode 100644 Foundation/samples/Benchmark/CMakeLists.txt create mode 100644 Foundation/samples/Benchmark/src/Benchmark.cpp diff --git a/Foundation/samples/Benchmark/CMakeLists.txt b/Foundation/samples/Benchmark/CMakeLists.txt new file mode 100644 index 000000000..b632f7fc0 --- /dev/null +++ b/Foundation/samples/Benchmark/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SAMPLE_NAME "MutexBenchmark") + +set(LOCAL_SRCS "") +aux_source_directory(src LOCAL_SRCS) + +add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) +target_link_libraries( ${SAMPLE_NAME} PocoFoundation ) diff --git a/Foundation/samples/Benchmark/src/Benchmark.cpp b/Foundation/samples/Benchmark/src/Benchmark.cpp new file mode 100644 index 000000000..8c4098035 --- /dev/null +++ b/Foundation/samples/Benchmark/src/Benchmark.cpp @@ -0,0 +1,72 @@ +// +// Benchmark.cpp +// +// $Id$ +// +// This sample shows a benchmark of various mutex implementations. +// +// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#include "Poco/Mutex.h" +#include "Poco/Stopwatch.h" +#include +#include + +template +void Benchmark(Mtx& mtx, std::string const& label) +{ + Poco::Stopwatch sw; + sw.start(); + + const int LOOP_COUNT = 100000000; + for (int i = 0 ; i < LOOP_COUNT ; ++i) + { + mtx.lock(); + mtx.unlock(); + } + + mtx.lock(); + + for (int i = 0 ; i < LOOP_COUNT ; ++i) + { + mtx.unlock(); + mtx.lock(); + } + + mtx.unlock(); + + sw.stop(); + + std::cout << label << ' ' << sw.elapsed() << " [us]" << std::endl; +} + + +int main(int argc, char** argv) +{ + { + Poco::NullMutex mtx; + Benchmark(mtx, "NullMutex"); + } + + { + Poco::Mutex mtx(true); + Benchmark(mtx, "Mutex(true)"); + } + + { + Poco::Mutex mtx(false); + Benchmark(mtx, "Mutex(false)"); + } + + { + Poco::FastMutex mtx; + Benchmark(mtx, "FastMutex"); + } + + return 0; +} diff --git a/Foundation/samples/CMakeLists.txt b/Foundation/samples/CMakeLists.txt index 77b4bddde..3a4f527d9 100644 --- a/Foundation/samples/CMakeLists.txt +++ b/Foundation/samples/CMakeLists.txt @@ -1,5 +1,6 @@ add_subdirectory(ActiveMethod) add_subdirectory(Activity) +add_subdirectory(Benchmark) add_subdirectory(BinaryReaderWriter) add_subdirectory(DateTime) add_subdirectory(LogRotation) From b663902c6838a0714d9d13162914a4f83a506a5a Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Fri, 7 Nov 2014 10:03:30 +0000 Subject: [PATCH 12/34] Simplified benchmark --- Foundation/samples/Benchmark/src/Benchmark.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Foundation/samples/Benchmark/src/Benchmark.cpp b/Foundation/samples/Benchmark/src/Benchmark.cpp index 8c4098035..dac13c848 100644 --- a/Foundation/samples/Benchmark/src/Benchmark.cpp +++ b/Foundation/samples/Benchmark/src/Benchmark.cpp @@ -23,12 +23,7 @@ void Benchmark(Mtx& mtx, std::string const& label) Poco::Stopwatch sw; sw.start(); - const int LOOP_COUNT = 100000000; - for (int i = 0 ; i < LOOP_COUNT ; ++i) - { - mtx.lock(); - mtx.unlock(); - } + const int LOOP_COUNT = 1000000000; mtx.lock(); From 06e59cb7a7bb8dc565fab2f7b391ab4292e1f531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schramke?= Date: Tue, 11 Nov 2014 17:05:48 +0100 Subject: [PATCH 13/34] add Windows compliant implementation of XDG Base Directory Specification --- Foundation/include/Poco/Path_WIN32.h | 5 ++ Foundation/include/Poco/Path_WIN32U.h | 5 ++ Foundation/src/Path.cpp | 10 ++-- Foundation/src/Path_WIN32.cpp | 73 +++++++++++++++++++++++++++ Foundation/src/Path_WIN32U.cpp | 73 +++++++++++++++++++++++++++ 5 files changed, 161 insertions(+), 5 deletions(-) diff --git a/Foundation/include/Poco/Path_WIN32.h b/Foundation/include/Poco/Path_WIN32.h index f609fff9c..4959cf2d4 100644 --- a/Foundation/include/Poco/Path_WIN32.h +++ b/Foundation/include/Poco/Path_WIN32.h @@ -32,7 +32,12 @@ class Foundation_API PathImpl public: static std::string currentImpl(); static std::string homeImpl(); + static std::string configHomeImpl(); + static std::string dataHomeImpl(); + static std::string cacheHomeImpl(); + static std::string tempHomeImpl(); static std::string tempImpl(); + static std::string configImpl(); static std::string nullImpl(); static std::string systemImpl(); static std::string expandImpl(const std::string& path); diff --git a/Foundation/include/Poco/Path_WIN32U.h b/Foundation/include/Poco/Path_WIN32U.h index eca10e52f..69df10e08 100644 --- a/Foundation/include/Poco/Path_WIN32U.h +++ b/Foundation/include/Poco/Path_WIN32U.h @@ -32,7 +32,12 @@ class Foundation_API PathImpl public: static std::string currentImpl(); static std::string homeImpl(); + static std::string configHomeImpl(); + static std::string dataHomeImpl(); + static std::string cacheHomeImpl(); + static std::string tempHomeImpl(); static std::string tempImpl(); + static std::string configImpl(); static std::string nullImpl(); static std::string systemImpl(); static std::string expandImpl(const std::string& path); diff --git a/Foundation/src/Path.cpp b/Foundation/src/Path.cpp index 14a605ff9..3953b4a67 100644 --- a/Foundation/src/Path.cpp +++ b/Foundation/src/Path.cpp @@ -597,7 +597,7 @@ std::string Path::home() std::string Path::configHome() { -#if defined(POCO_OS_FAMILY_UNIX) +#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_FAMILY_WINDOWS) return PathImpl::configHomeImpl(); #else return PathImpl::homeImpl(); @@ -607,7 +607,7 @@ std::string Path::configHome() std::string Path::dataHome() { -#if defined(POCO_OS_FAMILY_UNIX) +#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_FAMILY_WINDOWS) return PathImpl::dataHomeImpl(); #else return PathImpl::homeImpl(); @@ -617,7 +617,7 @@ std::string Path::dataHome() std::string Path::tempHome() { -#if defined(POCO_OS_FAMILY_UNIX) +#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_FAMILY_WINDOWS) return PathImpl::tempHomeImpl(); #else return PathImpl::tempImpl(); @@ -627,7 +627,7 @@ std::string Path::tempHome() std::string Path::cacheHome() { -#if defined(POCO_OS_FAMILY_UNIX) +#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_FAMILY_WINDOWS) return PathImpl::cacheHomeImpl(); #else return PathImpl::homeImpl(); @@ -643,7 +643,7 @@ std::string Path::temp() std::string Path::config() { -#if defined(POCO_OS_FAMILY_UNIX) +#if defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_FAMILY_WINDOWS) return PathImpl::configImpl(); #else return PathImpl::currentImpl(); diff --git a/Foundation/src/Path_WIN32.cpp b/Foundation/src/Path_WIN32.cpp index 76165821c..b863b6b43 100644 --- a/Foundation/src/Path_WIN32.cpp +++ b/Foundation/src/Path_WIN32.cpp @@ -74,6 +74,59 @@ std::string PathImpl::homeImpl() } +std::string PathImpl::configHomeImpl() +{ + std::string result; + + // if APPDATA environment variable not exist, return home directory instead + try + { + result = EnvironmentImpl::getImpl("APPDATA"); + } + catch (NotFoundException&) + { + result = homeImpl(); + } + + std::string::size_type n = result.size(); + if (n > 0 && result[n - 1] != '\\') + result.append("\\"); + return result; +} + + +std::string PathImpl::dataHomeImpl() +{ + std::string result; + + // if LOCALAPPDATA environment variable not exist, return config home instead + try + { + result = EnvironmentImpl::getImpl("LOCALAPPDATA"); + } + catch (NotFoundException&) + { + result = configHomeImpl(); + } + + std::string::size_type n = result.size(); + if (n > 0 && result[n - 1] != '\\') + result.append("\\"); + return result; +} + + +std::string PathImpl::cacheHomeImpl() +{ + return tempImpl(); +} + + +std::string PathImpl::tempHomeImpl() +{ + return tempImpl(); +} + std::string PathImpl::tempImpl() { char buffer[MAX_PATH]; @@ -91,6 +144,26 @@ std::string PathImpl::tempImpl() } +std::string PathImpl::configImpl() +{ + std::string result; + + // if PROGRAMDATA environment variable not exist, return system directory instead + try + { + result = EnvironmentImpl::getImpl("PROGRAMDATA"); + } + catch (NotFoundException&) + { + result = systemImpl(); + } + + std::string::size_type n = result.size(); + if (n > 0 && result[n - 1] != '\\') + result.append("\\"); + return result; +} + std::string PathImpl::nullImpl() { return "NUL:"; diff --git a/Foundation/src/Path_WIN32U.cpp b/Foundation/src/Path_WIN32U.cpp index 10d2b7fc4..3099949bb 100644 --- a/Foundation/src/Path_WIN32U.cpp +++ b/Foundation/src/Path_WIN32U.cpp @@ -84,6 +84,59 @@ std::string PathImpl::homeImpl() } +std::string PathImpl::configHomeImpl() +{ + std::string result; + + // if APPDATA environment variable no exist, return home directory instead + try + { + result = EnvironmentImpl::getImpl("APPDATA"); + } + catch (NotFoundException&) + { + result = homeImpl(); + } + + std::string::size_type n = result.size(); + if (n > 0 && result[n - 1] != '\\') + result.append("\\"); + return result; +} + + +std::string PathImpl::dataHomeImpl() +{ + std::string result; + + // if LOCALAPPDATA environment variable no exist, return config home instead + try + { + result = EnvironmentImpl::getImpl("LOCALAPPDATA"); + } + catch (NotFoundException&) + { + result = configHomeImpl(); + } + + std::string::size_type n = result.size(); + if (n > 0 && result[n - 1] != '\\') + result.append("\\"); + return result; +} + + +std::string PathImpl::cacheHomeImpl() +{ + return tempImpl(); +} + + +std::string PathImpl::tempHomeImpl() +{ + return tempImpl(); +} + std::string PathImpl::tempImpl() { Buffer buffer(MAX_PATH_LEN); @@ -102,6 +155,26 @@ std::string PathImpl::tempImpl() } +std::string PathImpl::configImpl() +{ + std::string result; + + // if PROGRAMDATA environment variable not exist, return system directory instead + try + { + result = EnvironmentImpl::getImpl("PROGRAMDATA"); + } + catch (NotFoundException&) + { + result = systemImpl(); + } + + std::string::size_type n = result.size(); + if (n > 0 && result[n - 1] != '\\') + result.append("\\"); + return result; +} + std::string PathImpl::nullImpl() { return "NUL:"; From 58e860c4405e25acde99d80258eb431c70b0e8e4 Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Sat, 10 Jan 2015 12:00:24 +0000 Subject: [PATCH 14/34] Resolved merge conflict with develop. --- Foundation/testsuite/TestSuite_vs71.vcproj | 1452 --------------- Foundation/testsuite/TestSuite_vs80.vcproj | 1883 -------------------- 2 files changed, 3335 deletions(-) delete mode 100644 Foundation/testsuite/TestSuite_vs71.vcproj delete mode 100644 Foundation/testsuite/TestSuite_vs80.vcproj diff --git a/Foundation/testsuite/TestSuite_vs71.vcproj b/Foundation/testsuite/TestSuite_vs71.vcproj deleted file mode 100644 index a5cf195cc..000000000 --- a/Foundation/testsuite/TestSuite_vs71.vcproj +++ /dev/null @@ -1,1452 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Foundation/testsuite/TestSuite_vs80.vcproj b/Foundation/testsuite/TestSuite_vs80.vcproj deleted file mode 100644 index 9931f9202..000000000 --- a/Foundation/testsuite/TestSuite_vs80.vcproj +++ /dev/null @@ -1,1883 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 00b568193c620389b30ac4838c408f07bfcc1136 Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Wed, 14 Jan 2015 10:48:22 +0000 Subject: [PATCH 15/34] Replaced boolean with enum in c'tor. Implemented in a similar style to FPEnvironment. --- Foundation/include/Poco/Mutex.h | 9 ++++++++- Foundation/include/Poco/Mutex_POSIX.h | 9 ++++++++- Foundation/include/Poco/Mutex_VX.h | 9 ++++++++- Foundation/include/Poco/Mutex_WIN32.h | 9 ++++++++- Foundation/include/Poco/Mutex_WINCE.h | 9 ++++++++- Foundation/samples/Benchmark/src/Benchmark.cpp | 4 ++-- Foundation/src/Mutex.cpp | 4 ++-- Foundation/src/Mutex_POSIX.cpp | 6 +++--- Foundation/src/Mutex_VX.cpp | 11 ++++++----- Foundation/src/Mutex_WIN32.cpp | 4 ++-- Foundation/src/Mutex_WINCE.cpp | 4 ++-- Foundation/testsuite/src/MutexTest.cpp | 4 ++-- 12 files changed, 59 insertions(+), 23 deletions(-) diff --git a/Foundation/include/Poco/Mutex.h b/Foundation/include/Poco/Mutex.h index c4f849e7d..74c092025 100644 --- a/Foundation/include/Poco/Mutex.h +++ b/Foundation/include/Poco/Mutex.h @@ -49,9 +49,16 @@ class Foundation_API Mutex: private MutexImpl /// lock and unlock a mutex. { public: + enum MutexType + /// The type of a mutex. + { + MUTEX_RECURSIVE = MUTEX_RECURSIVE_IMPL, /// A recursive mutex + MUTEX_NONRECURSIVE = MUTEX_NONRECURSIVE_IMPL, /// A non-recursive mutex + }; + typedef Poco::ScopedLock ScopedLock; - explicit Mutex(bool recursive = true); + explicit Mutex(MutexType type = MUTEX_RECURSIVE); /// creates the Mutex. ~Mutex(); diff --git a/Foundation/include/Poco/Mutex_POSIX.h b/Foundation/include/Poco/Mutex_POSIX.h index db586b745..5dfb83928 100644 --- a/Foundation/include/Poco/Mutex_POSIX.h +++ b/Foundation/include/Poco/Mutex_POSIX.h @@ -31,8 +31,15 @@ namespace Poco { class Foundation_API MutexImpl { +public: + enum MutexTypeImpl + { + MUTEX_RECURSIVE_IMPL, + MUTEX_NONRECURSIVE_IMPL, + }; + protected: - MutexImpl(bool recursive); + explicit MutexImpl(MutexTypeImpl type); ~MutexImpl(); void lockImpl(); bool tryLockImpl(); diff --git a/Foundation/include/Poco/Mutex_VX.h b/Foundation/include/Poco/Mutex_VX.h index 27457d5ed..3fbb37834 100644 --- a/Foundation/include/Poco/Mutex_VX.h +++ b/Foundation/include/Poco/Mutex_VX.h @@ -31,8 +31,15 @@ namespace Poco { class Foundation_API MutexImpl { +public: + enum MutexTypeImpl + { + MUTEX_RECURSIVE_IMPL, + MUTEX_NONRECURSIVE_IMPL, + }; + protected: - MutexImpl(bool recursive); + explicit MutexImpl(MutexTypeImpl type); ~MutexImpl(); void lockImpl(); bool tryLockImpl(); diff --git a/Foundation/include/Poco/Mutex_WIN32.h b/Foundation/include/Poco/Mutex_WIN32.h index 6ae48d005..e4fc2c55b 100644 --- a/Foundation/include/Poco/Mutex_WIN32.h +++ b/Foundation/include/Poco/Mutex_WIN32.h @@ -30,8 +30,15 @@ namespace Poco { class Foundation_API MutexImpl { +public: + enum MutexTypeImpl + { + MUTEX_RECURSIVE_IMPL, + MUTEX_NONRECURSIVE_IMPL, + }; + protected: - MutexImpl(bool recursive); + explicit MutexImpl(MutexTypeImpl type); ~MutexImpl(); void lockImpl(); bool tryLockImpl(); diff --git a/Foundation/include/Poco/Mutex_WINCE.h b/Foundation/include/Poco/Mutex_WINCE.h index 8f672d46d..21fca3f03 100644 --- a/Foundation/include/Poco/Mutex_WINCE.h +++ b/Foundation/include/Poco/Mutex_WINCE.h @@ -30,8 +30,15 @@ namespace Poco { class Foundation_API MutexImpl { +public: + enum MutexTypeImpl + { + MUTEX_RECURSIVE_IMPL, + MUTEX_NONRECURSIVE_IMPL, + }; + protected: - MutexImpl(bool recursive); + explicit MutexImpl(MutexTypeImpl type); ~MutexImpl(); void lockImpl(); bool tryLockImpl(); diff --git a/Foundation/samples/Benchmark/src/Benchmark.cpp b/Foundation/samples/Benchmark/src/Benchmark.cpp index dac13c848..02b843c5b 100644 --- a/Foundation/samples/Benchmark/src/Benchmark.cpp +++ b/Foundation/samples/Benchmark/src/Benchmark.cpp @@ -49,12 +49,12 @@ int main(int argc, char** argv) } { - Poco::Mutex mtx(true); + Poco::Mutex mtx(Poco::Mutex::MUTEX_RECURSIVE); Benchmark(mtx, "Mutex(true)"); } { - Poco::Mutex mtx(false); + Poco::Mutex mtx(Poco::Mutex::MUTEX_NONRECURSIVE); Benchmark(mtx, "Mutex(false)"); } diff --git a/Foundation/src/Mutex.cpp b/Foundation/src/Mutex.cpp index 5ad648f3d..fa28e7aab 100644 --- a/Foundation/src/Mutex.cpp +++ b/Foundation/src/Mutex.cpp @@ -33,8 +33,8 @@ namespace Poco { -Mutex::Mutex(bool recursive) - : MutexImpl(recursive) +Mutex::Mutex(MutexType type) + : MutexImpl((MutexTypeImpl) type) { } diff --git a/Foundation/src/Mutex_POSIX.cpp b/Foundation/src/Mutex_POSIX.cpp index 7d242ed48..c3d63c875 100644 --- a/Foundation/src/Mutex_POSIX.cpp +++ b/Foundation/src/Mutex_POSIX.cpp @@ -38,7 +38,7 @@ namespace Poco { -MutexImpl::MutexImpl(bool recursive) +MutexImpl::MutexImpl(MutexTypeImpl type) { #if defined(POCO_VXWORKS) // This workaround is for VxWorks 5.x where @@ -50,9 +50,9 @@ MutexImpl::MutexImpl(bool recursive) pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); #if defined(PTHREAD_MUTEX_RECURSIVE_NP) - pthread_mutexattr_settype_np(&attr, recursive ? PTHREAD_MUTEX_RECURSIVE_NP : PTHREAD_MUTEX_NORMAL_NP); + pthread_mutexattr_settype_np(&attr, type == MUTEX_RECURSIVE_IMPL ? PTHREAD_MUTEX_RECURSIVE_NP : PTHREAD_MUTEX_NORMAL_NP); #elif !defined(POCO_VXWORKS) - pthread_mutexattr_settype(&attr, recursive ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_NORMAL); + pthread_mutexattr_settype(&attr, type == MUTEX_RECURSIVE_IMPL ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_NORMAL); #endif if (pthread_mutex_init(&_mutex, &attr)) { diff --git a/Foundation/src/Mutex_VX.cpp b/Foundation/src/Mutex_VX.cpp index 1ebf73043..352ba826c 100644 --- a/Foundation/src/Mutex_VX.cpp +++ b/Foundation/src/Mutex_VX.cpp @@ -21,15 +21,16 @@ namespace Poco { -MutexImpl::MutexImpl(bool recursive) +MutexImpl::MutexImpl(MutexTypeImpl type) { - if (recursive) + switch (type) { + case MUTEX_RECURSIVE_IMPL: _sem = semMCreate(SEM_INVERSION_SAFE | SEM_Q_PRIORITY); - } - else - { + break; + case MUTEX_NONRECURSIVE_IMPL: _sem = semBCreate(SEM_Q_PRIORITY, SEM_FULL); + break; } if (_sem == 0) throw Poco::SystemException("cannot create mutex"); diff --git a/Foundation/src/Mutex_WIN32.cpp b/Foundation/src/Mutex_WIN32.cpp index f784df9f0..63d3ae161 100644 --- a/Foundation/src/Mutex_WIN32.cpp +++ b/Foundation/src/Mutex_WIN32.cpp @@ -22,9 +22,9 @@ namespace Poco { -MutexImpl::MutexImpl(bool recursive) +MutexImpl::MutexImpl(MutexTypeImpl type) : _lockCount(0) - , _recursive(recursive) + , _recursive(type == MUTEX_RECURSIVE_IMPL) { // the fct has a boolean return value under WInnNt/2000/XP but not on Win98 // the return only checks if the input address of &_cs was valid, so it is safe to omit it diff --git a/Foundation/src/Mutex_WINCE.cpp b/Foundation/src/Mutex_WINCE.cpp index e37ea2a68..6d9f544ca 100644 --- a/Foundation/src/Mutex_WINCE.cpp +++ b/Foundation/src/Mutex_WINCE.cpp @@ -22,9 +22,9 @@ namespace Poco { -MutexImpl::MutexImpl(bool recursive) +MutexImpl::MutexImpl(MutexTypeImpl type) : _lockCount(0) - , _recursive(recursive) + , _recursive(type == MUTEX_RECURSIVE_IMPL) { _mutex = CreateMutexW(NULL, FALSE, NULL); if (!_mutex) throw SystemException("cannot create mutex"); diff --git a/Foundation/testsuite/src/MutexTest.cpp b/Foundation/testsuite/src/MutexTest.cpp index 49019eeaa..9b3f70f24 100644 --- a/Foundation/testsuite/src/MutexTest.cpp +++ b/Foundation/testsuite/src/MutexTest.cpp @@ -40,7 +40,7 @@ namespace { try { - Mutex mtx(false); + Mutex mtx(Mutex::MUTEX_NONRECURSIVE); mtx.lock(); mtx.lock(); } @@ -74,7 +74,7 @@ MutexTest::~MutexTest() void MutexTest::testMutexRecursion() { - Mutex mtx(false); + Mutex mtx(Mutex::MUTEX_NONRECURSIVE); mtx.lock(); bool success = mtx.tryLock(); From 96c859eaaa12354218771f307b0cadf580686912 Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Wed, 14 Jan 2015 11:04:23 +0000 Subject: [PATCH 16/34] Fixed POSIX build. --- Foundation/src/Mutex_POSIX.cpp | 2 +- Foundation/src/Mutex_VX.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Foundation/src/Mutex_POSIX.cpp b/Foundation/src/Mutex_POSIX.cpp index c3d63c875..b64d1c628 100644 --- a/Foundation/src/Mutex_POSIX.cpp +++ b/Foundation/src/Mutex_POSIX.cpp @@ -119,7 +119,7 @@ bool MutexImpl::tryLockImpl(long milliseconds) } -FastMutexImpl::FastMutexImpl(): MutexImpl(false) +FastMutexImpl::FastMutexImpl(): MutexImpl(MUTEX_NONRECURSIVE_IMPL) { } diff --git a/Foundation/src/Mutex_VX.cpp b/Foundation/src/Mutex_VX.cpp index 352ba826c..b9b608288 100644 --- a/Foundation/src/Mutex_VX.cpp +++ b/Foundation/src/Mutex_VX.cpp @@ -50,7 +50,7 @@ bool MutexImpl::tryLockImpl(long milliseconds) } -FastMutexImpl::FastMutexImpl(): MutexImpl(false) +FastMutexImpl::FastMutexImpl(): MutexImpl(MUTEX_NONRECURSIVE_IMPL) { } From 21d2e963ef6e684f52da7a72680ff699670cfd36 Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Sat, 17 Jan 2015 10:07:44 +0000 Subject: [PATCH 17/34] Updated Event c'tor to accept an enum. --- Foundation/include/Poco/ActiveResult.h | 4 ++-- Foundation/include/Poco/Activity.h | 2 +- Foundation/include/Poco/Event.h | 16 ++++++++++++++-- Foundation/include/Poco/Event_POSIX.h | 9 ++++++++- Foundation/include/Poco/Event_VX.h | 9 ++++++++- Foundation/include/Poco/Event_WIN32.h | 9 ++++++++- Foundation/include/Poco/Thread_POSIX.h | 2 +- Foundation/samples/Benchmark/src/Benchmark.cpp | 4 ++-- Foundation/src/Event.cpp | 7 ++++++- Foundation/src/Event_POSIX.cpp | 2 +- Foundation/src/Event_VX.cpp | 2 +- Foundation/src/Event_WIN32.cpp | 4 ++-- Foundation/src/Task.cpp | 2 +- Foundation/src/Thread.cpp | 4 ++-- Foundation/src/ThreadPool.cpp | 5 ++++- Foundation/testsuite/src/ThreadPoolTest.cpp | 3 ++- 16 files changed, 63 insertions(+), 21 deletions(-) diff --git a/Foundation/include/Poco/ActiveResult.h b/Foundation/include/Poco/ActiveResult.h index c71a39bd8..2c02d4c2f 100644 --- a/Foundation/include/Poco/ActiveResult.h +++ b/Foundation/include/Poco/ActiveResult.h @@ -43,7 +43,7 @@ public: ActiveResultHolder(): _pData(0), _pExc(0), - _event(false) + _event(Event::EVENT_MANUALRESET) /// Creates an ActiveResultHolder. { } @@ -149,7 +149,7 @@ class ActiveResultHolder: public RefCountedObject public: ActiveResultHolder(): _pExc(0), - _event(false) + _event(Event::EVENT_MANUALRESET) /// Creates an ActiveResultHolder. { } diff --git a/Foundation/include/Poco/Activity.h b/Foundation/include/Poco/Activity.h index 3aded9fca..a466f8a3f 100644 --- a/Foundation/include/Poco/Activity.h +++ b/Foundation/include/Poco/Activity.h @@ -84,7 +84,7 @@ public: _runnable(*pOwner, method), _stopped(true), _running(false), - _done(false) + _done(Event::EVENT_MANUALRESET) /// Creates the activity. Call start() to /// start it. { diff --git a/Foundation/include/Poco/Event.h b/Foundation/include/Poco/Event.h index dcb9e53de..73956909a 100644 --- a/Foundation/include/Poco/Event.h +++ b/Foundation/include/Poco/Event.h @@ -46,11 +46,23 @@ class Foundation_API Event: private EventImpl /// for an event to become signalled. { public: - Event(bool autoReset = true); + enum EventType + { + EVENT_MANUALRESET = EVENT_MANUALRESET_IMPL, /// Manual reset event + EVENT_AUTORESET = EVENT_AUTORESET_IMPL, /// Auto-reset event + }; + + Event(EventType type = EVENT_AUTORESET); + /// Creates the event. If type is EVENT_AUTORESET, + /// the event is automatically reset after + /// a wait() successfully returns. + + Event(bool autoReset); + //@ deprecated /// Creates the event. If autoReset is true, /// the event is automatically reset after /// a wait() successfully returns. - + ~Event(); /// Destroys the event. diff --git a/Foundation/include/Poco/Event_POSIX.h b/Foundation/include/Poco/Event_POSIX.h index 1ebd2aa21..7c79140ae 100644 --- a/Foundation/include/Poco/Event_POSIX.h +++ b/Foundation/include/Poco/Event_POSIX.h @@ -31,8 +31,15 @@ namespace Poco { class Foundation_API EventImpl { +public: + enum EventTypeImpl + { + EVENT_MANUALRESET_IMPL, + EVENT_AUTORESET_IMPL, + }; + protected: - EventImpl(bool autoReset); + EventImpl(EventTypeImpl type); ~EventImpl(); void setImpl(); void waitImpl(); diff --git a/Foundation/include/Poco/Event_VX.h b/Foundation/include/Poco/Event_VX.h index f1bf90487..6b7d8d87b 100644 --- a/Foundation/include/Poco/Event_VX.h +++ b/Foundation/include/Poco/Event_VX.h @@ -30,8 +30,15 @@ namespace Poco { class Foundation_API EventImpl { +public: + enum EventTypeImpl + { + EVENT_MANUALRESET_IMPL, + EVENT_AUTORESET_IMPL, + }; + protected: - EventImpl(bool autoReset); + EventImpl(EventTypeImpl type); ~EventImpl(); void setImpl(); void waitImpl(); diff --git a/Foundation/include/Poco/Event_WIN32.h b/Foundation/include/Poco/Event_WIN32.h index 94f03d2ba..52ab66ec7 100644 --- a/Foundation/include/Poco/Event_WIN32.h +++ b/Foundation/include/Poco/Event_WIN32.h @@ -30,8 +30,15 @@ namespace Poco { class Foundation_API EventImpl { +public: + enum EventTypeImpl + { + EVENT_MANUALRESET_IMPL, + EVENT_AUTORESET_IMPL, + }; + protected: - EventImpl(bool autoReset); + EventImpl(EventTypeImpl type); ~EventImpl(); void setImpl(); void waitImpl(); diff --git a/Foundation/include/Poco/Thread_POSIX.h b/Foundation/include/Poco/Thread_POSIX.h index 5bfae4a28..7c2f1c55b 100644 --- a/Foundation/include/Poco/Thread_POSIX.h +++ b/Foundation/include/Poco/Thread_POSIX.h @@ -120,7 +120,7 @@ private: thread(0), prio(PRIO_NORMAL_IMPL), policy(SCHED_OTHER), - done(false), + done(Event::EVENT_MANUALRESET), stackSize(POCO_THREAD_STACK_SIZE), started(false), joined(false) diff --git a/Foundation/samples/Benchmark/src/Benchmark.cpp b/Foundation/samples/Benchmark/src/Benchmark.cpp index 02b843c5b..3c57a0b18 100644 --- a/Foundation/samples/Benchmark/src/Benchmark.cpp +++ b/Foundation/samples/Benchmark/src/Benchmark.cpp @@ -50,12 +50,12 @@ int main(int argc, char** argv) { Poco::Mutex mtx(Poco::Mutex::MUTEX_RECURSIVE); - Benchmark(mtx, "Mutex(true)"); + Benchmark(mtx, "Mutex(MUTEX_RECURSIVE)"); } { Poco::Mutex mtx(Poco::Mutex::MUTEX_NONRECURSIVE); - Benchmark(mtx, "Mutex(false)"); + Benchmark(mtx, "Mutex(MUTEX_NONRECURSIVE)"); } { diff --git a/Foundation/src/Event.cpp b/Foundation/src/Event.cpp index cf4a52f1c..d692652b5 100644 --- a/Foundation/src/Event.cpp +++ b/Foundation/src/Event.cpp @@ -29,7 +29,12 @@ namespace Poco { -Event::Event(bool autoReset): EventImpl(autoReset) +Event::Event(EventType type): EventImpl((EventTypeImpl) type) +{ +} + + +Event::Event(bool autoReset): EventImpl(autoReset ? EVENT_AUTORESET_IMPL : EVENT_MANUALRESET_IMPL) { } diff --git a/Foundation/src/Event_POSIX.cpp b/Foundation/src/Event_POSIX.cpp index 8dd8ce907..ef67e22fd 100644 --- a/Foundation/src/Event_POSIX.cpp +++ b/Foundation/src/Event_POSIX.cpp @@ -26,7 +26,7 @@ namespace Poco { -EventImpl::EventImpl(bool autoReset): _auto(autoReset), _state(false) +EventImpl::EventImpl(EventTypeImpl type): _auto(type == EVENT_AUTORESET_IMPL), _state(false) { #if defined(POCO_VXWORKS) // This workaround is for VxWorks 5.x where diff --git a/Foundation/src/Event_VX.cpp b/Foundation/src/Event_VX.cpp index 6324e901f..086182cce 100644 --- a/Foundation/src/Event_VX.cpp +++ b/Foundation/src/Event_VX.cpp @@ -21,7 +21,7 @@ namespace Poco { -EventImpl::EventImpl(bool autoReset): _auto(autoReset), _state(false) +EventImpl::EventImpl(EventTypeImpl type): _auto(type == EVENT_AUTORESET_IMPL), _state(false) { _sem = semCCreate(SEM_Q_PRIORITY, 0); if (_sem == 0) diff --git a/Foundation/src/Event_WIN32.cpp b/Foundation/src/Event_WIN32.cpp index 10f0f1308..f5459ecf1 100644 --- a/Foundation/src/Event_WIN32.cpp +++ b/Foundation/src/Event_WIN32.cpp @@ -20,9 +20,9 @@ namespace Poco { -EventImpl::EventImpl(bool autoReset) +EventImpl::EventImpl(EventTypeImpl type) { - _event = CreateEventW(NULL, autoReset ? FALSE : TRUE, FALSE, NULL); + _event = CreateEventW(NULL, type == EVENT_AUTORESET_IMPL ? FALSE : TRUE, FALSE, NULL); if (!_event) throw SystemException("cannot create event"); } diff --git a/Foundation/src/Task.cpp b/Foundation/src/Task.cpp index c8289d1ec..e085eefaa 100644 --- a/Foundation/src/Task.cpp +++ b/Foundation/src/Task.cpp @@ -27,7 +27,7 @@ Task::Task(const std::string& name): _pOwner(0), _progress(0), _state(TASK_IDLE), - _cancelEvent(false) + _cancelEvent(Event::EVENT_MANUALRESET) { } diff --git a/Foundation/src/Thread.cpp b/Foundation/src/Thread.cpp index e4a87dad0..8c518ba5b 100644 --- a/Foundation/src/Thread.cpp +++ b/Foundation/src/Thread.cpp @@ -93,7 +93,7 @@ Thread::Thread(): _id(uniqueId()), _name(makeName()), _pTLS(0), - _event(true) + _event() { } @@ -102,7 +102,7 @@ Thread::Thread(const std::string& name): _id(uniqueId()), _name(name), _pTLS(0), - _event(true) + _event() { } diff --git a/Foundation/src/ThreadPool.cpp b/Foundation/src/ThreadPool.cpp index 32af4d9d8..e8df55c9d 100644 --- a/Foundation/src/ThreadPool.cpp +++ b/Foundation/src/ThreadPool.cpp @@ -65,7 +65,10 @@ PooledThread::PooledThread(const std::string& name, int stackSize): _pTarget(0), _name(name), _thread(name), - _targetCompleted(false) + _targetReady(), + _targetCompleted(Event::EVENT_MANUALRESET), + _started(), + _mutex() { poco_assert_dbg (stackSize >= 0); _thread.setStackSize(stackSize); diff --git a/Foundation/testsuite/src/ThreadPoolTest.cpp b/Foundation/testsuite/src/ThreadPoolTest.cpp index 59da2160b..3083f90f0 100644 --- a/Foundation/testsuite/src/ThreadPoolTest.cpp +++ b/Foundation/testsuite/src/ThreadPoolTest.cpp @@ -19,12 +19,13 @@ #include "Poco/Thread.h" +using Poco::Event; using Poco::ThreadPool; using Poco::RunnableAdapter; using Poco::Thread; -ThreadPoolTest::ThreadPoolTest(const std::string& name): CppUnit::TestCase(name), _event(false) +ThreadPoolTest::ThreadPoolTest(const std::string& name): CppUnit::TestCase(name), _event(Event::EVENT_MANUALRESET) { } From 1bb48442b67ee5725a7a1ddd9b4851170375dc19 Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Sat, 17 Jan 2015 11:58:01 +0000 Subject: [PATCH 18/34] Updated documentation. --- Foundation/include/Poco/Event.h | 6 ++---- Foundation/include/Poco/Mutex.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Foundation/include/Poco/Event.h b/Foundation/include/Poco/Event.h index 73956909a..b85194147 100644 --- a/Foundation/include/Poco/Event.h +++ b/Foundation/include/Poco/Event.h @@ -57,11 +57,9 @@ public: /// the event is automatically reset after /// a wait() successfully returns. + //@ deprecated Event(bool autoReset); - //@ deprecated - /// Creates the event. If autoReset is true, - /// the event is automatically reset after - /// a wait() successfully returns. + /// Please use Event::Event(EventType) instead. ~Event(); /// Destroys the event. diff --git a/Foundation/include/Poco/Mutex.h b/Foundation/include/Poco/Mutex.h index 74c092025..86043aeef 100644 --- a/Foundation/include/Poco/Mutex.h +++ b/Foundation/include/Poco/Mutex.h @@ -59,10 +59,10 @@ public: typedef Poco::ScopedLock ScopedLock; explicit Mutex(MutexType type = MUTEX_RECURSIVE); - /// creates the Mutex. + /// Creates the Mutex. ~Mutex(); - /// destroys the Mutex. + /// Destroys the Mutex. void lock(); /// Locks the mutex. Blocks if the mutex From 6eb8f582e768023dc6d40999e83239b1867deb7a Mon Sep 17 00:00:00 2001 From: martin-osborne Date: Sat, 17 Jan 2015 12:02:42 +0000 Subject: [PATCH 19/34] Added missing explicit keyword. --- Foundation/include/Poco/Event.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Foundation/include/Poco/Event.h b/Foundation/include/Poco/Event.h index b85194147..0fa931886 100644 --- a/Foundation/include/Poco/Event.h +++ b/Foundation/include/Poco/Event.h @@ -52,13 +52,13 @@ public: EVENT_AUTORESET = EVENT_AUTORESET_IMPL, /// Auto-reset event }; - Event(EventType type = EVENT_AUTORESET); + explicit Event(EventType type = EVENT_AUTORESET); /// Creates the event. If type is EVENT_AUTORESET, /// the event is automatically reset after /// a wait() successfully returns. //@ deprecated - Event(bool autoReset); + explicit Event(bool autoReset); /// Please use Event::Event(EventType) instead. ~Event(); From c4cf86914169a87ca69cb68f2bac0bc8191a8d99 Mon Sep 17 00:00:00 2001 From: Daniel Ali Date: Mon, 26 Jan 2015 20:26:52 -0500 Subject: [PATCH 20/34] Changed Process to throw on correct error code --- Foundation/src/Process_WIN32.cpp | 2 +- Foundation/src/Process_WIN32U.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Foundation/src/Process_WIN32.cpp b/Foundation/src/Process_WIN32.cpp index e1989c333..d96d79659 100644 --- a/Foundation/src/Process_WIN32.cpp +++ b/Foundation/src/Process_WIN32.cpp @@ -247,7 +247,7 @@ void ProcessImpl::killImpl(PIDImpl pid) { case ERROR_ACCESS_DENIED: throw NoPermissionException("cannot kill process"); - case ERROR_NOT_FOUND: + case ERROR_INVALID_PARAMETER: throw NotFoundException("cannot kill process"); default: throw SystemException("cannot kill process"); diff --git a/Foundation/src/Process_WIN32U.cpp b/Foundation/src/Process_WIN32U.cpp index 226ffabe2..f07efbb55 100644 --- a/Foundation/src/Process_WIN32U.cpp +++ b/Foundation/src/Process_WIN32U.cpp @@ -253,7 +253,7 @@ void ProcessImpl::killImpl(PIDImpl pid) { case ERROR_ACCESS_DENIED: throw NoPermissionException("cannot kill process"); - case ERROR_NOT_FOUND: + case ERROR_INVALID_PARAMETER: throw NotFoundException("cannot kill process"); default: throw SystemException("cannot kill process"); From 1bfc26f3888726e83a7ba494fe6f66cce7015a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schramke?= Date: Wed, 28 Jan 2015 16:12:39 +0100 Subject: [PATCH 21/34] update class documentation for Util::SystemConfiguration and Util::Application --- Util/include/Poco/Util/Application.h | 5 ++++- Util/include/Poco/Util/SystemConfiguration.h | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Util/include/Poco/Util/Application.h b/Util/include/Poco/Util/Application.h index 9ae92e2c0..16f79ddb1 100644 --- a/Util/include/Poco/Util/Application.h +++ b/Util/include/Poco/Util/Application.h @@ -76,7 +76,10 @@ class Util_API Application: public Subsystem /// - application.name: the file name of the application executable /// - application.baseName: the file name (excluding extension) of the application executable /// - application.dir: the path to the directory where the application executable resides - /// - application.configDir: the path to the directory where the last configuration file loaded with loadConfiguration() was found. + /// - application.configDir: the path to the directory where user specific configuration files of the application should be stored. + /// - application.cacheDir: the path to the directory where user specific non-essential data files of the application should be stored. + /// - application.dataDir: the path to the directory where user specific data files of the application should be stored. + /// - application.tempDir: the path to the directory where user specific temporary files and other file objects of the application should be stored. /// /// If loadConfiguration() has never been called, application.configDir will be equal to application.dir. /// diff --git a/Util/include/Poco/Util/SystemConfiguration.h b/Util/include/Poco/Util/SystemConfiguration.h index c37dec0bf..1037c24be 100644 --- a/Util/include/Poco/Util/SystemConfiguration.h +++ b/Util/include/Poco/Util/SystemConfiguration.h @@ -41,7 +41,12 @@ class Util_API SystemConfiguration: public AbstractConfiguration /// of the first Ethernet adapter found on the system. /// - system.currentDir: the current working directory /// - system.homeDir: the user's home directory + /// - system.configHomeDir: the base directory relative to which user specific configuration files should be stored + /// - system.cacheHomeDir: the base directory relative to which user specific non-essential data files should be stored + /// - system.dataHomeDir: the base directory relative to which user specific data files should be stored + /// - system.tempHomeDir: the base directory relative to which user-specific temporary files and other file objects should be placed /// - system.tempDir: the system's temporary directory + /// - system.configDir: the system's configuration directory /// - system.dateTime: the current UTC date and time, formatted in ISO 8601 format. /// - system.pid: the current process ID. /// - system.env.: the environment variable with the given . From 1c648764c248fec60e9fc3c42d5e4413f7493d7a Mon Sep 17 00:00:00 2001 From: Rangel Reale Date: Thu, 29 Jan 2015 11:14:39 -0200 Subject: [PATCH 22/34] - Android log channel implementation - Removes warning from Bugcheck.h on Android fixes #122 --- Foundation/CMakeLists.txt | 3 + Foundation/Makefile | 4 ++ Foundation/include/Poco/AndroidLogChannel.h | 54 +++++++++++++++++ Foundation/include/Poco/Bugcheck.h | 2 +- Foundation/src/AndroidLogChannel.cpp | 65 +++++++++++++++++++++ 5 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 Foundation/include/Poco/AndroidLogChannel.h create mode 100644 Foundation/src/AndroidLogChannel.cpp diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt index c1dd25ff4..90243a1f6 100644 --- a/Foundation/CMakeLists.txt +++ b/Foundation/CMakeLists.txt @@ -16,6 +16,9 @@ POCO_HEADERS_AUTO( SRCS include/Poco/OpcomChannel.h ) POCO_SOURCES_AUTO_PLAT( SRCS UNIX src/SyslogChannel.cpp ) POCO_HEADERS_AUTO( SRCS include/Poco/SyslogChannel.h ) +POCO_SOURCES_AUTO_PLAT( SRCS ANDROID src/AndroidLogChannel.cpp ) +POCO_HEADERS_AUTO( SRCS include/Poco/AndroidLogChannel.h ) + # For Windows CE we need to disable these if(WINCE) POCO_SOURCES_AUTO_PLAT( SRCS OFF diff --git a/Foundation/Makefile b/Foundation/Makefile index 45ade1c0c..6c3245288 100644 --- a/Foundation/Makefile +++ b/Foundation/Makefile @@ -56,6 +56,10 @@ else objects += SyslogChannel endif +ifeq ($(findstring Android, $(POCO_CONFIG)), Android) + objects += AndroidLogChannel +endif + target = PocoFoundation target_version = $(LIBVERSION) target_libs = diff --git a/Foundation/include/Poco/AndroidLogChannel.h b/Foundation/include/Poco/AndroidLogChannel.h new file mode 100644 index 000000000..d7d4fb959 --- /dev/null +++ b/Foundation/include/Poco/AndroidLogChannel.h @@ -0,0 +1,54 @@ +// +// AndroidLogChannel.h +// +// $Id: //poco/1.4/Foundation/include/Poco/AndroidLogChannel.h#2 $ +// +// Library: Foundation +// Package: Logging +// Module: AndroidLogChannel +// +// Definition of the AndroidLogChannel class. +// +// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#ifndef Foundation_AndroidLogChannel_INCLUDED +#define Foundation_AndroidLogChannel_INCLUDED + + +#include "Poco/Foundation.h" +#include "Poco/Channel.h" + + +namespace Poco { + + +class AndroidLogChannel: public Poco::Channel + /// A channel that writes to the Android log subsystem. + /// + /// Only the message's text is written, followed + /// by a newline, using the tag passed on the constructor. +{ +public: + AndroidLogChannel(const std::string &tag); + /// Creates the AndroidLogChannel. + + void log(const Message& msg); + /// Logs the given message to the channel's stream. + +protected: + ~AndroidLogChannel(); + +private: + std::string _tag; +}; + + +} // namespace Poco + + +#endif // Foundation_AndroidLogChannel_INCLUDED diff --git a/Foundation/include/Poco/Bugcheck.h b/Foundation/include/Poco/Bugcheck.h index d11b2bbb5..d34e87a3a 100644 --- a/Foundation/include/Poco/Bugcheck.h +++ b/Foundation/include/Poco/Bugcheck.h @@ -148,7 +148,7 @@ protected: // -#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) +#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) && !defined(POCO_ANDROID) GCC_DIAG_OFF(unused-local-typedefs) // supress numerous gcc warnings #endif // POCO_COMPILER_GCC && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) diff --git a/Foundation/src/AndroidLogChannel.cpp b/Foundation/src/AndroidLogChannel.cpp new file mode 100644 index 000000000..9811a3f60 --- /dev/null +++ b/Foundation/src/AndroidLogChannel.cpp @@ -0,0 +1,65 @@ +// +// AndroidLogChannel.cpp +// +// $Id: //poco/1.4/Foundation/src/AndroidLogChannel.cpp#2 $ +// +// Library: Foundation +// Package: Logging +// Module: AndroidLogChannel +// +// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#include "Poco/AndroidLogChannel.h" +#include "Poco/Message.h" + +#include + + +namespace Poco { + + +AndroidLogChannel::AndroidLogChannel(const std::string &tag) : + _tag(tag) +{ +} + + +AndroidLogChannel::~AndroidLogChannel() +{ +} + + +void AndroidLogChannel::log(const Message& msg) +{ + int prio = ANDROID_LOG_DEBUG; + switch (msg.getPriority()) + { + case Message::PRIO_FATAL: + prio = ANDROID_LOG_FATAL; + break; + case Message::PRIO_CRITICAL: + case Message::PRIO_ERROR: + prio = ANDROID_LOG_ERROR; + break; + case Message::PRIO_WARNING: + prio = ANDROID_LOG_WARN; + break; + case Message::PRIO_NOTICE: + case Message::PRIO_INFORMATION: + prio = ANDROID_LOG_INFO; + break; + case Message::PRIO_TRACE: + prio = ANDROID_LOG_VERBOSE; + break; + } + __android_log_print(prio, _tag.c_str(), msg.getText().c_str()); +} + + +} // namespace Poco + From 923874c24328ae56a549ef4d68c20d47960c6f09 Mon Sep 17 00:00:00 2001 From: Rangel Reale Date: Thu, 29 Jan 2015 15:47:46 -0200 Subject: [PATCH 23/34] * Add export macro to AndroidLogChannel --- Foundation/include/Poco/AndroidLogChannel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foundation/include/Poco/AndroidLogChannel.h b/Foundation/include/Poco/AndroidLogChannel.h index d7d4fb959..792a074b6 100644 --- a/Foundation/include/Poco/AndroidLogChannel.h +++ b/Foundation/include/Poco/AndroidLogChannel.h @@ -27,7 +27,7 @@ namespace Poco { -class AndroidLogChannel: public Poco::Channel +class Foundation_API AndroidLogChannel: public Poco::Channel /// A channel that writes to the Android log subsystem. /// /// Only the message's text is written, followed From 291a0fc8fc059cccbc54ed5d653400f86190bd45 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Mon, 9 Feb 2015 18:56:24 -0600 Subject: [PATCH 24/34] Make install on CYGWIN doesn't copy cygPoco*.dll #710 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b31d9518e..49318a3e1 100644 --- a/Makefile +++ b/Makefile @@ -47,8 +47,8 @@ install: libexecs find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \ fi ; \ done - find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \; - find $(POCO_BUILD)/lib -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \; + find $(POCO_BUILD)/lib -name "$(LIBPREFIX)Poco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \; + find $(POCO_BUILD)/lib -name "$(LIBPREFIX)Poco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \; libexecs = Foundation-libexec XML-libexec JSON-libexec Util-libexec Net-libexec Crypto-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec MongoDB-libexec Zip-libexec PageCompiler-libexec PageCompiler/File2Page-libexec CppParser-libexec PDF-libexec tests = Foundation-tests XML-tests JSON-tests Util-tests Net-tests Crypto-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests MongoDB-tests Zip-tests CppParser-tests PDF-tests From 06d18d2b9c21e53638241041bdae5303872bbf36 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Mon, 9 Feb 2015 20:42:31 -0600 Subject: [PATCH 25/34] Crypto_Win (compile only, WIP) --- .../include/Poco/Crypto/CipherFactory.h | 2 +- Crypto_Win/include/Poco/Crypto/DigestEngine.h | 4 +- .../include/Poco/Crypto/RSADigestEngine.h | 14 +- Crypto_Win/include/Poco/Crypto/RSAKeyImpl.h | 19 +- Crypto_Win/src/CipherFactory.cpp | 9 +- Crypto_Win/src/CipherKeyImpl.cpp | 6 +- Crypto_Win/src/DigestEngine.cpp | 12 +- Crypto_Win/src/RSACipherImpl.cpp | 174 +++++++++++++----- Crypto_Win/src/RSADigestEngine.cpp | 78 ++++++-- Crypto_Win/src/RSAKeyImpl.cpp | 6 +- 10 files changed, 227 insertions(+), 97 deletions(-) diff --git a/Crypto_Win/include/Poco/Crypto/CipherFactory.h b/Crypto_Win/include/Poco/Crypto/CipherFactory.h index 4a414cb42..2c474868a 100644 --- a/Crypto_Win/include/Poco/Crypto/CipherFactory.h +++ b/Crypto_Win/include/Poco/Crypto/CipherFactory.h @@ -48,7 +48,7 @@ public: Cipher* createCipher(const CipherKey& key); /// Creates a Cipher object for the given CipherKey. - //Cipher* createCipher(const RSAKey& key, RSAPaddingMode paddingMode = RSA_PADDING_PKCS1); + Cipher* createCipher(const RSAKey& key, RSAPaddingMode paddingMode = RSA_PADDING_PKCS1); /// Creates a RSACipher using the given RSA key and padding mode /// for public key encryption/private key decryption. diff --git a/Crypto_Win/include/Poco/Crypto/DigestEngine.h b/Crypto_Win/include/Poco/Crypto/DigestEngine.h index b7bee1184..f612b64ba 100644 --- a/Crypto_Win/include/Poco/Crypto/DigestEngine.h +++ b/Crypto_Win/include/Poco/Crypto/DigestEngine.h @@ -57,12 +57,12 @@ public: /// Returns the name of the digest algorithm. // DigestEngine - unsigned digestLength() const; + std::size_t digestLength() const; void reset(); const Poco::DigestEngine::Digest& digest(); protected: - void updateImpl(const void* data, unsigned length); + void updateImpl(const void* data, std::size_t length); private: ServiceProvider _sp; diff --git a/Crypto_Win/include/Poco/Crypto/RSADigestEngine.h b/Crypto_Win/include/Poco/Crypto/RSADigestEngine.h index 0bca70126..94779639a 100644 --- a/Crypto_Win/include/Poco/Crypto/RSADigestEngine.h +++ b/Crypto_Win/include/Poco/Crypto/RSADigestEngine.h @@ -61,7 +61,7 @@ public: ~RSADigestEngine(); /// Destroys the RSADigestEngine. - unsigned digestLength() const; + std::size_t digestLength() const; /// Returns the length of the digest in bytes. void reset(); @@ -88,16 +88,16 @@ public: /// Returns true if the signature can be verified, false otherwise. protected: - void updateImpl(const void* data, unsigned length); + void updateImpl(const void* data, std::size_t length); private: - RSAKey _key; - Poco::DigestEngine& _engine; - int _type; + RSAKey _key; + Poco::DigestEngine& _engine; + LPSTR _type; Poco::DigestEngine::Digest _digest; Poco::DigestEngine::Digest _signature; - Poco::MD5Engine _md5Engine; - Poco::SHA1Engine _sha1Engine; + Poco::MD5Engine _md5Engine; + Poco::SHA1Engine _sha1Engine; }; diff --git a/Crypto_Win/include/Poco/Crypto/RSAKeyImpl.h b/Crypto_Win/include/Poco/Crypto/RSAKeyImpl.h index b16a2d648..b012b1ba6 100644 --- a/Crypto_Win/include/Poco/Crypto/RSAKeyImpl.h +++ b/Crypto_Win/include/Poco/Crypto/RSAKeyImpl.h @@ -28,12 +28,12 @@ #include #include - +/* struct bignum_st; struct rsa_st; typedef struct bignum_st BIGNUM; typedef struct rsa_st RSA; - +*/ namespace Poco { namespace Crypto { @@ -90,6 +90,8 @@ public: /// Returns the underlying Windows-specific handle for the public key. protected: + const ServiceProvider& serviceProvider() const; + void loadPrivateKey(std::istream& istr); void loadPublicKey(std::istream& istr); void savePrivateKey(std::ostream& ostr); @@ -99,19 +101,28 @@ private: ServiceProvider _sp; HCRYPTKEY _hPrivateKey; HCRYPTKEY _hPublicKey; + + friend class RSACipherImpl; }; // // inlines // -HCRYPTKEY RSAKeyImpl::privateKey() const + +inline const ServiceProvider& RSAKeyImpl::serviceProvider() const +{ + return _sp; +} + + +inline HCRYPTKEY RSAKeyImpl::privateKey() const { return _hPrivateKey; } -HCRYPTKEY RSAKeyImpl::publicKey() const +inline HCRYPTKEY RSAKeyImpl::publicKey() const { return _hPublicKey; } diff --git a/Crypto_Win/src/CipherFactory.cpp b/Crypto_Win/src/CipherFactory.cpp index 00e8caa23..3c539cff4 100644 --- a/Crypto_Win/src/CipherFactory.cpp +++ b/Crypto_Win/src/CipherFactory.cpp @@ -17,9 +17,9 @@ #include "Poco/Crypto/CipherFactory.h" #include "Poco/Crypto/Cipher.h" #include "Poco/Crypto/CipherKey.h" -//#include "Poco/Crypto/RSAKey.h" +#include "Poco/Crypto/RSAKey.h" #include "Poco/Crypto/CipherImpl.h" -//#include "Poco/Crypto/RSACipherImpl.h" +#include "Poco/Crypto/RSACipherImpl.h" #include "Poco/Exception.h" #include "Poco/SingletonHolder.h" @@ -55,12 +55,11 @@ Cipher* CipherFactory::createCipher(const CipherKey& key) return new CipherImpl(key); } -// TODO RSA -/* + Cipher* CipherFactory::createCipher(const RSAKey& key, RSAPaddingMode paddingMode) { return new RSACipherImpl(key, paddingMode); } -*/ + } } // namespace Poco::Crypto diff --git a/Crypto_Win/src/CipherKeyImpl.cpp b/Crypto_Win/src/CipherKeyImpl.cpp index 26cf2092c..20674f87c 100644 --- a/Crypto_Win/src/CipherKeyImpl.cpp +++ b/Crypto_Win/src/CipherKeyImpl.cpp @@ -580,7 +580,7 @@ void CipherKeyImpl::generateKey( int keySz = keySize(); int ivSz = ivSize(); int requiredSz = keySz + ivSz; - int availableSz = d.size(); + int availableSz = static_cast(d.size()); int k = 1; Poco::DigestEngine::Digest extraD(d); while (availableSz < requiredSz) @@ -596,7 +596,7 @@ void CipherKeyImpl::generateKey( md5.update(&extraD[0], extraD.size()); extraD = md5.digest(); } - availableSz += extraD.size(); + availableSz += static_cast(extraD.size()); d.insert(d.end(), extraD.begin(), extraD.end()); } @@ -686,7 +686,7 @@ void CipherKeyImpl::importKey() HCRYPTKEY hPubPrivKey = 0; BOOL rc = CreatePrivateExponentOneKey(_sp.handle(), AT_KEYEXCHANGE, &hPubPrivKey); if (!rc) throw Poco::SystemException("cannot create private key for importing key", GetLastError()); - rc = ImportPlainSessionBlob(_sp.handle(), hPubPrivKey, _id, &_key[0], _key.size(), &_hKey); + rc = ImportPlainSessionBlob(_sp.handle(), hPubPrivKey, _id, &_key[0], static_cast(_key.size()), &_hKey); CryptDestroyKey(hPubPrivKey); if (!rc) throw Poco::SystemException("cannot import key", GetLastError()); } diff --git a/Crypto_Win/src/DigestEngine.cpp b/Crypto_Win/src/DigestEngine.cpp index 039f80962..2613a268f 100644 --- a/Crypto_Win/src/DigestEngine.cpp +++ b/Crypto_Win/src/DigestEngine.cpp @@ -37,12 +37,12 @@ DigestEngine::~DigestEngine() } -unsigned DigestEngine::digestLength() const +std::size_t DigestEngine::digestLength() const { DWORD hashLen; DWORD len = sizeof(hashLen); if (CryptGetHashParam(_handle, HP_HASHSIZE, reinterpret_cast(&hashLen), &len, 0)) - return static_cast(hashLen); + return static_cast(hashLen); else throw Poco::SystemException("Failed to obtain hash size", GetLastError()); } @@ -80,9 +80,9 @@ void DigestEngine::reset() const Poco::DigestEngine::Digest& DigestEngine::digest() { _digest.clear(); - unsigned hashLen = digestLength(); + std::size_t hashLen = digestLength(); _digest.resize(hashLen); - DWORD len = hashLen; + DWORD len = static_cast(hashLen); if (!CryptGetHashParam(_handle, HP_HASHVAL, &_digest[0], &len, 0)) throw Poco::SystemException("Failed to obtain hash", GetLastError()); reset(); @@ -90,9 +90,9 @@ const Poco::DigestEngine::Digest& DigestEngine::digest() } -void DigestEngine::updateImpl(const void* data, unsigned length) +void DigestEngine::updateImpl(const void* data, std::size_t length) { - if (!CryptHashData(_handle, reinterpret_cast(data), length, 0)) + if (!CryptHashData(_handle, reinterpret_cast(data), static_cast(length), 0)) throw Poco::SystemException("Failed to hash data", GetLastError()); } diff --git a/Crypto_Win/src/RSACipherImpl.cpp b/Crypto_Win/src/RSACipherImpl.cpp index c9fa88426..d3078b367 100644 --- a/Crypto_Win/src/RSACipherImpl.cpp +++ b/Crypto_Win/src/RSACipherImpl.cpp @@ -16,6 +16,7 @@ #include "Poco/Crypto/RSACipherImpl.h" #include "Poco/Crypto/CryptoTransform.h" +#include "Poco/Error.h" #include "Poco/Exception.h" @@ -29,43 +30,79 @@ namespace { void throwError() { - unsigned long err; - std::string msg; - - while ((err = ERR_get_error())) - { - if (!msg.empty()) - msg.append("; "); - msg.append(ERR_error_string(err, 0)); - } - - throw Poco::IOException(msg); + DWORD err = Error::last(); + std::string errStr = Error::getMessage(err); + throw Poco::IOException(errStr); } - + /* int mapPaddingMode(RSAPaddingMode paddingMode) { switch (paddingMode) { case RSA_PADDING_PKCS1: - return RSA_PKCS1_PADDING; + return BCRYPT_PAD_PKCS1; case RSA_PADDING_PKCS1_OAEP: - return RSA_PKCS1_OAEP_PADDING; - case RSA_PADDING_SSLV23: - return RSA_SSLV23_PADDING; + return BCRYPT_PAD_OAEP; + //case RSA_PADDING_SSLV23: ??? + // return RSA_SSLV23_PADDING; case RSA_PADDING_NONE: - return RSA_NO_PADDING; + return BCRYPT_PAD_NONE; default: poco_bugcheck(); - return RSA_NO_PADDING; + return BCRYPT_PAD_NONE; + // BCRYPT_PAD_PSS ??? + // + // ??? + // #if (NTDDI_VERSION >= NTDDI_WINBLUE) + // #define BCRYPT_PAD_PKCS1_OPTIONAL_HASH_OID 0x00000010 //BCryptVerifySignature + // #endif } } + */ + + std::size_t rsaBlockSize(const ServiceProvider& rsa) + { + BYTE* pbData = NULL; + DWORD dwDataLen = 0; + // ??? (from documentation) "This function must not be used on a thread of a multithreaded program." ??? + if (CryptGetProvParam(rsa.handle(), PP_SESSION_KEYSIZE, NULL, &dwDataLen, 0)) + { + std::vector data(dwDataLen); + pbData = &data[0]; + if (CryptGetProvParam(rsa.handle(), PP_SESSION_KEYSIZE, pbData, &dwDataLen, 0)) + { + // ??? what is in pbData? DWORD? BYTE? TODO: check at runtime + } + else // !CryptGetProvParam + { + DWORD err = Error::last(); + std::string errStr = "[RSAEncryptImpl::blockSize()]: "; + errStr += Error::getMessage(err); + switch (err) + { + case ERROR_INVALID_HANDLE: case ERROR_INVALID_PARAMETER: + case ERROR_MORE_DATA: case NTE_BAD_FLAGS: + case NTE_BAD_TYPE: case NTE_BAD_UID: + throw Poco::InvalidArgumentException(errStr); + default: + throw Poco::SystemException(errStr); + } + } + } // !CryptGetProvParam length + else + { + throw Poco::SystemException("Cannot obtain length for block size value."); + } + + return static_cast(dwDataLen); + } class RSAEncryptImpl: public CryptoTransform { public: - RSAEncryptImpl(const RSA* pRSA, RSAPaddingMode paddingMode); + RSAEncryptImpl(const ServiceProvider& rsa, RSAPaddingMode paddingMode); ~RSAEncryptImpl(); std::size_t blockSize() const; @@ -80,15 +117,17 @@ namespace std::streamsize finalize(unsigned char* output, std::streamsize length); private: - const RSA* _pRSA; - RSAPaddingMode _paddingMode; - std::streamsize _pos; - unsigned char* _pBuf; + DWORD encrypt(unsigned char* output, std::streamsize outputLength, BOOL isFinal); + + const ServiceProvider& _rsa; + RSAPaddingMode _paddingMode; + std::streamsize _pos; + unsigned char* _pBuf; }; - RSAEncryptImpl::RSAEncryptImpl(const RSA* pRSA, RSAPaddingMode paddingMode): - _pRSA(pRSA), + RSAEncryptImpl::RSAEncryptImpl(const ServiceProvider& rsa, RSAPaddingMode paddingMode) : + _rsa(rsa), _paddingMode(paddingMode), _pos(0), _pBuf(0) @@ -105,12 +144,13 @@ namespace std::size_t RSAEncryptImpl::blockSize() const { - return RSA_size(_pRSA); + return rsaBlockSize(_rsa); } std::size_t RSAEncryptImpl::maxDataSize() const { + // ??? same as openssl? std::size_t size = blockSize(); switch (_paddingMode) { @@ -127,12 +167,27 @@ namespace return size; } + DWORD RSAEncryptImpl::encrypt(unsigned char* output, std::streamsize outputLength, BOOL isFinal) + { + DWORD n = static_cast(_pos + 1); + if (!CryptEncrypt(_rsa.handle(), NULL, isFinal, 0, NULL, &n, 0)) + throwError(); + poco_assert(n > _pos); + poco_assert_dbg(n <= maxDataSize()); + std::vector data(n); + n = static_cast(_pos + 1); + std::memcpy(&data[0], _pBuf, n); + if (!CryptEncrypt(_rsa.handle(), NULL, isFinal, 0, &data[0], &n, n)) + throwError(); + poco_assert(n <= outputLength); + std::memcpy(output, &data[0], n); + return n; + } - std::streamsize RSAEncryptImpl::transform( - const unsigned char* input, - std::streamsize inputLength, - unsigned char* output, - std::streamsize outputLength) + std::streamsize RSAEncryptImpl::transform(const unsigned char* input, + std::streamsize inputLength, + unsigned char* output, + std::streamsize outputLength) { // always fill up the buffer before writing! std::streamsize maxSize = static_cast(maxDataSize()); @@ -148,14 +203,13 @@ namespace if (missing == 0) { poco_assert (outputLength >= rsaSize); - int n = RSA_public_encrypt(static_cast(maxSize), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); - if (n == -1) - throwError(); + //int n = 0; + //int n = RSA_public_encrypt(static_cast(maxSize), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); + DWORD n = encrypt(output, outputLength, FALSE); rc += n; output += n; outputLength -= n; _pos = 0; - } else { @@ -179,8 +233,9 @@ namespace int rc = 0; if (_pos > 0) { - rc = RSA_public_encrypt(static_cast(_pos), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); - if (rc == -1) throwError(); + //rc = RSA_public_encrypt(static_cast(_pos), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); + //if (rc == -1) throwError(); + rc = encrypt(output, length, TRUE); } return rc; } @@ -189,7 +244,7 @@ namespace class RSADecryptImpl: public CryptoTransform { public: - RSADecryptImpl(const RSA* pRSA, RSAPaddingMode paddingMode); + RSADecryptImpl(const ServiceProvider& rsa, RSAPaddingMode paddingMode); ~RSADecryptImpl(); std::size_t blockSize() const; @@ -205,15 +260,17 @@ namespace std::streamsize length); private: - const RSA* _pRSA; - RSAPaddingMode _paddingMode; - std::streamsize _pos; - unsigned char* _pBuf; + DWORD decrypt(unsigned char* output, std::streamsize outputLength, BOOL isFinal); + + const ServiceProvider& _rsa; + RSAPaddingMode _paddingMode; + std::streamsize _pos; + unsigned char* _pBuf; }; - RSADecryptImpl::RSADecryptImpl(const RSA* pRSA, RSAPaddingMode paddingMode): - _pRSA(pRSA), + RSADecryptImpl::RSADecryptImpl(const ServiceProvider& rsa, RSAPaddingMode paddingMode) : + _rsa(rsa), _paddingMode(paddingMode), _pos(0), _pBuf(0) @@ -230,7 +287,24 @@ namespace std::size_t RSADecryptImpl::blockSize() const { - return RSA_size(_pRSA); + return rsaBlockSize(_rsa); + } + + DWORD RSADecryptImpl::decrypt(unsigned char* output, std::streamsize outputLength, BOOL isFinal) + { + DWORD n = static_cast(_pos + 1); + if (!CryptDecrypt(_rsa.handle(), NULL, isFinal, 0, NULL, &n)) + throwError(); + poco_assert(n > _pos); + //poco_assert_dbg(n <= maxDataSize()); + std::vector data(n); + n = static_cast(_pos + 1); + std::memcpy(&data[0], _pBuf, n); + if (!CryptDecrypt(_rsa.handle(), NULL, isFinal, 0, &data[0], &n)) + throwError(); + poco_assert(n <= outputLength); + std::memcpy(output, &data[0], n); + return n; } @@ -253,7 +327,8 @@ namespace std::streamsize missing = rsaSize - _pos; if (missing == 0) { - int tmp = RSA_private_decrypt(static_cast(rsaSize), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); + //int tmp = RSA_private_decrypt(static_cast(rsaSize), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); + DWORD tmp = decrypt(output, outputLength, FALSE); if (tmp == -1) throwError(); rc += tmp; @@ -283,7 +358,8 @@ namespace int rc = 0; if (_pos > 0) { - rc = RSA_private_decrypt(static_cast(_pos), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); + //rc = RSA_private_decrypt(static_cast(_pos), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); + rc = decrypt(output, length, TRUE); if (rc == -1) throwError(); } @@ -306,13 +382,13 @@ RSACipherImpl::~RSACipherImpl() CryptoTransform* RSACipherImpl::createEncryptor() { - return new RSAEncryptImpl(_key.impl()->getRSA(), _paddingMode); + return new RSAEncryptImpl(_key.impl()->serviceProvider(), _paddingMode); } CryptoTransform* RSACipherImpl::createDecryptor() { - return new RSADecryptImpl(_key.impl()->getRSA(), _paddingMode); + return new RSADecryptImpl(_key.impl()->serviceProvider(), _paddingMode); } diff --git a/Crypto_Win/src/RSADigestEngine.cpp b/Crypto_Win/src/RSADigestEngine.cpp index 3ce3cb71f..0af09caf5 100644 --- a/Crypto_Win/src/RSADigestEngine.cpp +++ b/Crypto_Win/src/RSADigestEngine.cpp @@ -14,10 +14,11 @@ // -#include " - - -// TODO: this is still OpenSSL code +#include "Poco/Crypto/RSADigestEngine.h" +#include "Poco/Format.h" +#include "Poco/Error.h" +#include "Poco/Base64Encoder.h" +#include namespace Poco { @@ -27,7 +28,7 @@ namespace Crypto { RSADigestEngine::RSADigestEngine(const RSAKey& key, DigestType digestType): _key(key), _engine(digestType == DIGEST_MD5 ? static_cast(_md5Engine) : static_cast(_sha1Engine)), - _type(digestType == DIGEST_MD5 ? NID_md5 : NID_sha1) + _type(digestType == DIGEST_MD5 ? szOID_RSA_MD5 : szOID_ECDSA_SHA1) { } @@ -37,7 +38,7 @@ RSADigestEngine::~RSADigestEngine() } -unsigned RSADigestEngine::digestLength() const +std::size_t RSADigestEngine::digestLength() const { return _engine.digestLength(); } @@ -66,27 +67,70 @@ const DigestEngine::Digest& RSADigestEngine::signature() if (_signature.empty()) { digest(); - _signature.resize(_key.size()); - unsigned sigLen = static_cast(_signature.size()); - RSA_sign(_type, &_digest[0], static_cast(_digest.size()), &_signature[0], &sigLen, _key.impl()->getRSA()); - // truncate _sig to sigLen - if (sigLen < _signature.size()) - _signature.resize(sigLen); + + std::string begin = "-----BEGIN RSA PUBLIC KEY-----\n"; + //TODO: base64 encode data and pass to CryptImportKey API + std::string sig(_digest.begin(), _digest.end()); + std::string end = "\n-----END RSA PUBLIC KEY-----"; + + std::ostringstream ostr; + Base64Encoder encoder(ostr); + encoder << sig; + encoder.close(); + + begin.append(ostr.str()).append(end); + _signature.assign(begin.begin(), begin.end()); } - return _signature; + + return _signature; } bool RSADigestEngine::verify(const DigestEngine::Digest& sig) { digest(); - DigestEngine::Digest sigCpy = sig; // copy becausse RSA_verify can modify sigCpy - int ret = RSA_verify(_type, &_digest[0], static_cast(_digest.size()), &sigCpy[0], static_cast(sigCpy.size()), _key.impl()->getRSA()); - return ret != 0; + + DWORD cbData = 0; + BYTE* pbData = NULL; + + if (CryptExportKey(_key.impl()->privateKey(), 0, PRIVATEKEYBLOB, 0/*???*/, + NULL, &cbData)) + { + std::vector pkData(cbData); + pbData = &pkData[0]; + + if (CryptExportKey(_key.impl()->publicKey(), 0, PRIVATEKEYBLOB, 0/*???*/, + pbData, &cbData)) + { + // TODO: base64-decode pbData + } + else // !CryptExportKey + { + DWORD err = Error::last(); + std::string errStr = Error::getMessage(err); + switch (err) + { + case ERROR_INVALID_HANDLE: case ERROR_INVALID_PARAMETER: + case NTE_BAD_DATA: case NTE_BAD_FLAGS: + case NTE_BAD_KEY: case NTE_BAD_KEY_STATE: + case NTE_BAD_PUBLIC_KEY: case NTE_BAD_TYPE: + case NTE_BAD_UID: case NTE_NO_KEY: + throw Poco::InvalidArgumentException(errStr); + default: + throw Poco::SystemException("Cannot export public key."); + } + } + } + else // !CryptExportKey length + { + throw Poco::SystemException("Cannot obtain key export length."); + } + + return false; } -void RSADigestEngine::updateImpl(const void* data, unsigned length) +void RSADigestEngine::updateImpl(const void* data, std::size_t length) { _engine.update(data, length); } diff --git a/Crypto_Win/src/RSAKeyImpl.cpp b/Crypto_Win/src/RSAKeyImpl.cpp index feb1b8c25..179cc5384 100644 --- a/Crypto_Win/src/RSAKeyImpl.cpp +++ b/Crypto_Win/src/RSAKeyImpl.cpp @@ -36,7 +36,7 @@ RSAKeyImpl::RSAKeyImpl(const X509Certificate& cert): _hPrivateKey(0), _hPublicKey(0) { - DWORD rc = CryptImportPublicKeyInfo(_sp.handle(), X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, &cert.system().pCertInfo->SubjectPublicKeyInfo, &_hPublicKey); + DWORD rc = CryptImportPublicKeyInfo(_sp.handle(), X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, &cert.system()->pCertInfo->SubjectPublicKeyInfo, &_hPublicKey); if (!rc) throw Poco::SystemException("Cannot import public key from certificate"); } @@ -110,9 +110,9 @@ RSAKeyImpl::~RSAKeyImpl() int RSAKeyImpl::size() const { - DWORD keyLength; + BYTE keyLength; DWORD size = sizeof(keyLength); - if (!CryptGetKeyParam(_hKey, KP_KEYLEN, &keyLength, &size, 0)) + if (!CryptGetKeyParam(_hPrivateKey, KP_KEYLEN, &keyLength, &size, 0)) throw Poco::SystemException("Cannot obtain key length"); return static_cast(keyLength); } From 829d497de0308c3dbf7b922c13e748fdac19bbe0 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Mon, 9 Feb 2015 20:49:05 -0600 Subject: [PATCH 26/34] remove Crypto_Win from develop branch --- Crypto_Win/Crypto_Win.progen | 23 - Crypto_Win/Crypto_Win_CE_vs90.sln | 60 -- Crypto_Win/Crypto_Win_CE_vs90.vcproj | 581 -------------- Crypto_Win/Crypto_Win_WEC2013_vs110.sln | 60 -- Crypto_Win/Crypto_Win_WEC2013_vs110.vcxproj | 306 -------- .../Crypto_Win_WEC2013_vs110.vcxproj.filters | 144 ---- Crypto_Win/Crypto_Win_WEC2013_vs120.sln | 60 -- Crypto_Win/Crypto_Win_WEC2013_vs120.vcxproj | 306 -------- .../Crypto_Win_WEC2013_vs120.vcxproj.filters | 144 ---- Crypto_Win/Crypto_Win_vs100.sln | 60 -- Crypto_Win/Crypto_Win_vs100.vcxproj | 322 -------- Crypto_Win/Crypto_Win_vs100.vcxproj.filters | 144 ---- Crypto_Win/Crypto_Win_vs110.sln | 60 -- Crypto_Win/Crypto_Win_vs110.vcxproj | 326 -------- Crypto_Win/Crypto_Win_vs110.vcxproj.filters | 144 ---- Crypto_Win/Crypto_Win_vs120.sln | 60 -- Crypto_Win/Crypto_Win_vs120.vcxproj | 326 -------- Crypto_Win/Crypto_Win_vs120.vcxproj.filters | 144 ---- Crypto_Win/Crypto_Win_vs71.sln | 50 -- Crypto_Win/Crypto_Win_vs71.vcproj | 515 ------------- Crypto_Win/Crypto_Win_vs80.sln | 60 -- Crypto_Win/Crypto_Win_vs80.vcproj | 536 ------------- Crypto_Win/Crypto_Win_vs90.sln | 60 -- Crypto_Win/Crypto_Win_vs90.vcproj | 535 ------------- Crypto_Win/Crypto_Win_x64_vs100.sln | 60 -- Crypto_Win/Crypto_Win_x64_vs100.vcxproj | 320 -------- .../Crypto_Win_x64_vs100.vcxproj.filters | 144 ---- Crypto_Win/Crypto_Win_x64_vs110.sln | 60 -- Crypto_Win/Crypto_Win_x64_vs110.vcxproj | 324 -------- .../Crypto_Win_x64_vs110.vcxproj.filters | 144 ---- Crypto_Win/Crypto_Win_x64_vs120.sln | 60 -- Crypto_Win/Crypto_Win_x64_vs120.vcxproj | 324 -------- .../Crypto_Win_x64_vs120.vcxproj.filters | 144 ---- Crypto_Win/Crypto_Win_x64_vs90.sln | 60 -- Crypto_Win/Crypto_Win_x64_vs90.vcproj | 540 ------------- Crypto_Win/Makefile | 21 - Crypto_Win/dependencies | 1 - Crypto_Win/include/Poco/Crypto/Cipher.h | 140 ---- .../include/Poco/Crypto/CipherFactory.h | 67 -- Crypto_Win/include/Poco/Crypto/CipherImpl.h | 68 -- Crypto_Win/include/Poco/Crypto/CipherKey.h | 184 ----- .../include/Poco/Crypto/CipherKeyImpl.h | 174 ----- Crypto_Win/include/Poco/Crypto/Crypto.h | 107 --- Crypto_Win/include/Poco/Crypto/CryptoStream.h | 194 ----- .../include/Poco/Crypto/CryptoTransform.h | 78 -- Crypto_Win/include/Poco/Crypto/DigestEngine.h | 87 --- .../include/Poco/Crypto/RSACipherImpl.h | 75 -- .../include/Poco/Crypto/RSADigestEngine.h | 107 --- Crypto_Win/include/Poco/Crypto/RSAKey.h | 118 --- Crypto_Win/include/Poco/Crypto/RSAKeyImpl.h | 134 ---- .../include/Poco/Crypto/ServiceProvider.h | 71 -- .../include/Poco/Crypto/X509Certificate.h | 177 ----- Crypto_Win/samples/Makefile | 12 - Crypto_Win/samples/dependencies | 2 - Crypto_Win/samples/genrsakey/Makefile | 19 - Crypto_Win/samples/genrsakey/genrsakey.progen | 18 - .../genrsakey/genrsakey_CE_VS90.vcproj | 474 ------------ .../samples/genrsakey/genrsakey_VS71.vcproj | 407 ---------- .../samples/genrsakey/genrsakey_VS80.vcproj | 447 ----------- .../samples/genrsakey/genrsakey_VS90.vcproj | 447 ----------- .../genrsakey/genrsakey_WEC2013_vs110.vcxproj | 296 ------- .../genrsakey_WEC2013_vs110.vcxproj.filters | 16 - .../genrsakey/genrsakey_WEC2013_vs120.vcxproj | 296 ------- .../genrsakey_WEC2013_vs120.vcxproj.filters | 16 - .../samples/genrsakey/genrsakey_vs100.vcxproj | 311 -------- .../genrsakey/genrsakey_vs100.vcxproj.filters | 16 - .../samples/genrsakey/genrsakey_vs110.vcxproj | 311 -------- .../genrsakey/genrsakey_vs110.vcxproj.filters | 16 - .../samples/genrsakey/genrsakey_vs120.vcxproj | 311 -------- .../genrsakey/genrsakey_vs120.vcxproj.filters | 16 - .../genrsakey/genrsakey_x64_vs100.vcxproj | 311 -------- .../genrsakey_x64_vs100.vcxproj.filters | 16 - .../genrsakey/genrsakey_x64_vs110.vcxproj | 311 -------- .../genrsakey_x64_vs110.vcxproj.filters | 16 - .../genrsakey/genrsakey_x64_vs120.vcxproj | 311 -------- .../genrsakey_x64_vs120.vcxproj.filters | 16 - .../genrsakey/genrsakey_x64_vs90.vcproj | 447 ----------- .../samples/genrsakey/src/genrsakey.cpp | 218 ------ Crypto_Win/samples/samples.progen | 4 - Crypto_Win/samples/samples_CE_VS90.sln | 37 - Crypto_Win/samples/samples_VS71.sln | 33 - Crypto_Win/samples/samples_VS80.sln | 37 - Crypto_Win/samples/samples_VS90.sln | 37 - Crypto_Win/samples/samples_WEC2013_vs110.sln | 37 - Crypto_Win/samples/samples_WEC2013_vs120.sln | 37 - Crypto_Win/samples/samples_vs100.sln | 37 - Crypto_Win/samples/samples_vs110.sln | 37 - Crypto_Win/samples/samples_vs120.sln | 37 - Crypto_Win/samples/samples_x64_vs100.sln | 37 - Crypto_Win/samples/samples_x64_vs110.sln | 37 - Crypto_Win/samples/samples_x64_vs120.sln | 37 - Crypto_Win/samples/samples_x64_vs90.sln | 37 - Crypto_Win/src/Cipher.cpp | 142 ---- Crypto_Win/src/CipherFactory.cpp | 65 -- Crypto_Win/src/CipherImpl.cpp | 198 ----- Crypto_Win/src/CipherKey.cpp | 47 -- Crypto_Win/src/CipherKeyImpl.cpp | 728 ------------------ Crypto_Win/src/CryptoStream.cpp | 357 --------- Crypto_Win/src/CryptoTransform.cpp | 40 - Crypto_Win/src/DigestEngine.cpp | 100 --- Crypto_Win/src/RSACipherImpl.cpp | 395 ---------- Crypto_Win/src/RSADigestEngine.cpp | 139 ---- Crypto_Win/src/RSAKey.cpp | 88 --- Crypto_Win/src/RSAKeyImpl.cpp | 184 ----- Crypto_Win/src/ServiceProvider.cpp | 57 -- Crypto_Win/src/X509Certificate.cpp | 468 ----------- Crypto_Win/testsuite/Makefile | 20 - Crypto_Win/testsuite/TestSuite.progen | 16 - Crypto_Win/testsuite/TestSuite_CE_VS90.vcproj | 509 ------------ Crypto_Win/testsuite/TestSuite_VS71.vcproj | 450 ----------- Crypto_Win/testsuite/TestSuite_VS80.vcproj | 490 ------------ Crypto_Win/testsuite/TestSuite_VS90.vcproj | 490 ------------ .../testsuite/TestSuite_WEC2013_vs110.vcxproj | 324 -------- .../TestSuite_WEC2013_vs110.vcxproj.filters | 60 -- .../testsuite/TestSuite_WEC2013_vs120.vcxproj | 324 -------- .../TestSuite_WEC2013_vs120.vcxproj.filters | 60 -- Crypto_Win/testsuite/TestSuite_vs100.vcxproj | 329 -------- .../testsuite/TestSuite_vs100.vcxproj.filters | 60 -- Crypto_Win/testsuite/TestSuite_vs110.vcxproj | 329 -------- .../testsuite/TestSuite_vs110.vcxproj.filters | 60 -- Crypto_Win/testsuite/TestSuite_vs120.vcxproj | 321 -------- .../testsuite/TestSuite_vs120.vcxproj.filters | 60 -- .../testsuite/TestSuite_x64_vs100.vcxproj | 329 -------- .../TestSuite_x64_vs100.vcxproj.filters | 60 -- .../testsuite/TestSuite_x64_vs110.vcxproj | 329 -------- .../TestSuite_x64_vs110.vcxproj.filters | 60 -- .../testsuite/TestSuite_x64_vs120.vcxproj | 321 -------- .../TestSuite_x64_vs120.vcxproj.filters | 60 -- .../testsuite/TestSuite_x64_vs90.vcproj | 490 ------------ Crypto_Win/testsuite/src/CryptoTest.cpp | 277 ------- Crypto_Win/testsuite/src/CryptoTest.h | 52 -- Crypto_Win/testsuite/src/CryptoTestSuite.cpp | 28 - Crypto_Win/testsuite/src/CryptoTestSuite.h | 29 - Crypto_Win/testsuite/src/DigestEngineTest.cpp | 98 --- Crypto_Win/testsuite/src/DigestEngineTest.h | 41 - Crypto_Win/testsuite/src/Driver.cpp | 45 -- Crypto_Win/testsuite/src/RSATest.cpp | 233 ------ Crypto_Win/testsuite/src/RSATest.h | 45 -- Crypto_Win/testsuite/src/WinCEDriver.cpp | 70 -- Crypto_Win/testsuite/src/WinDriver.cpp | 68 -- 140 files changed, 24112 deletions(-) delete mode 100644 Crypto_Win/Crypto_Win.progen delete mode 100644 Crypto_Win/Crypto_Win_CE_vs90.sln delete mode 100644 Crypto_Win/Crypto_Win_CE_vs90.vcproj delete mode 100644 Crypto_Win/Crypto_Win_WEC2013_vs110.sln delete mode 100644 Crypto_Win/Crypto_Win_WEC2013_vs110.vcxproj delete mode 100644 Crypto_Win/Crypto_Win_WEC2013_vs110.vcxproj.filters delete mode 100644 Crypto_Win/Crypto_Win_WEC2013_vs120.sln delete mode 100644 Crypto_Win/Crypto_Win_WEC2013_vs120.vcxproj delete mode 100644 Crypto_Win/Crypto_Win_WEC2013_vs120.vcxproj.filters delete mode 100644 Crypto_Win/Crypto_Win_vs100.sln delete mode 100644 Crypto_Win/Crypto_Win_vs100.vcxproj delete mode 100644 Crypto_Win/Crypto_Win_vs100.vcxproj.filters delete mode 100644 Crypto_Win/Crypto_Win_vs110.sln delete mode 100644 Crypto_Win/Crypto_Win_vs110.vcxproj delete mode 100644 Crypto_Win/Crypto_Win_vs110.vcxproj.filters delete mode 100644 Crypto_Win/Crypto_Win_vs120.sln delete mode 100644 Crypto_Win/Crypto_Win_vs120.vcxproj delete mode 100644 Crypto_Win/Crypto_Win_vs120.vcxproj.filters delete mode 100644 Crypto_Win/Crypto_Win_vs71.sln delete mode 100644 Crypto_Win/Crypto_Win_vs71.vcproj delete mode 100644 Crypto_Win/Crypto_Win_vs80.sln delete mode 100644 Crypto_Win/Crypto_Win_vs80.vcproj delete mode 100644 Crypto_Win/Crypto_Win_vs90.sln delete mode 100644 Crypto_Win/Crypto_Win_vs90.vcproj delete mode 100644 Crypto_Win/Crypto_Win_x64_vs100.sln delete mode 100644 Crypto_Win/Crypto_Win_x64_vs100.vcxproj delete mode 100644 Crypto_Win/Crypto_Win_x64_vs100.vcxproj.filters delete mode 100644 Crypto_Win/Crypto_Win_x64_vs110.sln delete mode 100644 Crypto_Win/Crypto_Win_x64_vs110.vcxproj delete mode 100644 Crypto_Win/Crypto_Win_x64_vs110.vcxproj.filters delete mode 100644 Crypto_Win/Crypto_Win_x64_vs120.sln delete mode 100644 Crypto_Win/Crypto_Win_x64_vs120.vcxproj delete mode 100644 Crypto_Win/Crypto_Win_x64_vs120.vcxproj.filters delete mode 100644 Crypto_Win/Crypto_Win_x64_vs90.sln delete mode 100644 Crypto_Win/Crypto_Win_x64_vs90.vcproj delete mode 100644 Crypto_Win/Makefile delete mode 100644 Crypto_Win/dependencies delete mode 100644 Crypto_Win/include/Poco/Crypto/Cipher.h delete mode 100644 Crypto_Win/include/Poco/Crypto/CipherFactory.h delete mode 100644 Crypto_Win/include/Poco/Crypto/CipherImpl.h delete mode 100644 Crypto_Win/include/Poco/Crypto/CipherKey.h delete mode 100644 Crypto_Win/include/Poco/Crypto/CipherKeyImpl.h delete mode 100644 Crypto_Win/include/Poco/Crypto/Crypto.h delete mode 100644 Crypto_Win/include/Poco/Crypto/CryptoStream.h delete mode 100644 Crypto_Win/include/Poco/Crypto/CryptoTransform.h delete mode 100644 Crypto_Win/include/Poco/Crypto/DigestEngine.h delete mode 100644 Crypto_Win/include/Poco/Crypto/RSACipherImpl.h delete mode 100644 Crypto_Win/include/Poco/Crypto/RSADigestEngine.h delete mode 100644 Crypto_Win/include/Poco/Crypto/RSAKey.h delete mode 100644 Crypto_Win/include/Poco/Crypto/RSAKeyImpl.h delete mode 100644 Crypto_Win/include/Poco/Crypto/ServiceProvider.h delete mode 100644 Crypto_Win/include/Poco/Crypto/X509Certificate.h delete mode 100644 Crypto_Win/samples/Makefile delete mode 100644 Crypto_Win/samples/dependencies delete mode 100644 Crypto_Win/samples/genrsakey/Makefile delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey.progen delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_CE_VS90.vcproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_VS71.vcproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_VS80.vcproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_VS90.vcproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs110.vcxproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs110.vcxproj.filters delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs120.vcxproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs120.vcxproj.filters delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_vs100.vcxproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_vs100.vcxproj.filters delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_vs110.vcxproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_vs110.vcxproj.filters delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_vs120.vcxproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_vs120.vcxproj.filters delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_x64_vs100.vcxproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_x64_vs100.vcxproj.filters delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_x64_vs110.vcxproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_x64_vs110.vcxproj.filters delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_x64_vs120.vcxproj delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_x64_vs120.vcxproj.filters delete mode 100644 Crypto_Win/samples/genrsakey/genrsakey_x64_vs90.vcproj delete mode 100644 Crypto_Win/samples/genrsakey/src/genrsakey.cpp delete mode 100644 Crypto_Win/samples/samples.progen delete mode 100644 Crypto_Win/samples/samples_CE_VS90.sln delete mode 100644 Crypto_Win/samples/samples_VS71.sln delete mode 100644 Crypto_Win/samples/samples_VS80.sln delete mode 100644 Crypto_Win/samples/samples_VS90.sln delete mode 100644 Crypto_Win/samples/samples_WEC2013_vs110.sln delete mode 100644 Crypto_Win/samples/samples_WEC2013_vs120.sln delete mode 100644 Crypto_Win/samples/samples_vs100.sln delete mode 100644 Crypto_Win/samples/samples_vs110.sln delete mode 100644 Crypto_Win/samples/samples_vs120.sln delete mode 100644 Crypto_Win/samples/samples_x64_vs100.sln delete mode 100644 Crypto_Win/samples/samples_x64_vs110.sln delete mode 100644 Crypto_Win/samples/samples_x64_vs120.sln delete mode 100644 Crypto_Win/samples/samples_x64_vs90.sln delete mode 100644 Crypto_Win/src/Cipher.cpp delete mode 100644 Crypto_Win/src/CipherFactory.cpp delete mode 100644 Crypto_Win/src/CipherImpl.cpp delete mode 100644 Crypto_Win/src/CipherKey.cpp delete mode 100644 Crypto_Win/src/CipherKeyImpl.cpp delete mode 100644 Crypto_Win/src/CryptoStream.cpp delete mode 100644 Crypto_Win/src/CryptoTransform.cpp delete mode 100644 Crypto_Win/src/DigestEngine.cpp delete mode 100644 Crypto_Win/src/RSACipherImpl.cpp delete mode 100644 Crypto_Win/src/RSADigestEngine.cpp delete mode 100644 Crypto_Win/src/RSAKey.cpp delete mode 100644 Crypto_Win/src/RSAKeyImpl.cpp delete mode 100644 Crypto_Win/src/ServiceProvider.cpp delete mode 100644 Crypto_Win/src/X509Certificate.cpp delete mode 100644 Crypto_Win/testsuite/Makefile delete mode 100644 Crypto_Win/testsuite/TestSuite.progen delete mode 100644 Crypto_Win/testsuite/TestSuite_CE_VS90.vcproj delete mode 100644 Crypto_Win/testsuite/TestSuite_VS71.vcproj delete mode 100644 Crypto_Win/testsuite/TestSuite_VS80.vcproj delete mode 100644 Crypto_Win/testsuite/TestSuite_VS90.vcproj delete mode 100644 Crypto_Win/testsuite/TestSuite_WEC2013_vs110.vcxproj delete mode 100644 Crypto_Win/testsuite/TestSuite_WEC2013_vs110.vcxproj.filters delete mode 100644 Crypto_Win/testsuite/TestSuite_WEC2013_vs120.vcxproj delete mode 100644 Crypto_Win/testsuite/TestSuite_WEC2013_vs120.vcxproj.filters delete mode 100644 Crypto_Win/testsuite/TestSuite_vs100.vcxproj delete mode 100644 Crypto_Win/testsuite/TestSuite_vs100.vcxproj.filters delete mode 100644 Crypto_Win/testsuite/TestSuite_vs110.vcxproj delete mode 100644 Crypto_Win/testsuite/TestSuite_vs110.vcxproj.filters delete mode 100644 Crypto_Win/testsuite/TestSuite_vs120.vcxproj delete mode 100644 Crypto_Win/testsuite/TestSuite_vs120.vcxproj.filters delete mode 100644 Crypto_Win/testsuite/TestSuite_x64_vs100.vcxproj delete mode 100644 Crypto_Win/testsuite/TestSuite_x64_vs100.vcxproj.filters delete mode 100644 Crypto_Win/testsuite/TestSuite_x64_vs110.vcxproj delete mode 100644 Crypto_Win/testsuite/TestSuite_x64_vs110.vcxproj.filters delete mode 100644 Crypto_Win/testsuite/TestSuite_x64_vs120.vcxproj delete mode 100644 Crypto_Win/testsuite/TestSuite_x64_vs120.vcxproj.filters delete mode 100644 Crypto_Win/testsuite/TestSuite_x64_vs90.vcproj delete mode 100644 Crypto_Win/testsuite/src/CryptoTest.cpp delete mode 100644 Crypto_Win/testsuite/src/CryptoTest.h delete mode 100644 Crypto_Win/testsuite/src/CryptoTestSuite.cpp delete mode 100644 Crypto_Win/testsuite/src/CryptoTestSuite.h delete mode 100644 Crypto_Win/testsuite/src/DigestEngineTest.cpp delete mode 100644 Crypto_Win/testsuite/src/DigestEngineTest.h delete mode 100644 Crypto_Win/testsuite/src/Driver.cpp delete mode 100644 Crypto_Win/testsuite/src/RSATest.cpp delete mode 100644 Crypto_Win/testsuite/src/RSATest.h delete mode 100644 Crypto_Win/testsuite/src/WinCEDriver.cpp delete mode 100644 Crypto_Win/testsuite/src/WinDriver.cpp diff --git a/Crypto_Win/Crypto_Win.progen b/Crypto_Win/Crypto_Win.progen deleted file mode 100644 index 3350291a7..000000000 --- a/Crypto_Win/Crypto_Win.progen +++ /dev/null @@ -1,23 +0,0 @@ -vc.project.guid = ACE069C0-B8FB-49C2-8D8F-410136C7D332 -vc.project.name = Crypto_Win -vc.project.target = PocoCryptoWin -vc.project.type = library -vc.project.pocobase = .. -vc.project.outdir = ${vc.project.pocobase} -vc.project.platforms = Win32, x64, WinCE -vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md -vc.project.prototype = ${vc.project.name}_vs90.vcproj -vc.project.compiler.include = ..\\Foundation\\include -vc.project.compiler.defines = -vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS -vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared} -vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared} -vc.project.linker.dependencies = Crypt32.lib iphlpapi.lib -vc.project.linker.dependencies.debug_shared = -vc.project.linker.dependencies.release_shared = -vc.project.linker.dependencies.debug_static_md = -vc.project.linker.dependencies.release_static_md = -vc.project.linker.dependencies.debug_static_mt = -vc.project.linker.dependencies.release_static_mt = -vc.solution.create = true -vc.solution.include = testsuite\\TestSuite diff --git a/Crypto_Win/Crypto_Win_CE_vs90.sln b/Crypto_Win/Crypto_Win_CE_vs90.sln deleted file mode 100644 index e59355c41..000000000 --- a/Crypto_Win/Crypto_Win_CE_vs90.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_CE_vs90.vcproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_CE_vs90.vcproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Digi JumpStart (ARMV4I) = debug_shared|Digi JumpStart (ARMV4I) - release_shared|Digi JumpStart (ARMV4I) = release_shared|Digi JumpStart (ARMV4I) - debug_static_mt|Digi JumpStart (ARMV4I) = debug_static_mt|Digi JumpStart (ARMV4I) - release_static_mt|Digi JumpStart (ARMV4I) = release_static_mt|Digi JumpStart (ARMV4I) - debug_static_md|Digi JumpStart (ARMV4I) = debug_static_md|Digi JumpStart (ARMV4I) - release_static_md|Digi JumpStart (ARMV4I) = release_static_md|Digi JumpStart (ARMV4I) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Digi JumpStart (ARMV4I).ActiveCfg = debug_shared|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Digi JumpStart (ARMV4I).Build.0 = debug_shared|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Digi JumpStart (ARMV4I).Deploy.0 = debug_shared|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Digi JumpStart (ARMV4I).ActiveCfg = release_shared|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Digi JumpStart (ARMV4I).Build.0 = release_shared|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Digi JumpStart (ARMV4I).Deploy.0 = release_shared|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_mt|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Digi JumpStart (ARMV4I).Build.0 = debug_static_mt|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_mt|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = release_static_mt|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Digi JumpStart (ARMV4I).Build.0 = release_static_mt|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = release_static_mt|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_md|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Digi JumpStart (ARMV4I).Build.0 = debug_static_md|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_md|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Digi JumpStart (ARMV4I).ActiveCfg = release_static_md|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Digi JumpStart (ARMV4I).Build.0 = release_static_md|Digi JumpStart (ARMV4I) - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Digi JumpStart (ARMV4I).Deploy.0 = release_static_md|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Digi JumpStart (ARMV4I).ActiveCfg = debug_shared|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Digi JumpStart (ARMV4I).Build.0 = debug_shared|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Digi JumpStart (ARMV4I).Deploy.0 = debug_shared|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Digi JumpStart (ARMV4I).ActiveCfg = release_shared|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Digi JumpStart (ARMV4I).Build.0 = release_shared|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Digi JumpStart (ARMV4I).Deploy.0 = release_shared|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_mt|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Digi JumpStart (ARMV4I).Build.0 = debug_static_mt|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_mt|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = release_static_mt|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Digi JumpStart (ARMV4I).Build.0 = release_static_mt|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = release_static_mt|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_md|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Digi JumpStart (ARMV4I).Build.0 = debug_static_md|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_md|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Digi JumpStart (ARMV4I).ActiveCfg = release_static_md|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Digi JumpStart (ARMV4I).Build.0 = release_static_md|Digi JumpStart (ARMV4I) - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Digi JumpStart (ARMV4I).Deploy.0 = release_static_md|Digi JumpStart (ARMV4I) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_CE_vs90.vcproj b/Crypto_Win/Crypto_Win_CE_vs90.vcproj deleted file mode 100644 index d2d93ea24..000000000 --- a/Crypto_Win/Crypto_Win_CE_vs90.vcproj +++ /dev/null @@ -1,581 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/Crypto_Win_WEC2013_vs110.sln b/Crypto_Win/Crypto_Win_WEC2013_vs110.sln deleted file mode 100644 index a2f05e680..000000000 --- a/Crypto_Win/Crypto_Win_WEC2013_vs110.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_WEC2013_vs110.vcxproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_WEC2013_vs110.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|SDK_AM335X_SK_WEC2013_V300 = debug_shared|SDK_AM335X_SK_WEC2013_V300 - release_shared|SDK_AM335X_SK_WEC2013_V300 = release_shared|SDK_AM335X_SK_WEC2013_V300 - debug_static_mt|SDK_AM335X_SK_WEC2013_V300 = debug_static_mt|SDK_AM335X_SK_WEC2013_V300 - release_static_mt|SDK_AM335X_SK_WEC2013_V300 = release_static_mt|SDK_AM335X_SK_WEC2013_V300 - debug_static_md|SDK_AM335X_SK_WEC2013_V300 = debug_static_md|SDK_AM335X_SK_WEC2013_V300 - release_static_md|SDK_AM335X_SK_WEC2013_V300 = release_static_md|SDK_AM335X_SK_WEC2013_V300 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = debug_shared|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|SDK_AM335X_SK_WEC2013_V300.Build.0 = debug_shared|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = debug_shared|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = release_shared|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|SDK_AM335X_SK_WEC2013_V300.Build.0 = release_shared|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = release_shared|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = debug_static_mt|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|SDK_AM335X_SK_WEC2013_V300.Build.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = release_static_mt|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|SDK_AM335X_SK_WEC2013_V300.Build.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = debug_static_md|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|SDK_AM335X_SK_WEC2013_V300.Build.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = release_static_md|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|SDK_AM335X_SK_WEC2013_V300.Build.0 = release_static_md|SDK_AM335X_SK_WEC2013_V300 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = release_static_md|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = debug_shared|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|SDK_AM335X_SK_WEC2013_V300.Build.0 = debug_shared|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = debug_shared|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = release_shared|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|SDK_AM335X_SK_WEC2013_V300.Build.0 = release_shared|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = release_shared|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = debug_static_mt|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|SDK_AM335X_SK_WEC2013_V300.Build.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = release_static_mt|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|SDK_AM335X_SK_WEC2013_V300.Build.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = debug_static_md|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|SDK_AM335X_SK_WEC2013_V300.Build.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = release_static_md|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|SDK_AM335X_SK_WEC2013_V300.Build.0 = release_static_md|SDK_AM335X_SK_WEC2013_V300 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = release_static_md|SDK_AM335X_SK_WEC2013_V300 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_WEC2013_vs110.vcxproj b/Crypto_Win/Crypto_Win_WEC2013_vs110.vcxproj deleted file mode 100644 index 649676cad..000000000 --- a/Crypto_Win/Crypto_Win_WEC2013_vs110.vcxproj +++ /dev/null @@ -1,306 +0,0 @@ - - - - - debug_shared - SDK_AM335X_SK_WEC2013_V300 - - - debug_static_md - SDK_AM335X_SK_WEC2013_V300 - - - debug_static_mt - SDK_AM335X_SK_WEC2013_V300 - - - release_shared - SDK_AM335X_SK_WEC2013_V300 - - - release_static_md - SDK_AM335X_SK_WEC2013_V300 - - - release_static_mt - SDK_AM335X_SK_WEC2013_V300 - - - - Crypto_Win - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - en-US - 11.0 - true - SDK_AM335X_SK_WEC2013_V300 - CE800 - - - - StaticLibrary - Unicode - CE800 - - - StaticLibrary - Unicode - CE800 - - - StaticLibrary - Unicode - CE800 - - - StaticLibrary - Unicode - CE800 - - - DynamicLibrary - Unicode - CE800 - - - DynamicLibrary - Unicode - CE800 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.61030.0 - PocoCryptoWind - PocoCryptoWinmdd - PocoCryptoWinmtd - PocoCryptoWin - PocoCryptoWinmd - PocoCryptoWinmt - - - ..\bin\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - true - true - - - ..\bin\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - false - true - - - ..\lib\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - - - ..\lib\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - - - ..\lib\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - - - ..\lib\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - Level3 - ProgramDatabase - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\PocoCryptoWind.dll - ..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - ..\bin\$(Platform)\PocoCryptoWind.pdb - - - ..\lib\$(Platform)\PocoCryptoWind.lib - WindowsCE - - - - - MaxSpeed - true - Speed - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - Level3 - ProgramDatabase - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\PocoCryptoWin.dll - ..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - - - ..\lib\$(Platform)\PocoCryptoWin.lib - WindowsCE - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebug - true - true - - ..\lib\$(Platform)\PocoCryptoWinmtd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib\$(Platform)\PocoCryptoWinmtd.lib - - - - - MaxSpeed - true - Speed - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreaded - false - true - - Level3 - ProgramDatabase - Default - - - ..\lib\$(Platform)\PocoCryptoWinmt.lib - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - - ..\lib\$(Platform)\PocoCryptoWinmdd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib\$(Platform)\PocoCryptoWinmdd.lib - - - - - MaxSpeed - true - Speed - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - - Level3 - ProgramDatabase - Default - - - ..\lib\$(Platform)\PocoCryptoWinmd.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - diff --git a/Crypto_Win/Crypto_Win_WEC2013_vs110.vcxproj.filters b/Crypto_Win/Crypto_Win_WEC2013_vs110.vcxproj.filters deleted file mode 100644 index fc9bb280d..000000000 --- a/Crypto_Win/Crypto_Win_WEC2013_vs110.vcxproj.filters +++ /dev/null @@ -1,144 +0,0 @@ - - - - - {06ee9234-a90d-4f16-9622-a538de4df5ea} - - - {9f32d2cd-c911-4aa4-8e12-59d95d148020} - - - {fb5cca19-fa35-42cc-befd-16aaff12cdb5} - - - {fbe672f1-b7d4-4390-8692-453654c24787} - - - {07cbe553-ea9c-4a84-b1fe-6d9f8f06339e} - - - {b08b2405-1a2f-4f97-9b27-f840bfb6325e} - - - {d8f5cb38-0bb1-41e8-95d9-eab062510133} - - - {4b2e4a0d-9505-42ee-bf24-038684e6fac3} - - - {c81bc260-276e-48b2-81ce-d484291a554d} - - - {232c2128-57c3-47c6-905f-8f759df6392a} - - - {52ff7548-a864-4f69-85c3-eeda4a9d940a} - - - {e5cb3fba-10d5-4066-9135-afefcbb261f7} - - - {bb081e78-5ebb-448e-8fd5-fd6deb1a96f0} - - - {814a1698-b185-481d-8416-3f9fc3bc7772} - - - {4be3399c-eca1-4d16-8b64-9049b5293eba} - - - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - Certificate\Header Files - - - CryptoCore\Header Files - - - CryptoCore\Header Files - - - Digest\Header Files - - - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - Certificate\Source Files - - - CryptoCore\Source Files - - - Digest\Source Files - - - - - - \ No newline at end of file diff --git a/Crypto_Win/Crypto_Win_WEC2013_vs120.sln b/Crypto_Win/Crypto_Win_WEC2013_vs120.sln deleted file mode 100644 index 9a9593bab..000000000 --- a/Crypto_Win/Crypto_Win_WEC2013_vs120.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_WEC2013_vs120.vcxproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_WEC2013_vs120.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|SDK_AM335X_SK_WEC2013_V310 = debug_shared|SDK_AM335X_SK_WEC2013_V310 - release_shared|SDK_AM335X_SK_WEC2013_V310 = release_shared|SDK_AM335X_SK_WEC2013_V310 - debug_static_mt|SDK_AM335X_SK_WEC2013_V310 = debug_static_mt|SDK_AM335X_SK_WEC2013_V310 - release_static_mt|SDK_AM335X_SK_WEC2013_V310 = release_static_mt|SDK_AM335X_SK_WEC2013_V310 - debug_static_md|SDK_AM335X_SK_WEC2013_V310 = debug_static_md|SDK_AM335X_SK_WEC2013_V310 - release_static_md|SDK_AM335X_SK_WEC2013_V310 = release_static_md|SDK_AM335X_SK_WEC2013_V310 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = debug_shared|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|SDK_AM335X_SK_WEC2013_V310.Build.0 = debug_shared|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = debug_shared|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = release_shared|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|SDK_AM335X_SK_WEC2013_V310.Build.0 = release_shared|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = release_shared|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = debug_static_mt|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|SDK_AM335X_SK_WEC2013_V310.Build.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = release_static_mt|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|SDK_AM335X_SK_WEC2013_V310.Build.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = debug_static_md|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|SDK_AM335X_SK_WEC2013_V310.Build.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = release_static_md|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|SDK_AM335X_SK_WEC2013_V310.Build.0 = release_static_md|SDK_AM335X_SK_WEC2013_V310 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = release_static_md|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = debug_shared|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|SDK_AM335X_SK_WEC2013_V310.Build.0 = debug_shared|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = debug_shared|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = release_shared|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|SDK_AM335X_SK_WEC2013_V310.Build.0 = release_shared|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = release_shared|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = debug_static_mt|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|SDK_AM335X_SK_WEC2013_V310.Build.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = release_static_mt|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|SDK_AM335X_SK_WEC2013_V310.Build.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = debug_static_md|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|SDK_AM335X_SK_WEC2013_V310.Build.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = release_static_md|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|SDK_AM335X_SK_WEC2013_V310.Build.0 = release_static_md|SDK_AM335X_SK_WEC2013_V310 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = release_static_md|SDK_AM335X_SK_WEC2013_V310 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_WEC2013_vs120.vcxproj b/Crypto_Win/Crypto_Win_WEC2013_vs120.vcxproj deleted file mode 100644 index 9186dbc34..000000000 --- a/Crypto_Win/Crypto_Win_WEC2013_vs120.vcxproj +++ /dev/null @@ -1,306 +0,0 @@ - - - - - debug_shared - SDK_AM335X_SK_WEC2013_V310 - - - debug_static_md - SDK_AM335X_SK_WEC2013_V310 - - - debug_static_mt - SDK_AM335X_SK_WEC2013_V310 - - - release_shared - SDK_AM335X_SK_WEC2013_V310 - - - release_static_md - SDK_AM335X_SK_WEC2013_V310 - - - release_static_mt - SDK_AM335X_SK_WEC2013_V310 - - - - Crypto_Win - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - en-US - 11.0 - true - SDK_AM335X_SK_WEC2013_V310 - CE800 - - - - StaticLibrary - Unicode - CE800 - - - StaticLibrary - Unicode - CE800 - - - StaticLibrary - Unicode - CE800 - - - StaticLibrary - Unicode - CE800 - - - DynamicLibrary - Unicode - CE800 - - - DynamicLibrary - Unicode - CE800 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - PocoCryptoWind - PocoCryptoWinmdd - PocoCryptoWinmtd - PocoCryptoWin - PocoCryptoWinmd - PocoCryptoWinmt - - - ..\bin\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - true - true - - - ..\bin\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - false - true - - - ..\lib\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - - - ..\lib\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - - - ..\lib\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - - - ..\lib\$(Platform)\ - obj\Crypto_Win\$(Platform)\$(Configuration)\ - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - Level3 - ProgramDatabase - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\PocoCryptoWind.dll - ..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - ..\bin\$(Platform)\PocoCryptoWind.pdb - - - ..\lib\$(Platform)\PocoCryptoWind.lib - WindowsCE - - - - - MaxSpeed - true - Speed - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - Level3 - ProgramDatabase - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin\$(Platform)\PocoCryptoWin.dll - ..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - - - ..\lib\$(Platform)\PocoCryptoWin.lib - WindowsCE - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebug - true - true - - ..\lib\$(Platform)\PocoCryptoWinmtd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib\$(Platform)\PocoCryptoWinmtd.lib - - - - - MaxSpeed - true - Speed - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreaded - false - true - - Level3 - ProgramDatabase - Default - - - ..\lib\$(Platform)\PocoCryptoWinmt.lib - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - - ..\lib\$(Platform)\PocoCryptoWinmdd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib\$(Platform)\PocoCryptoWinmdd.lib - - - - - MaxSpeed - true - Speed - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - - Level3 - ProgramDatabase - Default - - - ..\lib\$(Platform)\PocoCryptoWinmd.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - diff --git a/Crypto_Win/Crypto_Win_WEC2013_vs120.vcxproj.filters b/Crypto_Win/Crypto_Win_WEC2013_vs120.vcxproj.filters deleted file mode 100644 index 24cf6bd78..000000000 --- a/Crypto_Win/Crypto_Win_WEC2013_vs120.vcxproj.filters +++ /dev/null @@ -1,144 +0,0 @@ - - - - - {410b8554-b1ad-4265-a0a5-ebe35cfadc55} - - - {204214c6-d11f-4c03-a858-1ba1d45ebfa2} - - - {2e003a0b-5ab3-4289-9052-3653a90b75dc} - - - {29318e35-d51a-4556-b9e0-c13c63b3f81f} - - - {43123107-8e09-4788-9e1a-c9d991a2ea57} - - - {e6f1639b-609b-4aed-b6ed-228564059ffe} - - - {255eb59a-d053-4f2a-bf1d-e4c215e1351a} - - - {0f39cb3c-e379-4c05-9f29-cd58a41ae6e1} - - - {3b9166e2-56c5-447b-a238-068d80eeec7d} - - - {5387dec1-2c59-418b-8cf1-fc1ef7053e8d} - - - {e60d4760-a5f2-4652-a34b-d58733f75aa2} - - - {26bc6495-76c7-4aea-9538-874456161f91} - - - {710c38f3-f1bc-4ae6-a1ca-1e9495b94208} - - - {0aab8e13-a028-42a2-88d0-4afb0af5eb28} - - - {f551fe8b-bbaf-4f67-9af3-9e8e2cd73267} - - - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - Certificate\Header Files - - - CryptoCore\Header Files - - - CryptoCore\Header Files - - - Digest\Header Files - - - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - Certificate\Source Files - - - CryptoCore\Source Files - - - Digest\Source Files - - - - - - \ No newline at end of file diff --git a/Crypto_Win/Crypto_Win_vs100.sln b/Crypto_Win/Crypto_Win_vs100.sln deleted file mode 100644 index 27e70b94d..000000000 --- a/Crypto_Win/Crypto_Win_vs100.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_vs100.vcxproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs100.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Win32 = debug_shared|Win32 - release_shared|Win32 = release_shared|Win32 - debug_static_mt|Win32 = debug_static_mt|Win32 - release_static_mt|Win32 = release_static_mt|Win32 - debug_static_md|Win32 = debug_static_md|Win32 - release_static_md|Win32 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.Build.0 = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Build.0 = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_vs100.vcxproj b/Crypto_Win/Crypto_Win_vs100.vcxproj deleted file mode 100644 index 6754f8e54..000000000 --- a/Crypto_Win/Crypto_Win_vs100.vcxproj +++ /dev/null @@ -1,322 +0,0 @@ - - - - - debug_shared - Win32 - - - debug_static_md - Win32 - - - debug_static_mt - Win32 - - - release_shared - Win32 - - - release_static_md - Win32 - - - release_static_mt - Win32 - - - - Crypto_Win - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - Crypto_Win - Win32Proj - - - - StaticLibrary - MultiByte - - - StaticLibrary - MultiByte - - - StaticLibrary - MultiByte - - - StaticLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - ..\bin\ - obj\Crypto_Win\$(Configuration)\ - true - ..\bin\ - obj\Crypto_Win\$(Configuration)\ - false - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - PocoCryptoWind - PocoCryptoWinmdd - PocoCryptoWinmtd - PocoCryptoWin - PocoCryptoWinmd - PocoCryptoWinmt - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin\PocoCryptoWind.dll - true - true - ..\bin\PocoCryptoWind.pdb - ..\lib;%(AdditionalLibraryDirectories) - Console - ..\lib\PocoCryptoWind.lib - MachineX86 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin\PocoCryptoWin.dll - true - false - ..\lib;%(AdditionalLibraryDirectories) - Console - true - true - ..\lib\PocoCryptoWin.lib - MachineX86 - %(AdditionalOptions) - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - ..\lib\PocoCryptoWinmtd.pdb - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - ..\lib\PocoCryptoWinmtd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - ..\lib\PocoCryptoWinmt.lib - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - ..\lib\PocoCryptoWinmdd.pdb - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - ..\lib\PocoCryptoWinmdd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - ..\lib\PocoCryptoWinmd.pdb - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\lib\PocoCryptoWinmd.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - diff --git a/Crypto_Win/Crypto_Win_vs100.vcxproj.filters b/Crypto_Win/Crypto_Win_vs100.vcxproj.filters deleted file mode 100644 index 9d4190dc5..000000000 --- a/Crypto_Win/Crypto_Win_vs100.vcxproj.filters +++ /dev/null @@ -1,144 +0,0 @@ - - - - - {07f5b534-5795-4d06-b387-7cc91399b41e} - - - {4eb5e404-9e50-490e-b7b0-9ca0b72149f7} - - - {eaa7e777-ff6e-4573-b2ab-0347b5be6036} - - - {02139414-794d-4a8b-843f-da0508d4da88} - - - {5e428519-8ec9-486e-9c4e-895cd3516c3e} - - - {d5b26c43-9751-4a3c-a0c3-779afed04ff6} - - - {d5056d47-11b9-4f42-99e6-3d6b62890afa} - - - {2a68b99b-52a8-4fb6-af96-e5d3bdeb00e9} - - - {b07aeba3-d1ae-4109-aa4c-0a393ff71a10} - - - {42f22819-a35b-4104-9095-21459d61c69b} - - - {a4808e52-c274-4abc-a826-ace593edc61a} - - - {420b9bd5-1008-4db5-8b3a-392023a922d4} - - - {05c1c559-71c2-4f6c-a319-42a6bd4c7eeb} - - - {017e65d8-74a4-4f2c-901c-06baee8ad17c} - - - {9f693b06-3543-4961-83a4-d7de95e76d67} - - - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - Certificate\Header Files - - - CryptoCore\Header Files - - - CryptoCore\Header Files - - - Digest\Header Files - - - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - Certificate\Source Files - - - CryptoCore\Source Files - - - Digest\Source Files - - - - - - \ No newline at end of file diff --git a/Crypto_Win/Crypto_Win_vs110.sln b/Crypto_Win/Crypto_Win_vs110.sln deleted file mode 100644 index 2b349506e..000000000 --- a/Crypto_Win/Crypto_Win_vs110.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_vs110.vcxproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs110.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Win32 = debug_shared|Win32 - release_shared|Win32 = release_shared|Win32 - debug_static_mt|Win32 = debug_static_mt|Win32 - release_static_mt|Win32 = release_static_mt|Win32 - debug_static_md|Win32 = debug_static_md|Win32 - release_static_md|Win32 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.Build.0 = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Build.0 = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_vs110.vcxproj b/Crypto_Win/Crypto_Win_vs110.vcxproj deleted file mode 100644 index 03ab13171..000000000 --- a/Crypto_Win/Crypto_Win_vs110.vcxproj +++ /dev/null @@ -1,326 +0,0 @@ - - - - - debug_shared - Win32 - - - debug_static_md - Win32 - - - debug_static_mt - Win32 - - - release_shared - Win32 - - - release_static_md - Win32 - - - release_static_mt - Win32 - - - - Crypto_Win - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - Crypto_Win - Win32Proj - - - - StaticLibrary - MultiByte - v110 - - - StaticLibrary - MultiByte - v110 - - - StaticLibrary - MultiByte - v110 - - - StaticLibrary - MultiByte - v110 - - - DynamicLibrary - MultiByte - v110 - - - DynamicLibrary - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.61030.0 - PocoCryptoWind - PocoCryptoWinmdd - PocoCryptoWinmtd - PocoCryptoWin - PocoCryptoWinmd - PocoCryptoWinmt - - - ..\bin\ - obj\Crypto_Win\$(Configuration)\ - true - - - ..\bin\ - obj\Crypto_Win\$(Configuration)\ - false - - - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - - - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - - - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - - - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin\PocoCryptoWind.dll - true - true - ..\bin\PocoCryptoWind.pdb - ..\lib;%(AdditionalLibraryDirectories) - Console - ..\lib\PocoCryptoWind.lib - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin\PocoCryptoWin.dll - true - false - ..\lib;%(AdditionalLibraryDirectories) - Console - true - true - ..\lib\PocoCryptoWin.lib - MachineX86 - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - ..\lib\PocoCryptoWinmtd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib\PocoCryptoWinmtd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - ..\lib\PocoCryptoWinmt.lib - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - ..\lib\PocoCryptoWinmdd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib\PocoCryptoWinmdd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - ..\lib\PocoCryptoWinmd.pdb - Level3 - - Default - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\lib\PocoCryptoWinmd.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - diff --git a/Crypto_Win/Crypto_Win_vs110.vcxproj.filters b/Crypto_Win/Crypto_Win_vs110.vcxproj.filters deleted file mode 100644 index 4cae85b66..000000000 --- a/Crypto_Win/Crypto_Win_vs110.vcxproj.filters +++ /dev/null @@ -1,144 +0,0 @@ - - - - - {c2ff95bb-95e4-4ff1-a34c-4fb9e8fdecbd} - - - {42589233-e526-40e1-8732-ef5891874241} - - - {f9d3c32b-b641-4ca9-9e8e-e46bcb1a1545} - - - {06b5c364-51ed-44a7-bd27-3643dde36dce} - - - {7eea5a58-3db2-4f6b-aa4d-1715d1643aa6} - - - {02933284-c8be-4841-a46b-54f44ec15556} - - - {27e30426-3c58-4e4c-9e6b-08706ce21466} - - - {babe3c1a-0d19-47c1-9ad6-ff2401b96da5} - - - {08e1b1d5-1539-4577-a396-ecaa5d9e0195} - - - {eb3e85d4-2f47-46c9-8d92-ca7cd7164ab2} - - - {c7543cc2-314a-49d9-b77e-b120687f9e21} - - - {ef7b9d0a-e85d-4062-b7c1-e6a172d93e1b} - - - {363b8870-cd56-4faf-977e-4605a9709573} - - - {31d648b6-f3b2-443c-a504-32842a9d5442} - - - {f77abbf8-dc28-4ea8-9e63-24ddb60e491c} - - - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - Certificate\Header Files - - - CryptoCore\Header Files - - - CryptoCore\Header Files - - - Digest\Header Files - - - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - Certificate\Source Files - - - CryptoCore\Source Files - - - Digest\Source Files - - - - - - \ No newline at end of file diff --git a/Crypto_Win/Crypto_Win_vs120.sln b/Crypto_Win/Crypto_Win_vs120.sln deleted file mode 100644 index 45d00241b..000000000 --- a/Crypto_Win/Crypto_Win_vs120.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_vs120.vcxproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs120.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Win32 = debug_shared|Win32 - release_shared|Win32 = release_shared|Win32 - debug_static_mt|Win32 = debug_static_mt|Win32 - release_static_mt|Win32 = release_static_mt|Win32 - debug_static_md|Win32 = debug_static_md|Win32 - release_static_md|Win32 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.Build.0 = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Build.0 = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_vs120.vcxproj b/Crypto_Win/Crypto_Win_vs120.vcxproj deleted file mode 100644 index 8513368ef..000000000 --- a/Crypto_Win/Crypto_Win_vs120.vcxproj +++ /dev/null @@ -1,326 +0,0 @@ - - - - - debug_shared - Win32 - - - debug_static_md - Win32 - - - debug_static_mt - Win32 - - - release_shared - Win32 - - - release_static_md - Win32 - - - release_static_mt - Win32 - - - - Crypto_Win - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - Crypto_Win - Win32Proj - - - - StaticLibrary - MultiByte - v120 - - - StaticLibrary - MultiByte - v120 - - - StaticLibrary - MultiByte - v120 - - - StaticLibrary - MultiByte - v120 - - - DynamicLibrary - MultiByte - v120 - - - DynamicLibrary - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - PocoCryptoWind - PocoCryptoWinmdd - PocoCryptoWinmtd - PocoCryptoWin - PocoCryptoWinmd - PocoCryptoWinmt - - - ..\bin\ - obj\Crypto_Win\$(Configuration)\ - true - - - ..\bin\ - obj\Crypto_Win\$(Configuration)\ - false - - - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - - - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - - - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - - - ..\lib\ - obj\Crypto_Win\$(Configuration)\ - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin\PocoCryptoWind.dll - true - true - ..\bin\PocoCryptoWind.pdb - ..\lib;%(AdditionalLibraryDirectories) - Console - ..\lib\PocoCryptoWind.lib - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin\PocoCryptoWin.dll - true - false - ..\lib;%(AdditionalLibraryDirectories) - Console - true - true - ..\lib\PocoCryptoWin.lib - MachineX86 - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - ..\lib\PocoCryptoWinmtd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib\PocoCryptoWinmtd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - ..\lib\PocoCryptoWinmt.lib - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - ..\lib\PocoCryptoWinmdd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib\PocoCryptoWinmdd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - ..\lib\PocoCryptoWinmd.pdb - Level3 - - Default - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\lib\PocoCryptoWinmd.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - diff --git a/Crypto_Win/Crypto_Win_vs120.vcxproj.filters b/Crypto_Win/Crypto_Win_vs120.vcxproj.filters deleted file mode 100644 index 368fe858a..000000000 --- a/Crypto_Win/Crypto_Win_vs120.vcxproj.filters +++ /dev/null @@ -1,144 +0,0 @@ - - - - - {a149c6a1-abbe-4b42-90d5-f3b5a6bc60ca} - - - {76739be7-e3f0-4d0c-8294-ec8112961a6b} - - - {7d9ece75-7979-4b8e-93e5-0918ce9b566e} - - - {5631d283-a6df-4c36-8f23-dcac83b47a00} - - - {73940f1f-b8f3-4482-9663-a820e3b6de90} - - - {6fb59d0d-1bac-441d-a26b-fa319e6d439e} - - - {98599a00-6eaa-45ca-a4a0-f69ee208625f} - - - {0cb26c71-f673-4a12-a357-d00ddead888e} - - - {81b9b3e8-faae-4456-b36f-07cbd911a482} - - - {f722c6a4-4815-4aac-87a3-a5b01b49048f} - - - {fcb79eb5-e847-4a87-9610-abeb040deca3} - - - {3d216fb8-a3e7-41ad-a9f7-eeae257f2706} - - - {b5eb6ccf-2399-4a04-8a55-daac901ccd75} - - - {665fcffd-214e-4621-8d38-f320fba24cb7} - - - {04fb03f1-d10f-4f4f-84cd-a556601b4613} - - - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - Certificate\Header Files - - - CryptoCore\Header Files - - - CryptoCore\Header Files - - - Digest\Header Files - - - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - Certificate\Source Files - - - CryptoCore\Source Files - - - Digest\Source Files - - - - - - \ No newline at end of file diff --git a/Crypto_Win/Crypto_Win_vs71.sln b/Crypto_Win/Crypto_Win_vs71.sln deleted file mode 100644 index f899b19ed..000000000 --- a/Crypto_Win/Crypto_Win_vs71.sln +++ /dev/null @@ -1,50 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_vs71.vcproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs71.vcproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - debug_shared = debug_shared - release_shared = release_shared - debug_static_mt = debug_static_mt - release_static_mt = release_static_mt - debug_static_md = debug_static_md - release_static_md = release_static_md - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared.ActiveCfg = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared.Build.0 = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared.ActiveCfg = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared.Build.0 = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt.ActiveCfg = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt.Build.0 = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt.ActiveCfg = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt.Build.0 = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md.ActiveCfg = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md.Build.0 = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md.ActiveCfg = release_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md.Build.0 = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared.ActiveCfg = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared.Build.0 = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared.ActiveCfg = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared.Build.0 = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt.ActiveCfg = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt.Build.0 = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt.ActiveCfg = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt.Build.0 = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md.ActiveCfg = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md.Build.0 = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md.ActiveCfg = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md.Build.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_vs71.vcproj b/Crypto_Win/Crypto_Win_vs71.vcproj deleted file mode 100644 index 64db4b7df..000000000 --- a/Crypto_Win/Crypto_Win_vs71.vcproj +++ /dev/null @@ -1,515 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/Crypto_Win_vs80.sln b/Crypto_Win/Crypto_Win_vs80.sln deleted file mode 100644 index d88131f5e..000000000 --- a/Crypto_Win/Crypto_Win_vs80.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_vs80.vcproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs80.vcproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Win32 = debug_shared|Win32 - release_shared|Win32 = release_shared|Win32 - debug_static_mt|Win32 = debug_static_mt|Win32 - release_static_mt|Win32 = release_static_mt|Win32 - debug_static_md|Win32 = debug_static_md|Win32 - release_static_md|Win32 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.Build.0 = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Build.0 = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_vs80.vcproj b/Crypto_Win/Crypto_Win_vs80.vcproj deleted file mode 100644 index 84ebba084..000000000 --- a/Crypto_Win/Crypto_Win_vs80.vcproj +++ /dev/null @@ -1,536 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/Crypto_Win_vs90.sln b/Crypto_Win/Crypto_Win_vs90.sln deleted file mode 100644 index d34ec9084..000000000 --- a/Crypto_Win/Crypto_Win_vs90.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_vs90.vcproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs90.vcproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Win32 = debug_shared|Win32 - release_shared|Win32 = release_shared|Win32 - debug_static_mt|Win32 = debug_static_mt|Win32 - release_static_mt|Win32 = release_static_mt|Win32 - debug_static_md|Win32 = debug_static_md|Win32 - release_static_md|Win32 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.Build.0 = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Build.0 = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_vs90.vcproj b/Crypto_Win/Crypto_Win_vs90.vcproj deleted file mode 100644 index 44171c998..000000000 --- a/Crypto_Win/Crypto_Win_vs90.vcproj +++ /dev/null @@ -1,535 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/Crypto_Win_x64_vs100.sln b/Crypto_Win/Crypto_Win_x64_vs100.sln deleted file mode 100644 index 0ee34b5c2..000000000 --- a/Crypto_Win/Crypto_Win_x64_vs100.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_x64_vs100.vcxproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs100.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|x64 = debug_shared|x64 - release_shared|x64 = release_shared|x64 - debug_static_mt|x64 = debug_static_mt|x64 - release_static_mt|x64 = release_static_mt|x64 - debug_static_md|x64 = debug_static_md|x64 - release_static_md|x64 = release_static_md|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.Build.0 = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.ActiveCfg = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.Build.0 = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.Deploy.0 = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.Build.0 = release_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.Deploy.0 = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Build.0 = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.ActiveCfg = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Build.0 = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Deploy.0 = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Build.0 = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Deploy.0 = release_static_md|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_x64_vs100.vcxproj b/Crypto_Win/Crypto_Win_x64_vs100.vcxproj deleted file mode 100644 index 1419b2a7d..000000000 --- a/Crypto_Win/Crypto_Win_x64_vs100.vcxproj +++ /dev/null @@ -1,320 +0,0 @@ - - - - - debug_shared - x64 - - - debug_static_md - x64 - - - debug_static_mt - x64 - - - release_shared - x64 - - - release_static_md - x64 - - - release_static_mt - x64 - - - - Crypto_Win - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - Crypto_Win - Win32Proj - - - - StaticLibrary - MultiByte - - - StaticLibrary - MultiByte - - - StaticLibrary - MultiByte - - - StaticLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - ..\bin64\ - obj64\Crypto_Win\$(Configuration)\ - true - ..\bin64\ - obj64\Crypto_Win\$(Configuration)\ - false - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - PocoCryptoWin64d - PocoCryptoWinmdd - PocoCryptoWinmtd - PocoCryptoWin64 - PocoCryptoWinmd - PocoCryptoWinmt - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin64\PocoCryptoWin64d.dll - true - true - ..\bin64\PocoCryptoWin64d.pdb - ..\lib64;%(AdditionalLibraryDirectories) - Console - ..\lib64\PocoCryptoWind.lib - MachineX64 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin64\PocoCryptoWin64.dll - true - false - ..\lib64;%(AdditionalLibraryDirectories) - Console - true - true - ..\lib64\PocoCryptoWin.lib - MachineX64 - %(AdditionalOptions) - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - ..\lib64\PocoCryptoWinmtd.pdb - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - ..\lib64\PocoCryptoWinmtd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - ..\lib64\PocoCryptoWinmt.lib - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - ..\lib64\PocoCryptoWinmdd.pdb - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - ..\lib64\PocoCryptoWinmdd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - ..\lib64\PocoCryptoWinmd.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - diff --git a/Crypto_Win/Crypto_Win_x64_vs100.vcxproj.filters b/Crypto_Win/Crypto_Win_x64_vs100.vcxproj.filters deleted file mode 100644 index 024f047c2..000000000 --- a/Crypto_Win/Crypto_Win_x64_vs100.vcxproj.filters +++ /dev/null @@ -1,144 +0,0 @@ - - - - - {683714c6-4ee7-4c9f-9f96-a5b6197cd293} - - - {221b5b4a-7163-4267-a307-df5c07211cbb} - - - {03ab4cbf-0fbf-4d55-b294-1b7f04b156ef} - - - {8e07276d-6a46-4928-bdfa-84fe32a92229} - - - {5d31e32d-6523-436b-8011-9c4eef04c16f} - - - {4e29183b-568b-47af-b620-b25a85bee5ec} - - - {bec8f041-1134-436c-8998-7ece69e5b351} - - - {12a31429-c607-4c3b-bb9c-4c63351714d6} - - - {a652f675-1b68-4638-933e-04a890ffb88d} - - - {0aefeaa1-f4f5-42ab-811c-00f4a77b74a3} - - - {1d723994-1d3c-4e74-af76-2d2b215b94d4} - - - {4d529602-b136-4aff-b6d3-f5e529310a67} - - - {12358cf7-d7c8-4a0a-a475-81f01ecb988e} - - - {751ecaf2-5e51-47ae-a29d-4ba5fc1f066d} - - - {765b2882-946d-4b73-ac06-6e70d5267c83} - - - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - Certificate\Header Files - - - CryptoCore\Header Files - - - CryptoCore\Header Files - - - Digest\Header Files - - - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - Certificate\Source Files - - - CryptoCore\Source Files - - - Digest\Source Files - - - - - - \ No newline at end of file diff --git a/Crypto_Win/Crypto_Win_x64_vs110.sln b/Crypto_Win/Crypto_Win_x64_vs110.sln deleted file mode 100644 index 66d663960..000000000 --- a/Crypto_Win/Crypto_Win_x64_vs110.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_x64_vs110.vcxproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs110.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|x64 = debug_shared|x64 - release_shared|x64 = release_shared|x64 - debug_static_mt|x64 = debug_static_mt|x64 - release_static_mt|x64 = release_static_mt|x64 - debug_static_md|x64 = debug_static_md|x64 - release_static_md|x64 = release_static_md|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.Build.0 = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.ActiveCfg = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.Build.0 = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.Deploy.0 = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.Build.0 = release_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.Deploy.0 = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Build.0 = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.ActiveCfg = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Build.0 = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Deploy.0 = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Build.0 = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Deploy.0 = release_static_md|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_x64_vs110.vcxproj b/Crypto_Win/Crypto_Win_x64_vs110.vcxproj deleted file mode 100644 index ec4294e0f..000000000 --- a/Crypto_Win/Crypto_Win_x64_vs110.vcxproj +++ /dev/null @@ -1,324 +0,0 @@ - - - - - debug_shared - x64 - - - debug_static_md - x64 - - - debug_static_mt - x64 - - - release_shared - x64 - - - release_static_md - x64 - - - release_static_mt - x64 - - - - Crypto_Win - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - Crypto_Win - Win32Proj - - - - StaticLibrary - MultiByte - v110 - - - StaticLibrary - MultiByte - v110 - - - StaticLibrary - MultiByte - v110 - - - StaticLibrary - MultiByte - v110 - - - DynamicLibrary - MultiByte - v110 - - - DynamicLibrary - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.61030.0 - PocoCryptoWin64d - PocoCryptoWinmdd - PocoCryptoWinmtd - PocoCryptoWin64 - PocoCryptoWinmd - PocoCryptoWinmt - - - ..\bin64\ - obj64\Crypto_Win\$(Configuration)\ - true - - - ..\bin64\ - obj64\Crypto_Win\$(Configuration)\ - false - - - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - - - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - - - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - - - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin64\PocoCryptoWin64d.dll - true - true - ..\bin64\PocoCryptoWin64d.pdb - ..\lib64;%(AdditionalLibraryDirectories) - Console - ..\lib64\PocoCryptoWind.lib - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin64\PocoCryptoWin64.dll - true - false - ..\lib64;%(AdditionalLibraryDirectories) - Console - true - true - ..\lib64\PocoCryptoWin.lib - MachineX64 - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - ..\lib64\PocoCryptoWinmtd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib64\PocoCryptoWinmtd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - ..\lib64\PocoCryptoWinmt.lib - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - ..\lib64\PocoCryptoWinmdd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib64\PocoCryptoWinmdd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - ..\lib64\PocoCryptoWinmd.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - diff --git a/Crypto_Win/Crypto_Win_x64_vs110.vcxproj.filters b/Crypto_Win/Crypto_Win_x64_vs110.vcxproj.filters deleted file mode 100644 index d273f0805..000000000 --- a/Crypto_Win/Crypto_Win_x64_vs110.vcxproj.filters +++ /dev/null @@ -1,144 +0,0 @@ - - - - - {eb41c003-437d-4b66-b596-2e5d3e8541f4} - - - {f34b6b54-a708-48c9-b76a-d32cb9967d67} - - - {bfc37c75-1964-4977-a584-0a90ec84a315} - - - {2ea526bb-cce7-4fd3-b3a3-ae509d4a37ec} - - - {889f7682-d77a-4714-8750-cc45650a1616} - - - {cb267fbc-a141-40c4-a6de-45d2b9b4c2c5} - - - {c7866693-a523-4b09-b08b-8bde5cadda0f} - - - {b27f906e-a3bf-4a26-a202-ddbe5db7ae4a} - - - {cbe5732c-d2ee-4134-baa5-85d1c1f49b95} - - - {050030bd-4bed-4615-ac89-e6715a15a05d} - - - {dbcd2abe-de7c-4148-a195-bb2404c0852a} - - - {c9f568de-e65c-4f1e-a8dc-973a22462947} - - - {3a008502-d94e-4e41-a4ba-95815a4b9f9c} - - - {24546d73-a22a-4391-aa4a-7db109f30b47} - - - {a3b89f05-fd31-4a68-9333-e879ee00fa36} - - - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - Certificate\Header Files - - - CryptoCore\Header Files - - - CryptoCore\Header Files - - - Digest\Header Files - - - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - Certificate\Source Files - - - CryptoCore\Source Files - - - Digest\Source Files - - - - - - \ No newline at end of file diff --git a/Crypto_Win/Crypto_Win_x64_vs120.sln b/Crypto_Win/Crypto_Win_x64_vs120.sln deleted file mode 100644 index 3333794b8..000000000 --- a/Crypto_Win/Crypto_Win_x64_vs120.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_x64_vs120.vcxproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs120.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|x64 = debug_shared|x64 - release_shared|x64 = release_shared|x64 - debug_static_mt|x64 = debug_static_mt|x64 - release_static_mt|x64 = release_static_mt|x64 - debug_static_md|x64 = debug_static_md|x64 - release_static_md|x64 = release_static_md|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.Build.0 = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.ActiveCfg = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.Build.0 = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.Deploy.0 = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.Build.0 = release_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.Deploy.0 = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Build.0 = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.ActiveCfg = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Build.0 = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Deploy.0 = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Build.0 = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Deploy.0 = release_static_md|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_x64_vs120.vcxproj b/Crypto_Win/Crypto_Win_x64_vs120.vcxproj deleted file mode 100644 index fd11ffb45..000000000 --- a/Crypto_Win/Crypto_Win_x64_vs120.vcxproj +++ /dev/null @@ -1,324 +0,0 @@ - - - - - debug_shared - x64 - - - debug_static_md - x64 - - - debug_static_mt - x64 - - - release_shared - x64 - - - release_static_md - x64 - - - release_static_mt - x64 - - - - Crypto_Win - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - Crypto_Win - Win32Proj - - - - StaticLibrary - MultiByte - v120 - - - StaticLibrary - MultiByte - v120 - - - StaticLibrary - MultiByte - v120 - - - StaticLibrary - MultiByte - v120 - - - DynamicLibrary - MultiByte - v120 - - - DynamicLibrary - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - PocoCryptoWin64d - PocoCryptoWinmdd - PocoCryptoWinmtd - PocoCryptoWin64 - PocoCryptoWinmd - PocoCryptoWinmt - - - ..\bin64\ - obj64\Crypto_Win\$(Configuration)\ - true - - - ..\bin64\ - obj64\Crypto_Win\$(Configuration)\ - false - - - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - - - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - - - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - - - ..\lib64\ - obj64\Crypto_Win\$(Configuration)\ - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin64\PocoCryptoWin64d.dll - true - true - ..\bin64\PocoCryptoWin64d.pdb - ..\lib64;%(AdditionalLibraryDirectories) - Console - ..\lib64\PocoCryptoWind.lib - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;Crypto_Win_EXPORTS;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - Crypt32.lib;iphlpapi.lib;%(AdditionalDependencies) - ..\bin64\PocoCryptoWin64.dll - true - false - ..\lib64;%(AdditionalLibraryDirectories) - Console - true - true - ..\lib64\PocoCryptoWin.lib - MachineX64 - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - ..\lib64\PocoCryptoWinmtd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib64\PocoCryptoWinmtd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - ..\lib64\PocoCryptoWinmt.lib - - - - - Disabled - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - ..\lib64\PocoCryptoWinmdd.pdb - Level3 - ProgramDatabase - Default - - - ..\lib64\PocoCryptoWinmdd.lib - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - ..\lib64\PocoCryptoWinmd.lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - true - true - true - true - true - - - - - diff --git a/Crypto_Win/Crypto_Win_x64_vs120.vcxproj.filters b/Crypto_Win/Crypto_Win_x64_vs120.vcxproj.filters deleted file mode 100644 index 4cbe7d2c7..000000000 --- a/Crypto_Win/Crypto_Win_x64_vs120.vcxproj.filters +++ /dev/null @@ -1,144 +0,0 @@ - - - - - {0313ba4a-ad15-4c23-9211-eb1e6418dcc7} - - - {cdd1c50e-1a3f-43f5-bd62-3f6f4625ab74} - - - {21b34cc7-7115-41f2-b146-c693e149cc83} - - - {36193d04-9e03-4695-9dc2-1bc2df36cbd4} - - - {6ef3fef3-96c2-4585-8e6f-8baf1f02c8fe} - - - {49d106eb-8337-49df-9d3f-5b074f62b6b6} - - - {fabfce99-59be-45ef-aa7a-9dfb94e22e2d} - - - {4b23d5d9-39e1-476c-a489-bfd613e52928} - - - {0e87f3bf-6df8-4b61-af76-6a2e6fb090b1} - - - {986907db-d95b-41d3-8f1b-4762307fdc60} - - - {b304efd8-767a-45a0-b702-849e130cba62} - - - {1b0320c3-3ae4-423d-9361-52569ae4f7c5} - - - {4c602062-2f15-4f29-b1f0-4ec35ab10018} - - - {1c49ecc2-9d4e-4a0a-afbd-a4e2562e9050} - - - {bcce7557-ada4-4ed7-b8f7-b22743c64240} - - - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - Cipher\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - RSA\Header Files - - - Certificate\Header Files - - - CryptoCore\Header Files - - - CryptoCore\Header Files - - - Digest\Header Files - - - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - Cipher\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - RSA\Source Files - - - Certificate\Source Files - - - CryptoCore\Source Files - - - Digest\Source Files - - - - - - \ No newline at end of file diff --git a/Crypto_Win/Crypto_Win_x64_vs90.sln b/Crypto_Win/Crypto_Win_x64_vs90.sln deleted file mode 100644 index 9c5783894..000000000 --- a/Crypto_Win/Crypto_Win_x64_vs90.sln +++ /dev/null @@ -1,60 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto_Win", "Crypto_Win_x64_vs90.vcproj", "{ACE069C0-B8FB-49C2-8D8F-410136C7D332}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs90.vcproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}" - ProjectSection(ProjectDependencies) = postProject - {ACE069C0-B8FB-49C2-8D8F-410136C7D332} = {ACE069C0-B8FB-49C2-8D8F-410136C7D332} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|x64 = debug_shared|x64 - release_shared|x64 = release_shared|x64 - debug_static_mt|x64 = debug_static_mt|x64 - release_static_mt|x64 = release_static_mt|x64 - debug_static_md|x64 = debug_static_md|x64 - release_static_md|x64 = release_static_md|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.Build.0 = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.ActiveCfg = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.Build.0 = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_shared|x64.Deploy.0 = release_shared|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.Build.0 = release_static_md|x64 - {ACE069C0-B8FB-49C2-8D8F-410136C7D332}.release_static_md|x64.Deploy.0 = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Build.0 = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.ActiveCfg = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Build.0 = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Deploy.0 = release_shared|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Build.0 = release_static_md|x64 - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Deploy.0 = release_static_md|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/Crypto_Win_x64_vs90.vcproj b/Crypto_Win/Crypto_Win_x64_vs90.vcproj deleted file mode 100644 index adaa7c240..000000000 --- a/Crypto_Win/Crypto_Win_x64_vs90.vcproj +++ /dev/null @@ -1,540 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/Makefile b/Crypto_Win/Makefile deleted file mode 100644 index 745ff68c2..000000000 --- a/Crypto_Win/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# -# Makefile -# -# $Id: //poco/1.4/Crypto/Makefile#2 $ -# -# Makefile for Poco Crypto -# - -include $(POCO_BASE)/build/rules/global - -SYSLIBS += -lssl -lcrypto - -objects = Cipher CipherFactory CipherImpl CipherKey CipherKeyImpl CryptoStream CryptoTransform \ - RSACipherImpl RSAKey RSAKeyImpl RSADigestEngine DigestEngine \ - X509Certificate OpenSSLInitializer - -target = PocoCrypto -target_version = $(LIBVERSION) -target_libs = PocoFoundation - -include $(POCO_BASE)/build/rules/lib diff --git a/Crypto_Win/dependencies b/Crypto_Win/dependencies deleted file mode 100644 index 2e8175e4e..000000000 --- a/Crypto_Win/dependencies +++ /dev/null @@ -1 +0,0 @@ -Foundation diff --git a/Crypto_Win/include/Poco/Crypto/Cipher.h b/Crypto_Win/include/Poco/Crypto/Cipher.h deleted file mode 100644 index 011049c38..000000000 --- a/Crypto_Win/include/Poco/Crypto/Cipher.h +++ /dev/null @@ -1,140 +0,0 @@ -// -// Cipher.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: Cipher -// -// Definition of the Cipher class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_Cipher_INCLUDED -#define Crypto_Cipher_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/RefCountedObject.h" -#include "Poco/AutoPtr.h" -#include -#include -#include - - -namespace Poco { -namespace Crypto { - - -class CryptoTransform; - - -class Crypto_Win_API Cipher: public Poco::RefCountedObject - /// Represents the abstract base class from which all implementations of - /// symmetric/assymetric encryption algorithms must inherit. Use the CipherFactory - /// class to obtain an instance of this class: - /// - /// CipherFactory& factory = CipherFactory::defaultFactory(); - /// // Creates a 256-bit AES cipher - /// Cipher* pCipher = factory.createCipher(CipherKey("aes-256")); - /// Cipher* pRSACipher = factory.createCipher(RSAKey(RSAKey::KL_1024, RSAKey::EXP_SMALL)); - /// - /// Check the different Key constructors on how to initialize/create - /// a key. The above example auto-generates random keys. - /// - /// Note that you won't be able to decrypt data encrypted with a random key - /// once the Cipher is destroyed unless you persist the generated key and IV. - /// An example usage for random keys is to encrypt data saved in a temporary - /// file. - /// - /// Once your key is set up, you can use the Cipher object to encrypt or - /// decrypt strings or, in conjunction with a CryptoInputStream or a - /// CryptoOutputStream, to encrypt streams of data. - /// - /// Since encrypted strings will contain arbitary binary data that will cause - /// problems in applications that are not binary-safe (eg., when sending - /// encrypted data in e-mails), the encryptString() and decryptString() can - /// encode (or decode, respectively) encrypted data using a "transport encoding". - /// Supported encodings are Base64 and BinHex. - /// - /// The following example encrypts and decrypts a string utilizing Base64 - /// encoding: - /// - /// std::string plainText = "This is my secret information"; - /// std::string encrypted = pCipher->encryptString(plainText, Cipher::ENC_BASE64); - /// std::string decrypted = pCipher->decryptString(encrypted, Cipher::ENC_BASE64); - /// - /// In order to encrypt a stream of data (eg. to encrypt files), you can use - /// a CryptoStream: - /// - /// // Create an output stream that will encrypt all data going through it - /// // and write pass it to the underlying file stream. - /// Poco::FileOutputStream sink("encrypted.dat"); - /// CryptoOutputStream encryptor(sink, pCipher->createEncryptor()); - /// - /// Poco::FileInputStream source("source.txt"); - /// Poco::StreamCopier::copyStream(source, encryptor); - /// - /// // Always close output streams to flush all internal buffers - /// encryptor.close(); - /// sink.close(); -{ -public: - typedef Poco::AutoPtr Ptr; - typedef std::vector ByteVec; - - enum Encoding - /// Transport encoding to use for encryptString() and decryptString(). - { - ENC_NONE = 0x00, /// Plain binary output - ENC_BASE64 = 0x01, /// Base64-encoded output - ENC_BINHEX = 0x02, /// BinHex-encoded output - ENC_BASE64_NO_LF = 0x81, /// Base64-encoded output, no linefeeds - ENC_BINHEX_NO_LF = 0x82, /// BinHex-encoded output, no linefeeds - - }; - - virtual ~Cipher(); - /// Destroys the Cipher. - - virtual const std::string& name() const = 0; - /// Returns the name of the Cipher. - - virtual CryptoTransform* createEncryptor() = 0; - /// Creates an encrytor object to be used with a CryptoStream. - - virtual CryptoTransform* createDecryptor() = 0; - /// Creates a decryptor object to be used with a CryptoStream. - - virtual std::string encryptString(const std::string& str, Encoding encoding = ENC_NONE); - /// Directly encrypt a string and encode it using the given encoding. - - virtual std::string decryptString(const std::string& str, Encoding encoding = ENC_NONE); - /// Directly decrypt a string that is encoded with the given encoding. - - virtual void encrypt(std::istream& source, std::ostream& sink, Encoding encoding = ENC_NONE); - /// Directly encrypts an input stream and encodes it using the given encoding. - - virtual void decrypt(std::istream& source, std::ostream& sink, Encoding encoding = ENC_NONE); - /// Directly decrypt an input stream that is encoded with the given encoding. - -protected: - Cipher(); - /// Creates a new Cipher object. - -private: - Cipher(const Cipher&); - Cipher& operator = (const Cipher&); -}; - - -} } // namespace Poco::Crypto - - -#endif // Crypto_Cipher_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/CipherFactory.h b/Crypto_Win/include/Poco/Crypto/CipherFactory.h deleted file mode 100644 index 2c474868a..000000000 --- a/Crypto_Win/include/Poco/Crypto/CipherFactory.h +++ /dev/null @@ -1,67 +0,0 @@ -// -// CipherFactory.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CipherFactory -// -// Definition of the CipherFactory class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_CipherFactory_INCLUDED -#define Crypto_CipherFactory_INCLUDED - - -#include "Poco/Crypto/Crypto.h" - - -namespace Poco { -namespace Crypto { - - -class Cipher; -class CipherKey; -class RSAKey; - - -class Crypto_Win_API CipherFactory - /// A factory for Cipher objects. - /// - /// See the Cipher class for examples on how to - /// use the CipherFactory. -{ -public: - CipherFactory(); - /// Creates a new CipherFactory object. - - virtual ~CipherFactory(); - /// Destroys the CipherFactory. - - Cipher* createCipher(const CipherKey& key); - /// Creates a Cipher object for the given CipherKey. - - Cipher* createCipher(const RSAKey& key, RSAPaddingMode paddingMode = RSA_PADDING_PKCS1); - /// Creates a RSACipher using the given RSA key and padding mode - /// for public key encryption/private key decryption. - - static CipherFactory& defaultFactory(); - /// Returns the default CipherFactory. - -private: - CipherFactory(const CipherFactory&); - CipherFactory& operator = (const CipherFactory&); -}; - - -} } // namespace Poco::Crypto - - -#endif // Crypto_CipherFactory_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/CipherImpl.h b/Crypto_Win/include/Poco/Crypto/CipherImpl.h deleted file mode 100644 index 1be7f3d3d..000000000 --- a/Crypto_Win/include/Poco/Crypto/CipherImpl.h +++ /dev/null @@ -1,68 +0,0 @@ -// -// CipherImpl.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CipherImpl -// -// Definition of the CipherImpl class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_CipherImpl_INCLUDED -#define Crypto_CipherImpl_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/Crypto/Cipher.h" -#include "Poco/Crypto/CipherKey.h" - - -namespace Poco { -namespace Crypto { - - -class CipherImpl: public Cipher - /// An implementation of the Cipher class for WinCrypt. -{ -public: - CipherImpl(const CipherKey& key); - /// Creates a new CipherImpl object for the given CipherKey. - - virtual ~CipherImpl(); - /// Destroys the CipherImpl. - - const std::string& name() const; - /// Returns the name of the cipher. - - CryptoTransform* createEncryptor(); - /// Creates an encryptor object. - - CryptoTransform* createDecryptor(); - /// Creates a decryptor object. - -private: - CipherKey _key; -}; - - -// -// Inlines -// -inline const std::string& CipherImpl::name() const -{ - return _key.name(); -} - - -} } // namespace Poco::Crypto - - -#endif // Crypto_CipherImpl_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/CipherKey.h b/Crypto_Win/include/Poco/Crypto/CipherKey.h deleted file mode 100644 index ab7bd5446..000000000 --- a/Crypto_Win/include/Poco/Crypto/CipherKey.h +++ /dev/null @@ -1,184 +0,0 @@ -// -// CipherKey.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CipherKey -// -// Definition of the CipherKey class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_CipherKey_INCLUDED -#define Crypto_CipherKey_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/Crypto/CipherKeyImpl.h" - - -namespace Poco { -namespace Crypto { - - -class Crypto_Win_API CipherKey - /// CipherKey stores the key information for decryption/encryption of data. - /// To create a random key, using the following code: - /// - /// CipherKey key("aes-256"); - /// - /// Note that you won't be able to decrypt data encrypted with a random key - /// once the Cipher is destroyed unless you persist the generated key and IV. - /// An example usage for random keys is to encrypt data saved in a temporary - /// file. - /// - /// To create a key using a human-readable password - /// string, use the following code. We create a AES Cipher and - /// use a salt value to make the key more robust: - /// - /// std::string password = "secret"; - /// std::string salt("asdff8723lasdf(**923412"); - /// CipherKey key("aes-256", password, salt); - /// -{ -public: - typedef CipherKeyImpl::Mode Mode; - typedef CipherKeyImpl::ByteVec ByteVec; - - enum - { - DEFAULT_ITERATION_COUNT = 2000 - /// Default iteration count to use with - /// generateKey(). RSA security recommends - /// an iteration count of at least 1000. - }; - - CipherKey(const std::string& name, - const std::string& passphrase, - const std::string& salt = "", - int iterationCount = DEFAULT_ITERATION_COUNT); - /// Creates a new CipherKeyImpl object using the given - /// cipher name, passphrase, salt value and iteration count. - - CipherKey(const std::string& name, - const ByteVec& key, - const ByteVec& iv); - /// Creates a new CipherKeyImpl object using the given cipher - /// name, key and initialization vector. - - CipherKey(const std::string& name); - /// Creates a new CipherKeyImpl object. Autoinitializes key and - /// initialization vector. - - ~CipherKey(); - /// Destroys the CipherKeyImpl. - - const std::string& name() const; - /// Returns the name of the Cipher. - - int keySize() const; - /// Returns the key size of the Cipher. - - int blockSize() const; - /// Returns the block size of the Cipher. - - int ivSize() const; - /// Returns the IV size of the Cipher. - - Mode mode() const; - /// Returns the Cipher's mode of operation. - - const ByteVec& getKey() const; - /// Returns the key for the Cipher. - - void setKey(const ByteVec& key); - /// Sets the key for the Cipher. - - const ByteVec& getIV() const; - /// Returns the initialization vector (IV) for the Cipher. - - void setIV(const ByteVec& iv); - /// Sets the initialization vector (IV) for the Cipher. - - CipherKeyImpl::Ptr impl(); - /// Returns the impl object - -private: - CipherKeyImpl::Ptr _pImpl; -}; - - -// -// inlines -// -inline const std::string& CipherKey::name() const -{ - return _pImpl->name(); -} - - -inline int CipherKey::keySize() const -{ - return _pImpl->keySize(); -} - - -inline int CipherKey::blockSize() const -{ - return _pImpl->blockSize(); -} - - -inline int CipherKey::ivSize() const -{ - return _pImpl->ivSize(); -} - - -inline CipherKey::Mode CipherKey::mode() const -{ - return _pImpl->mode(); -} - - -inline const CipherKey::ByteVec& CipherKey::getKey() const -{ - return _pImpl->getKey(); -} - - -inline void CipherKey::setKey(const CipherKey::ByteVec& key) -{ - _pImpl->setKey(key); -} - - -inline const CipherKey::ByteVec& CipherKey::getIV() const -{ - return _pImpl->getIV(); -} - - -inline void CipherKey::setIV(const CipherKey::ByteVec& iv) -{ - _pImpl->setIV(iv); -} - - -inline CipherKeyImpl::Ptr CipherKey::impl() -{ - return _pImpl; -} - - -} } // namespace Poco::Crypto - - -#endif // Crypto_CipherKey_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/CipherKeyImpl.h b/Crypto_Win/include/Poco/Crypto/CipherKeyImpl.h deleted file mode 100644 index c72735f00..000000000 --- a/Crypto_Win/include/Poco/Crypto/CipherKeyImpl.h +++ /dev/null @@ -1,174 +0,0 @@ -// -// CipherKeyImpl.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CipherKeyImpl -// -// Definition of the CipherKeyImpl class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_CipherKeyImpl_INCLUDED -#define Crypto_CipherKeyImpl_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/Crypto/ServiceProvider.h" -#include "Poco/RefCountedObject.h" -#include "Poco/AutoPtr.h" -#include -#include - - -namespace Poco { -namespace Crypto { - - -class CipherKeyImpl: public RefCountedObject - /// An implementation of the CipherKey class for WinCrypt. -{ -public: - typedef std::vector ByteVec; - typedef Poco::AutoPtr Ptr; - - enum Mode - /// Cipher mode of operation. This mode determines how multiple blocks - /// are connected; this is essential to improve security. - { - MODE_STREAM_CIPHER, /// Stream cipher - MODE_ECB, /// Electronic codebook (plain concatenation) - MODE_CBC, /// Cipher block chaining (default) - MODE_CFB, /// Cipher feedback - MODE_OFB /// Output feedback - }; - - CipherKeyImpl(const std::string& name, - const std::string& passphrase, - const std::string& salt, - int iterationCount); - /// Creates a new CipherKeyImpl object, using - /// the given cipher name, passphrase, salt value - /// and iteration count. - - CipherKeyImpl(const std::string& name, - const ByteVec& key, - const ByteVec& iv); - /// Creates a new CipherKeyImpl object, using the - /// given cipher name, key and initialization vector. - - CipherKeyImpl(const std::string& name); - /// Creates a new CipherKeyImpl object. Autoinitializes key - /// and initialization vector. - - virtual ~CipherKeyImpl(); - /// Destroys the CipherKeyImpl. - - const std::string& name() const; - /// Returns the name of the Cipher. - - int keySize() const; - /// Returns the key size of the Cipher. - - int blockSize() const; - /// Returns the block size of the Cipher. - - int ivSize() const; - /// Returns the IV size of the Cipher. - - Mode mode() const; - /// Returns the Cipher's mode of operation. - - const ByteVec& getKey() const; - /// Returns the key for the Cipher. - - void setKey(const ByteVec& key); - /// Sets the key for the Cipher. - - const ByteVec& getIV() const; - /// Returns the initialization vector (IV) for the Cipher. - - void setIV(const ByteVec& iv); - /// Sets the initialization vector (IV) for the Cipher. - -private: - void generateKey(const std::string& passphrase, - const std::string& salt, - int iterationCount); - /// Generates key and IV from a password and optional salt string. - - void generateKey(); - /// Generates key and IV from random data. - - void getRandomBytes(ByteVec& vec, std::size_t count); - /// Stores random bytes in vec. - - void importKey(); - /// Imports the key into WinCrypt. - - void importIV(); - /// Imports the IV into WinCrypt. - - static ALG_ID id(const std::string& name); - /// Returns the WinCrypt algorithm ID for the given name. - -private: - ServiceProvider _sp; - HCRYPTKEY _hKey; - std::string _name; - ALG_ID _id; - ByteVec _key; - ByteVec _iv; - - friend class CryptoTransformImpl; -}; - - -// -// Inlines -// -inline const std::string& CipherKeyImpl::name() const -{ - return _name; -} - - -inline const CipherKeyImpl::ByteVec& CipherKeyImpl::getKey() const -{ - return _key; -} - - -inline void CipherKeyImpl::setKey(const ByteVec& key) -{ - poco_assert(key.size() == static_cast(keySize())); - _key = key; - importKey(); -} - - -inline const CipherKeyImpl::ByteVec& CipherKeyImpl::getIV() const -{ - return _iv; -} - - -inline void CipherKeyImpl::setIV(const ByteVec& iv) -{ - poco_assert(iv.size() == static_cast(ivSize())); - _iv = iv; - importIV(); -} - - -} } // namespace Poco::Crypto - - -#endif // Crypto_CipherKeyImpl_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/Crypto.h b/Crypto_Win/include/Poco/Crypto/Crypto.h deleted file mode 100644 index 95d6292b7..000000000 --- a/Crypto_Win/include/Poco/Crypto/Crypto.h +++ /dev/null @@ -1,107 +0,0 @@ -// -// Crypto.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: CryptoCore -// Module: Crypto -// -// Basic definitions for the Poco Crypto library. -// This file must be the first file included by every other Crypto -// header file. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_Crypto_INCLUDED -#define Crypto_Crypto_INCLUDED - - -#include "Poco/Foundation.h" - - -enum RSAPaddingMode - /// The padding mode used for RSA public key encryption. -{ - RSA_PADDING_PKCS1, - /// PKCS #1 v1.5 padding. This currently is the most widely used mode. - - RSA_PADDING_PKCS1_OAEP, - /// EME-OAEP as defined in PKCS #1 v2.0 with SHA-1, MGF1 and an empty - /// encoding parameter. This mode is recommended for all new applications. - - RSA_PADDING_SSLV23, - /// PKCS #1 v1.5 padding with an SSL-specific modification that denotes - /// that the server is SSL3 capable. - - RSA_PADDING_NONE - /// Raw RSA encryption. This mode should only be used to implement cryptographically - /// sound padding modes in the application code. Encrypting user data directly with RSA - /// is insecure. -}; - - -// -// The following block is the standard way of creating macros which make exporting -// from a DLL simpler. All files within this DLL are compiled with the Crypto_EXPORTS -// symbol defined on the command line. this symbol should not be defined on any project -// that uses this DLL. This way any other project whose source files include this file see -// Crypto_API functions as being imported from a DLL, wheras this DLL sees symbols -// defined with this macro as being exported. -// -#if defined(_WIN32) && defined(POCO_DLL) - #if defined(Crypto_Win_EXPORTS) - #define Crypto_Win_API __declspec(dllexport) - #else - #define Crypto_Win_API __declspec(dllimport) - #endif -#endif - - -#if !defined(Crypto_Win_API) - #define Crypto_Win_API -#endif - - -// -// Automatically link Crypto library. -// -#if defined(_MSC_VER) - #if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(Crypto_Win_EXPORTS) - #pragma comment(lib, "PocoCryptoWin" POCO_LIB_SUFFIX) - #endif -#endif - - -namespace Poco { -namespace Crypto { - - -void Crypto_Win_API initializeCrypto(); - /// Initialize the Crypto library. - /// - /// Should be called before using any class from the Crypto library. - /// The Crypto library will be initialized automatically, through - /// OpenSSLInitializer instances held by various Crypto classes - /// (Cipher, CipherKey, RSAKey, X509Certificate). - /// However, it is recommended to call initializeCrypto() - /// in any case at application startup. - /// - /// Can be called multiple times; however, for every call to - /// initializeCrypto(), a matching call to uninitializeCrypto() - /// must be performed. - - -void Crypto_Win_API uninitializeCrypto(); - /// Uninitializes the Crypto library. - - -} } // namespace Poco::Crypto - - -#endif // Crypto_Crypto_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/CryptoStream.h b/Crypto_Win/include/Poco/Crypto/CryptoStream.h deleted file mode 100644 index 653e1f95a..000000000 --- a/Crypto_Win/include/Poco/Crypto/CryptoStream.h +++ /dev/null @@ -1,194 +0,0 @@ -// -// CryptoStream.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CryptoStream -// -// Definition of the CryptoStreamBuf, CryptoInputStream and CryptoOutputStream -// classes. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_CryptoStream_INCLUDED -#define Crypto_CryptoStream_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/BufferedStreamBuf.h" -#include "Poco/Buffer.h" -#include - - -namespace Poco { -namespace Crypto { - - -class CryptoTransform; -class Cipher; - - -class Crypto_Win_API CryptoStreamBuf: public Poco::BufferedStreamBuf - /// This stream buffer performs cryptographic transformation on the data - /// going through it. -{ -public: - CryptoStreamBuf(std::istream& istr, CryptoTransform* pTransform, std::streamsize bufferSize = 8192); - CryptoStreamBuf(std::ostream& ostr, CryptoTransform* pTransform, std::streamsize bufferSize = 8192); - - virtual ~CryptoStreamBuf(); - - void close(); - /// Flushes all buffers and finishes the encryption. - -protected: - int readFromDevice(char* buffer, std::streamsize length); - int writeToDevice(const char* buffer, std::streamsize length); - -private: - CryptoTransform* _pTransform; - std::istream* _pIstr; - std::ostream* _pOstr; - bool _eof; - - Poco::Buffer _buffer; - - CryptoStreamBuf(const CryptoStreamBuf&); - CryptoStreamBuf& operator = (const CryptoStreamBuf&); -}; - - -class Crypto_Win_API CryptoIOS: public virtual std::ios - /// The base class for CryptoInputStream and CryptoOutputStream. - /// - /// This class is needed to ensure correct initialization order of the - /// stream buffer and base classes. -{ -public: - CryptoIOS(std::istream& istr, CryptoTransform* pTransform, std::streamsize bufferSize = 8192); - CryptoIOS(std::ostream& ostr, CryptoTransform* pTransform, std::streamsize bufferSize = 8192); - ~CryptoIOS(); - CryptoStreamBuf* rdbuf(); - -protected: - CryptoStreamBuf _buf; -}; - - -class Crypto_Win_API CryptoInputStream: public CryptoIOS, public std::istream - /// This stream transforms all data passing through it using the given - /// CryptoTransform. - /// - /// Use a CryptoTransform object provided by Cipher::createEncrytor() or - /// Cipher::createDecryptor() to create an encrypting or decrypting stream, - /// respectively. -{ -public: - CryptoInputStream(std::istream& istr, CryptoTransform* pTransform, std::streamsize bufferSize = 8192); - /// Create a new CryptoInputStream object. The CryptoInputStream takes the - /// ownership of the given CryptoTransform object. - - CryptoInputStream(std::istream& istr, Cipher& cipher, std::streamsize bufferSize = 8192); - /// Create a new encrypting CryptoInputStream object using the given cipher. - - ~CryptoInputStream(); - /// Destroys the CryptoInputStream. -}; - - -class Crypto_Win_API CryptoOutputStream: public CryptoIOS, public std::ostream - /// This stream transforms all data passing through it using the given - /// CryptoTransform. - /// - /// Use a CryptoTransform object provided by Cipher::createEncrytor() or - /// Cipher::createDecryptor() to create an encrypting or decrypting stream, - /// respectively. - /// - /// After all data has been passed through the stream, close() must be called - /// to ensure completion of cryptographic transformation. -{ -public: - CryptoOutputStream(std::ostream& ostr, CryptoTransform* pTransform, std::streamsize bufferSize = 8192); - /// Create a new CryptoOutputStream object. The CryptoOutputStream takes the - /// ownership of the given CryptoTransform object. - - CryptoOutputStream(std::ostream& ostr, Cipher& cipher, std::streamsize bufferSize = 8192); - /// Create a new decrypting CryptoOutputStream object using the given cipher. - - ~CryptoOutputStream(); - /// Destroys the CryptoOutputStream. - - void close(); - /// Flushes all buffers and finishes the encryption. -}; - - -class Crypto_Win_API DecryptingInputStream: public CryptoIOS, public std::istream - /// This stream decrypts all data passing through it using the given - /// Cipher. -{ -public: - DecryptingInputStream(std::istream& istr, Cipher& cipher, std::streamsize bufferSize = 8192); - /// Create a new DecryptingInputStream object using the given cipher. - - ~DecryptingInputStream(); - /// Destroys the DecryptingInputStream. -}; - - -class Crypto_Win_API DecryptingOutputStream: public CryptoIOS, public std::ostream - /// This stream decrypts all data passing through it using the given - /// Cipher. -{ -public: - DecryptingOutputStream(std::ostream& ostr, Cipher& cipher, std::streamsize bufferSize = 8192); - /// Create a new DecryptingOutputStream object using the given cipher. - - ~DecryptingOutputStream(); - /// Destroys the DecryptingOutputStream. - - void close(); - /// Flushes all buffers and finishes the decryption. -}; - - -class Crypto_Win_API EncryptingInputStream: public CryptoIOS, public std::istream - /// This stream encrypts all data passing through it using the given - /// Cipher. -{ -public: - EncryptingInputStream(std::istream& istr, Cipher& cipher, std::streamsize bufferSize = 8192); - /// Create a new EncryptingInputStream object using the given cipher. - - ~EncryptingInputStream(); - /// Destroys the EncryptingInputStream. -}; - - -class Crypto_Win_API EncryptingOutputStream: public CryptoIOS, public std::ostream - /// This stream encrypts all data passing through it using the given - /// Cipher. -{ -public: - EncryptingOutputStream(std::ostream& ostr, Cipher& cipher, std::streamsize bufferSize = 8192); - /// Create a new EncryptingOutputStream object using the given cipher. - - ~EncryptingOutputStream(); - /// Destroys the EncryptingOutputStream. - - void close(); - /// Flushes all buffers and finishes the encryption. -}; - - -} } // namespace Poco::Crypto - - -#endif // Crypto_CryptoStream_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/CryptoTransform.h b/Crypto_Win/include/Poco/Crypto/CryptoTransform.h deleted file mode 100644 index 5172bcd14..000000000 --- a/Crypto_Win/include/Poco/Crypto/CryptoTransform.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// CryptoTransform.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CryptoTransform -// -// Definition of the CryptoTransform class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_CryptoTransform_INCLUDED -#define Crypto_CryptoTransform_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include - - -namespace Poco { -namespace Crypto { - - -class Crypto_Win_API CryptoTransform - /// This interface represents the basic operations for cryptographic - /// transformations to be used with a CryptoInputStream or a - /// CryptoOutputStream. - /// - /// Implementations of this class are returned by the Cipher class to - /// perform encryption or decryption of data. -{ -public: - CryptoTransform(); - /// Creates a new CryptoTransform object. - - virtual ~CryptoTransform(); - /// Destroys the CryptoTransform. - - virtual std::size_t blockSize() const = 0; - /// Returns the block size for this CryptoTransform. - - virtual int setPadding(int padding); - /// Enables or disables padding. By default encryption operations are padded using standard block - /// padding and the padding is checked and removed when decrypting. If the padding parameter is zero then - /// no padding is performed, the total amount of data encrypted or decrypted must then be a multiple of - /// the block size or an error will occur. - - virtual std::streamsize transform( - const unsigned char* input, - std::streamsize inputLength, - unsigned char* output, - std::streamsize outputLength) = 0; - /// Transforms a chunk of data. The inputLength is arbitrary and does not - /// need to be a multiple of the block size. The output buffer has a maximum - /// capacity of the given outputLength that must be at least - /// inputLength + blockSize() - /// Returns the number of bytes written to the output buffer. - - virtual std::streamsize finalize(unsigned char* output, std::streamsize length) = 0; - /// Finalizes the transformation. The output buffer must contain enough - /// space for at least two blocks, ie. - /// length >= 2*blockSize() - /// must be true. Returns the number of bytes written to the output - /// buffer. -}; - - -} } // namespace Poco::Crypto - - -#endif // Crypto_CryptoTransform_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/DigestEngine.h b/Crypto_Win/include/Poco/Crypto/DigestEngine.h deleted file mode 100644 index f612b64ba..000000000 --- a/Crypto_Win/include/Poco/Crypto/DigestEngine.h +++ /dev/null @@ -1,87 +0,0 @@ -// -// DigestEngine.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: Digest -// Module: DigestEngine -// -// Definition of the DigestEngine class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_DigestEngine_INCLUDED -#define Crypto_DigestEngine_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/Crypto/ServiceProvider.h" -#include "Poco/DigestEngine.h" - - -namespace Poco { -namespace Crypto { - - -class Crypto_Win_API DigestEngine: public Poco::DigestEngine - /// This class implements a Poco::DigestEngine for all - /// digest algorithms supported by Windows. -{ -public: - DigestEngine(const std::string& name); - /// Creates a DigestEngine using the digest with the given name - /// (e.g., "MD5", "SHA1", "SHA256", "SHA512", etc.). - /// Algorithm names are not case sensitive. - /// - /// The following digest algorithms are supported: - /// - MD2 - /// - MD4 - /// - MD5 - /// - SHA1 (SHA-1) - /// - SHA256 (SHA-256) - /// - SHA384 (SHA-384) - /// - SHA512 (SHA-512) - /// - /// Throws a Poco::NotFoundException if no algorithm with the given name exists. - - ~DigestEngine(); - /// Destroys the DigestEngine. - - const std::string& algorithm() const; - /// Returns the name of the digest algorithm. - - // DigestEngine - std::size_t digestLength() const; - void reset(); - const Poco::DigestEngine::Digest& digest(); - -protected: - void updateImpl(const void* data, std::size_t length); - -private: - ServiceProvider _sp; - std::string _name; - HCRYPTHASH _handle; - Poco::DigestEngine::Digest _digest; -}; - - -// -// inlines -// -inline const std::string& DigestEngine::algorithm() const -{ - return _name; -} - - -} } // namespace Poco::Crypto - - -#endif // Crypto_DigestEngine_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/RSACipherImpl.h b/Crypto_Win/include/Poco/Crypto/RSACipherImpl.h deleted file mode 100644 index 67cd912ad..000000000 --- a/Crypto_Win/include/Poco/Crypto/RSACipherImpl.h +++ /dev/null @@ -1,75 +0,0 @@ -// -// RSACipherImpl.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: RSA -// Module: RSACipherImpl -// -// Definition of the RSACipherImpl class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_RSACipherImpl_INCLUDED -#define Crypto_RSACipherImpl_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/Crypto/Cipher.h" -#include "Poco/Crypto/RSAKey.h" - - -namespace Poco { -namespace Crypto { - - -class RSACipherImpl: public Cipher - /// An implementation of the Cipher class for - /// asymmetric (public-private key) encryption - /// based on the the RSA algorithm. - /// - /// Encryption is using the public key, decryption - /// requires the private key. -{ -public: - RSACipherImpl(const RSAKey& key, RSAPaddingMode paddingMode); - /// Creates a new RSACipherImpl object for the given RSAKey - /// and using the given padding mode. - - virtual ~RSACipherImpl(); - /// Destroys the RSACipherImpl. - - const std::string& name() const; - /// Returns the name of the Cipher. - - CryptoTransform* createEncryptor(); - /// Creates an CryptoTransform object for encryption. - - CryptoTransform* createDecryptor(); - /// Creates a CryptoTransform object for decryption. - -private: - RSAKey _key; - RSAPaddingMode _paddingMode; -}; - - -// -// Inlines -// -inline const std::string& RSACipherImpl::name() const -{ - return _key.name(); -} - - -} } // namespace Poco::Crypto - - -#endif // Crypto_RSACipherImpl_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/RSADigestEngine.h b/Crypto_Win/include/Poco/Crypto/RSADigestEngine.h deleted file mode 100644 index 94779639a..000000000 --- a/Crypto_Win/include/Poco/Crypto/RSADigestEngine.h +++ /dev/null @@ -1,107 +0,0 @@ -// -// RSADigestEngine.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: RSA -// Module: RSADigestEngine -// -// Definition of the RSADigestEngine class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_RSADigestEngine_INCLUDED -#define Crypto_RSADigestEngine_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/Crypto/RSAKey.h" -#include "Poco/DigestEngine.h" -#include "Poco/MD5Engine.h" -#include "Poco/SHA1Engine.h" -#include -#include - - -namespace Poco { -namespace Crypto { - - -class Crypto_Win_API RSADigestEngine: public Poco::DigestEngine - /// This class implements a Poco::DigestEngine that can be - /// used to compute a secure digital signature. - /// - /// First another Poco::DigestEngine (Poco::MD5Engine - /// or Poco::SHA1Engine) is used to compute a cryptographic - /// hash of the data to be signed. Then, the hash value is - /// encrypted, using the RSA private key. - /// - /// To verify a signature, pass it to the verify() - /// member function. It will decrypt the signature - /// using the RSA public key and compare the resulting - /// hash with the actual hash of the data. -{ -public: - enum DigestType - { - DIGEST_MD5, - DIGEST_SHA1 - }; - - RSADigestEngine(const RSAKey& key, DigestType digestType = DIGEST_SHA1); - /// Creates the RSADigestEngine with the given RSA key, - /// using the SHA-1 hash algorithm. - - ~RSADigestEngine(); - /// Destroys the RSADigestEngine. - - std::size_t digestLength() const; - /// Returns the length of the digest in bytes. - - void reset(); - /// Resets the engine so that a new - /// digest can be computed. - - const DigestEngine::Digest& digest(); - /// Finishes the computation of the digest - /// (the first time it's called) and - /// returns the message digest. - /// - /// Can be called multiple times. - - const DigestEngine::Digest& signature(); - /// Signs the digest using the RSA algorithm - /// and the private key (teh first time it's - /// called) and returns the result. - /// - /// Can be called multiple times. - - bool verify(const DigestEngine::Digest& signature); - /// Verifies the data against the signature. - /// - /// Returns true if the signature can be verified, false otherwise. - -protected: - void updateImpl(const void* data, std::size_t length); - -private: - RSAKey _key; - Poco::DigestEngine& _engine; - LPSTR _type; - Poco::DigestEngine::Digest _digest; - Poco::DigestEngine::Digest _signature; - Poco::MD5Engine _md5Engine; - Poco::SHA1Engine _sha1Engine; -}; - - -} } // namespace Poco::Crypto - - -#endif // Crypto_RSADigestEngine_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/RSAKey.h b/Crypto_Win/include/Poco/Crypto/RSAKey.h deleted file mode 100644 index c2d16fa1f..000000000 --- a/Crypto_Win/include/Poco/Crypto/RSAKey.h +++ /dev/null @@ -1,118 +0,0 @@ -// -// RSAKey.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: RSA -// Module: RSAKey -// -// Definition of the RSAKey class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_RSAKey_INCLUDED -#define Crypto_RSAKey_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/Crypto/RSAKeyImpl.h" - - -namespace Poco { -namespace Crypto { - - -class X509Certificate; - - -class Crypto_Win_API RSAKey - /// This class stores an RSA key pair, consisting - /// of private and public key. Storage of the private - /// key is optional. - /// - /// If a private key is available, the RSAKey can be - /// used for decrypting data (encrypted with the public key) - /// or computing secure digital signatures. -{ -public: - enum KeyLength - { - KL_512 = 512, - KL_1024 = 1024, - KL_2048 = 2048, - KL_4096 = 4096 - }; - - enum Exponent - { - EXP_SMALL = 0, - EXP_LARGE - }; - - explicit RSAKey(const X509Certificate& cert); - /// Extracts the RSA public key from the given certificate. - - RSAKey(KeyLength keyLength, Exponent exp); - /// Creates the RSAKey. Creates a new public/private key pair using the given parameters. - /// Can be used to sign data and verify signatures. - /// - /// The Exponent parameter will be ignored and is provided for API compatibility with the - /// OpenSSL implementation only. - - RSAKey(const std::string& publicKeyFile, const std::string& privateKeyFile = "", const std::string& privateKeyPassphrase = ""); - /// Creates the RSAKey, by reading public and private key from the given files and - /// using the given passphrase for the private key. Can only by used for signing if - /// a private key is available. - - RSAKey(std::istream* pPublicKeyStream, std::istream* pPrivateKeyStream = 0, const std::string& privateKeyPassphrase = ""); - /// Creates the RSAKey. Can only by used for signing if pPrivateKeyStream - /// is not null. - - ~RSAKey(); - /// Destroys the RSAKey. - - int size() const; - /// Returns the RSA modulus size. - - void save(const std::string& publicKeyFile, const std::string& privateKeyFile = "", const std::string& privateKeyPassphrase = ""); - /// Exports the public and private keys to the given files. - /// - /// If an empty filename is specified, the corresponding key - /// is not exported. - - void save(std::ostream* pPublicKeyStream, std::ostream* pPrivateKeyStream = 0, const std::string& privateKeyPassphrase = ""); - /// Exports the public and private key to the given streams. - /// - /// If a null pointer is passed for a stream, the corresponding - /// key is not exported. - - RSAKeyImpl::Ptr impl() const; - /// Returns the impl object. - - const std::string& name() const; - /// Returns "rsa" - -private: - RSAKeyImpl::Ptr _pImpl; -}; - - -// -// inlines -// -inline RSAKeyImpl::Ptr RSAKey::impl() const -{ - return _pImpl; -} - - -} } // namespace Poco::Crypto - - -#endif // Crypto_RSAKey_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/RSAKeyImpl.h b/Crypto_Win/include/Poco/Crypto/RSAKeyImpl.h deleted file mode 100644 index b012b1ba6..000000000 --- a/Crypto_Win/include/Poco/Crypto/RSAKeyImpl.h +++ /dev/null @@ -1,134 +0,0 @@ -// -// RSAKeyImpl.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: RSA -// Module: RSAKeyImpl -// -// Definition of the RSAKeyImpl class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_RSAKeyImpl_INCLUDED -#define Crypto_RSAKeyImpl_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/Crypto/ServiceProvider.h" -#include "Poco/RefCountedObject.h" -#include "Poco/AutoPtr.h" -#include -#include -#include - -/* -struct bignum_st; -struct rsa_st; -typedef struct bignum_st BIGNUM; -typedef struct rsa_st RSA; -*/ - -namespace Poco { -namespace Crypto { - - -class X509Certificate; - - -class RSAKeyImpl: public Poco::RefCountedObject - /// class RSAKeyImpl -{ -public: - typedef Poco::AutoPtr Ptr; - - explicit RSAKeyImpl(const X509Certificate& cert); - /// Extracts the RSA public key from the given certificate. - - RSAKeyImpl(int keyLength, unsigned long exponent); - /// Creates the RSAKey. Creates a new public/private keypair using the given parameters. - /// Can be used to sign data and verify signatures. - - RSAKeyImpl(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase); - /// Creates the RSAKey, by reading public and private key from the given files and - /// using the given passphrase for the private key. Can only by used for signing if - /// a private key is available. - - RSAKeyImpl(std::istream* pPublicKeyStream, std::istream* pPrivateKeyStream, const std::string& privateKeyPassphrase); - /// Creates the RSAKey. Can only by used for signing if pPrivKey - /// is not null. If a private key file is specified, you don't need to - /// specify a public key file. OpenSSL will auto-create it from the private key. - - ~RSAKeyImpl(); - /// Destroys the RSAKeyImpl. - - int size() const; - /// Returns the RSA modulus size. - - void save(const std::string& publicKeyFile, const std::string& privateKeyFile = "", const std::string& privateKeyPassphrase = ""); - /// Exports the public and private keys to the given files. - /// - /// If an empty filename is specified, the corresponding key - /// is not exported. - - void save(std::ostream* pPublicKeyStream, std::ostream* pPrivateKeyStream = 0, const std::string& privateKeyPassphrase = ""); - /// Exports the public and private key to the given streams. - /// - /// If a null pointer is passed for a stream, the corresponding - /// key is not exported. - - HCRYPTKEY privateKey() const; - /// Returns the underlying Windows-specific handle for the private key. - - HCRYPTKEY publicKey() const; - /// Returns the underlying Windows-specific handle for the public key. - -protected: - const ServiceProvider& serviceProvider() const; - - void loadPrivateKey(std::istream& istr); - void loadPublicKey(std::istream& istr); - void savePrivateKey(std::ostream& ostr); - void savePublicKey(std::ostream& ostr); - -private: - ServiceProvider _sp; - HCRYPTKEY _hPrivateKey; - HCRYPTKEY _hPublicKey; - - friend class RSACipherImpl; -}; - - -// -// inlines -// - -inline const ServiceProvider& RSAKeyImpl::serviceProvider() const -{ - return _sp; -} - - -inline HCRYPTKEY RSAKeyImpl::privateKey() const -{ - return _hPrivateKey; -} - - -inline HCRYPTKEY RSAKeyImpl::publicKey() const -{ - return _hPublicKey; -} - - -} } // namespace Poco::Crypto - - -#endif // Crypto_RSAKeyImpl_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/ServiceProvider.h b/Crypto_Win/include/Poco/Crypto/ServiceProvider.h deleted file mode 100644 index 4bfc89676..000000000 --- a/Crypto_Win/include/Poco/Crypto/ServiceProvider.h +++ /dev/null @@ -1,71 +0,0 @@ -// -// ServiceProvider.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: CryptoCore -// Module: ServiceProvider -// -// Definition of the ServiceProvider class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_ServiceProvider_INCLUDED -#define Crypto_ServiceProvider_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/Mutex.h" -#include - - -namespace Poco { -namespace Crypto { - - -class Crypto_Win_API ServiceProvider - /// This class encapsulates a Windows Cryptographic Service Provider handle. -{ -public: - ServiceProvider(); - /// Creates the ServiceProvider and acquires a - /// Windows Cryptographic Service Provider. - /// - /// Currently, this class always uses the - /// Microsoft AES Cryptographic Provider - /// with the PROV_RSA_AES provider type. - - ~ServiceProvider(); - /// Destroys the ServiceProvider. - - HCRYPTPROV handle() const; - /// Returns the underlying handle. - -protected: - HCRYPTPROV _handle; - -private: - ServiceProvider(const ServiceProvider&); - ServiceProvider& operator = (const ServiceProvider&); -}; - - -// -// inlines -// -inline HCRYPTPROV ServiceProvider::handle() const -{ - return _handle; -} - - -} } // namespace Poco::Crypto - - -#endif // Crypto_ServiceProvider_INCLUDED diff --git a/Crypto_Win/include/Poco/Crypto/X509Certificate.h b/Crypto_Win/include/Poco/Crypto/X509Certificate.h deleted file mode 100644 index ce1d941fd..000000000 --- a/Crypto_Win/include/Poco/Crypto/X509Certificate.h +++ /dev/null @@ -1,177 +0,0 @@ -// -// X509Certificate.h -// -// $Id$ -// -// Library: Crypto_Win -// Package: Certificate -// Module: X509Certificate -// -// Definition of the X509Certificate class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Crypto_X509Certificate_INCLUDED -#define Crypto_X509Certificate_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "Poco/DateTime.h" -#include -#include -#include - - -namespace Poco { -namespace Crypto { - - -class Crypto_Win_API X509Certificate - /// This class represents a X509 Certificate. -{ -public: - enum NID - /// Name identifier for extracting information from - /// a certificate subject's or issuer's distinguished name. - { - NID_COMMON_NAME, - NID_COUNTRY, - NID_LOCALITY_NAME, - NID_STATE_OR_PROVINCE, - NID_ORGANIZATION_NAME, - NID_ORGANIZATION_UNIT_NAME - }; - - explicit X509Certificate(const std::string& certPath); - /// Creates the X509Certificate object by reading - /// a certificate in PEM or DER format from a file. - - explicit X509Certificate(std::istream& istr); - /// Creates the X509Certificate object by reading - /// a certificate in PEM or DER format from a stream. - - X509Certificate(const std::string& certName, const std::string& certStoreName, bool useMachineStore = false); - /// Creates the X509Certificate object by loading - /// a certificate from the specified certificate store. - /// - /// If useSystemStore is true, the machine's certificate store is used, - /// otherwise the user's certificate store. - - explicit X509Certificate(PCCERT_CONTEXT pCert); - /// Creates the X509Certificate from an existing - /// WinCrypt certificate. Ownership is taken of - /// the certificate. - - X509Certificate(PCCERT_CONTEXT pCert, bool shared); - /// Creates the X509Certificate from an existing - /// WinCrypt certificate. Ownership is taken of - /// the certificate. If shared is true, the - /// certificate's reference count is incremented. - - X509Certificate(const X509Certificate& cert); - /// Creates the certificate by copying another one. - - X509Certificate& operator = (const X509Certificate& cert); - /// Assigns a certificate. - - void swap(X509Certificate& cert); - /// Exchanges the certificate with another one. - - ~X509Certificate(); - /// Destroys the X509Certificate. - - const std::string& issuerName() const; - /// Returns the certificate issuer's distinguished name. - - std::string issuerName(NID nid) const; - /// Extracts the information specified by the given - /// NID (name identifier) from the certificate issuer's - /// distinguished name. - - const std::string& subjectName() const; - /// Returns the certificate subject's distinguished name. - - std::string subjectName(NID nid) const; - /// Extracts the information specified by the given - /// NID (name identifier) from the certificate subject's - /// distinguished name. - - std::string commonName() const; - /// Returns the common name stored in the certificate - /// subject's distinguished name. - - void extractNames(std::string& commonName, std::set& domainNames) const; - /// Extracts the common name and the alias domain names from the - /// certificate. - - Poco::DateTime validFrom() const; - /// Returns the date and time the certificate is valid from. - - Poco::DateTime expiresOn() const; - /// Returns the date and time the certificate expires. - - bool issuedBy(const X509Certificate& issuerCertificate) const; - /// Checks whether the certificate has been issued by - /// the issuer given by issuerCertificate. This can be - /// used to validate a certificate chain. - /// - /// Verifies that the given certificate is contained in the - /// certificate's issuer certificate chain. - /// - /// Returns true if verification against the issuer certificate - /// was successful, false otherwise. - - const PCCERT_CONTEXT system() const; - /// Returns the underlying WinCrypt certificate. - -protected: - void init(); - /// Extracts issuer and subject name from the certificate. - - static void* nid2oid(NID nid); - /// Returns the OID for the given NID. - - void loadCertificate(const std::string& certName, const std::string& certStoreName, bool useMachineStore); - void importCertificate(const std::string& certPath); - void importCertificate(std::istream& istr); - void importCertificate(const char* pBuffer, std::size_t size); - void importPEMCertificate(const char* pBuffer, std::size_t size); - void importDERCertificate(const char* pBuffer, std::size_t size); - -private: - std::string _issuerName; - std::string _subjectName; - PCCERT_CONTEXT _pCert; -}; - - -// -// inlines -// -inline const std::string& X509Certificate::issuerName() const -{ - return _issuerName; -} - - -inline const std::string& X509Certificate::subjectName() const -{ - return _subjectName; -} - - -inline const PCCERT_CONTEXT X509Certificate::system() const -{ - return _pCert; -} - - -} } // namespace Poco::Crypto - - -#endif // Crypto_X509Certificate_INCLUDED diff --git a/Crypto_Win/samples/Makefile b/Crypto_Win/samples/Makefile deleted file mode 100644 index b860b589c..000000000 --- a/Crypto_Win/samples/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# -# Makefile -# -# $Id: //poco/Main/Util/samples/Makefile#3 $ -# -# Makefile for Poco Util Samples -# - -.PHONY: projects -clean all: projects -projects: - $(MAKE) -C genrsakey $(MAKECMDGOALS) diff --git a/Crypto_Win/samples/dependencies b/Crypto_Win/samples/dependencies deleted file mode 100644 index 39b39bdad..000000000 --- a/Crypto_Win/samples/dependencies +++ /dev/null @@ -1,2 +0,0 @@ -Foundation -Util diff --git a/Crypto_Win/samples/genrsakey/Makefile b/Crypto_Win/samples/genrsakey/Makefile deleted file mode 100644 index 94a06687d..000000000 --- a/Crypto_Win/samples/genrsakey/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# -# Makefile -# -# $Id: //poco/Main/template/sample.make#4 $ -# -# Makefile for Poco genrsakey -# - -include $(POCO_BASE)/build/rules/global - -SYSLIBS += -lssl -lcrypto -lz -ldl - -objects = genrsakey - -target = genrsakey -target_version = 1 -target_libs = PocoCrypto PocoUtil PocoXML PocoFoundation - -include $(POCO_BASE)/build/rules/exec diff --git a/Crypto_Win/samples/genrsakey/genrsakey.progen b/Crypto_Win/samples/genrsakey/genrsakey.progen deleted file mode 100644 index 4e0f53883..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey.progen +++ /dev/null @@ -1,18 +0,0 @@ -vc.project.guid = ${vc.project.guidFromName} -vc.project.name = ${vc.project.baseName} -vc.project.target = ${vc.project.name} -vc.project.type = executable -vc.project.pocobase = ..\\..\\.. -vc.project.platforms = Win32, x64, WinCE -vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md -vc.project.prototype = ${vc.project.name}_vs90.vcproj -vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Crypto\\include -vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib -vc.project.linker.dependencies.x64 = ws2_32.lib iphlpapi.lib -vc.project.linker.dependencies.WinCE = ws2.lib iphlpapi.lib -vc.project.linker.dependencies.debug_shared = libeay32.lib ssleay32.lib -vc.project.linker.dependencies.release_shared = libeay32.lib ssleay32.lib -vc.project.linker.dependencies.debug_static_md = libeay32mdd.lib ssleay32mdd.lib Crypt32.lib -vc.project.linker.dependencies.release_static_md = libeay32md.lib ssleay32md.lib Crypt32.lib -vc.project.linker.dependencies.debug_static_mt = libeay32mtd.lib ssleay32mtd.lib Crypt32.lib -vc.project.linker.dependencies.release_static_mt = libeay32mt.lib ssleay32mt.lib Crypt32.lib diff --git a/Crypto_Win/samples/genrsakey/genrsakey_CE_VS90.vcproj b/Crypto_Win/samples/genrsakey/genrsakey_CE_VS90.vcproj deleted file mode 100644 index e9e85a021..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_CE_VS90.vcproj +++ /dev/null @@ -1,474 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_VS71.vcproj b/Crypto_Win/samples/genrsakey/genrsakey_VS71.vcproj deleted file mode 100644 index 44042c723..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_VS71.vcproj +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_VS80.vcproj b/Crypto_Win/samples/genrsakey/genrsakey_VS80.vcproj deleted file mode 100644 index e8b7dcc01..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_VS80.vcproj +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_VS90.vcproj b/Crypto_Win/samples/genrsakey/genrsakey_VS90.vcproj deleted file mode 100644 index d5329e9df..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_VS90.vcproj +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs110.vcxproj b/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs110.vcxproj deleted file mode 100644 index b99df2ef0..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs110.vcxproj +++ /dev/null @@ -1,296 +0,0 @@ - - - - - debug_shared - SDK_AM335X_SK_WEC2013_V300 - - - debug_static_md - SDK_AM335X_SK_WEC2013_V300 - - - debug_static_mt - SDK_AM335X_SK_WEC2013_V300 - - - release_shared - SDK_AM335X_SK_WEC2013_V300 - - - release_static_md - SDK_AM335X_SK_WEC2013_V300 - - - release_static_mt - SDK_AM335X_SK_WEC2013_V300 - - - - genrsakey - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947} - en-US - 11.0 - true - SDK_AM335X_SK_WEC2013_V300 - CE800 - - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.61030.0 - genrsakeyd - genrsakeyd - genrsakeyd - genrsakey - genrsakey - genrsakey - - - bin\$(Platform)\shared\ - obj\genrsakey\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\shared\ - obj\genrsakey\$(Platform)\$(Configuration)\ - false - - - bin\$(Platform)\static_mt\ - obj\genrsakey\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\static_mt\ - obj\genrsakey\$(Platform)\$(Configuration)\ - false - - - bin\$(Platform)\static_md\ - obj\genrsakey\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\static_md\ - obj\genrsakey\$(Platform)\$(Configuration)\ - false - - - - Disabled - ..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - _DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - - Level3 - ProgramDatabase - Default - - - libeay32.lib;ssleay32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\shared\genrsakeyd.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\shared\genrsakeyd.pdb - mainCRTStartup - WindowsCE - - - - - MaxSpeed - true - Speed - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - NDEBUG;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - Level3 - ProgramDatabase - - - libeay32.lib;ssleay32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\shared\genrsakey.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - mainCRTStartup - WindowsCE - - - - - Disabled - ..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - _DEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebug - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\static_mt\genrsakeyd.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\static_mt\genrsakeyd.pdb - mainCRTStartup - WindowsCE - - - - - MaxSpeed - Default - true - Speed - ..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreaded - false - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\static_mt\genrsakey.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - mainCRTStartup - WindowsCE - - - - - Disabled - ..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - _DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\static_md\genrsakeyd.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\static_md\genrsakeyd.pdb - mainCRTStartup - WindowsCE - - - - - MaxSpeed - Default - true - Speed - ..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\static_md\genrsakey.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - mainCRTStartup - WindowsCE - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs110.vcxproj.filters b/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs110.vcxproj.filters deleted file mode 100644 index f4afce13d..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs110.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {7802e9ca-9ee3-418d-bf83-6e80de1956a8} - - - {241e4c10-aab4-499d-a82e-5eac9c6969bf} - - - - - Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs120.vcxproj b/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs120.vcxproj deleted file mode 100644 index bcc1f7933..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs120.vcxproj +++ /dev/null @@ -1,296 +0,0 @@ - - - - - debug_shared - SDK_AM335X_SK_WEC2013_V310 - - - debug_static_md - SDK_AM335X_SK_WEC2013_V310 - - - debug_static_mt - SDK_AM335X_SK_WEC2013_V310 - - - release_shared - SDK_AM335X_SK_WEC2013_V310 - - - release_static_md - SDK_AM335X_SK_WEC2013_V310 - - - release_static_mt - SDK_AM335X_SK_WEC2013_V310 - - - - genrsakey - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947} - en-US - 11.0 - true - SDK_AM335X_SK_WEC2013_V310 - CE800 - - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - genrsakeyd - genrsakeyd - genrsakeyd - genrsakey - genrsakey - genrsakey - - - bin\$(Platform)\shared\ - obj\genrsakey\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\shared\ - obj\genrsakey\$(Platform)\$(Configuration)\ - false - - - bin\$(Platform)\static_mt\ - obj\genrsakey\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\static_mt\ - obj\genrsakey\$(Platform)\$(Configuration)\ - false - - - bin\$(Platform)\static_md\ - obj\genrsakey\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\static_md\ - obj\genrsakey\$(Platform)\$(Configuration)\ - false - - - - Disabled - ..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - _DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - - Level3 - ProgramDatabase - Default - - - libeay32.lib;ssleay32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\shared\genrsakeyd.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\shared\genrsakeyd.pdb - mainCRTStartup - WindowsCE - - - - - MaxSpeed - true - Speed - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - NDEBUG;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - Level3 - ProgramDatabase - - - libeay32.lib;ssleay32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\shared\genrsakey.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - mainCRTStartup - WindowsCE - - - - - Disabled - ..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - _DEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebug - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\static_mt\genrsakeyd.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\static_mt\genrsakeyd.pdb - mainCRTStartup - WindowsCE - - - - - MaxSpeed - Default - true - Speed - ..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreaded - false - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\static_mt\genrsakey.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - mainCRTStartup - WindowsCE - - - - - Disabled - ..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - _DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\static_md\genrsakeyd.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\static_md\genrsakeyd.pdb - mainCRTStartup - WindowsCE - - - - - MaxSpeed - Default - true - Speed - ..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;ws2.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\$(Platform)\static_md\genrsakey.exe - ..\..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - mainCRTStartup - WindowsCE - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs120.vcxproj.filters b/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs120.vcxproj.filters deleted file mode 100644 index b2ba93f70..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_WEC2013_vs120.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {01dad3d2-5e89-4a7b-a5a4-c26a92c6b0b0} - - - {5945a19c-0cae-490c-b428-40f75602fc88} - - - - - Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/samples/genrsakey/genrsakey_vs100.vcxproj b/Crypto_Win/samples/genrsakey/genrsakey_vs100.vcxproj deleted file mode 100644 index f8a88056b..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_vs100.vcxproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - debug_shared - Win32 - - - debug_static_md - Win32 - - - debug_static_mt - Win32 - - - release_shared - Win32 - - - release_static_md - Win32 - - - release_static_mt - Win32 - - - - genrsakey - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947} - genrsakey - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - bin\ - obj\genrsakey\$(Configuration)\ - true - bin\ - obj\genrsakey\$(Configuration)\ - false - bin\static_mt\ - obj\genrsakey\$(Configuration)\ - true - bin\static_mt\ - obj\genrsakey\$(Configuration)\ - false - bin\static_md\ - obj\genrsakey\$(Configuration)\ - true - bin\static_md\ - obj\genrsakey\$(Configuration)\ - false - genrsakeyd - genrsakeyd - genrsakeyd - genrsakey - genrsakey - genrsakey - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\genrsakeyd.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\genrsakeyd.pdb - Console - MachineX86 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\genrsakey.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - %(AdditionalOptions) - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - iphlpapi.lib;winmm.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_mt\genrsakeyd.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\static_mt\genrsakeyd.pdb - Console - MachineX86 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - iphlpapi.lib;winmm.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_mt\genrsakey.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - %(AdditionalOptions) - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - iphlpapi.lib;winmm.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_md\genrsakeyd.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\static_md\genrsakeyd.pdb - Console - MachineX86 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - iphlpapi.lib;winmm.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_md\genrsakey.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - %(AdditionalOptions) - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_vs100.vcxproj.filters b/Crypto_Win/samples/genrsakey/genrsakey_vs100.vcxproj.filters deleted file mode 100644 index 19a5bc6d8..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_vs100.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {7b7871d2-7ac2-45ba-b16f-ca29f638c89b} - - - {bb5388b5-422b-4fdc-99ea-fd8b190546c2} - - - - - Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/samples/genrsakey/genrsakey_vs110.vcxproj b/Crypto_Win/samples/genrsakey/genrsakey_vs110.vcxproj deleted file mode 100644 index f4bcbf952..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_vs110.vcxproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - debug_shared - Win32 - - - debug_static_md - Win32 - - - debug_static_mt - Win32 - - - release_shared - Win32 - - - release_static_md - Win32 - - - release_static_mt - Win32 - - - - genrsakey - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947} - genrsakey - Win32Proj - - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.61030.0 - genrsakeyd - genrsakeyd - genrsakeyd - genrsakey - genrsakey - genrsakey - - - bin\ - obj\genrsakey\$(Configuration)\ - true - - - bin\ - obj\genrsakey\$(Configuration)\ - false - - - bin\static_mt\ - obj\genrsakey\$(Configuration)\ - true - - - bin\static_mt\ - obj\genrsakey\$(Configuration)\ - false - - - bin\static_md\ - obj\genrsakey\$(Configuration)\ - true - - - bin\static_md\ - obj\genrsakey\$(Configuration)\ - false - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\genrsakeyd.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\genrsakeyd.pdb - Console - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\genrsakey.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;winmm.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_mt\genrsakeyd.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\static_mt\genrsakeyd.pdb - Console - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - iphlpapi.lib;winmm.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_mt\genrsakey.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;winmm.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_md\genrsakeyd.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\static_md\genrsakeyd.pdb - Console - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - iphlpapi.lib;winmm.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_md\genrsakey.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_vs110.vcxproj.filters b/Crypto_Win/samples/genrsakey/genrsakey_vs110.vcxproj.filters deleted file mode 100644 index 01802a77d..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_vs110.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {1271ad97-6dfe-49c3-bd05-727bdcf77976} - - - {8482b52b-340a-42ec-a24a-d355768c2fef} - - - - - Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/samples/genrsakey/genrsakey_vs120.vcxproj b/Crypto_Win/samples/genrsakey/genrsakey_vs120.vcxproj deleted file mode 100644 index 09acd6713..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_vs120.vcxproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - debug_shared - Win32 - - - debug_static_md - Win32 - - - debug_static_mt - Win32 - - - release_shared - Win32 - - - release_static_md - Win32 - - - release_static_mt - Win32 - - - - genrsakey - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947} - genrsakey - Win32Proj - - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - genrsakeyd - genrsakeyd - genrsakeyd - genrsakey - genrsakey - genrsakey - - - bin\ - obj\genrsakey\$(Configuration)\ - true - - - bin\ - obj\genrsakey\$(Configuration)\ - false - - - bin\static_mt\ - obj\genrsakey\$(Configuration)\ - true - - - bin\static_mt\ - obj\genrsakey\$(Configuration)\ - false - - - bin\static_md\ - obj\genrsakey\$(Configuration)\ - true - - - bin\static_md\ - obj\genrsakey\$(Configuration)\ - false - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\genrsakeyd.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\genrsakeyd.pdb - Console - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\genrsakey.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;winmm.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_mt\genrsakeyd.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\static_mt\genrsakeyd.pdb - Console - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - iphlpapi.lib;winmm.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_mt\genrsakey.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;winmm.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_md\genrsakeyd.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\static_md\genrsakeyd.pdb - Console - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - iphlpapi.lib;winmm.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin\static_md\genrsakey.exe - ..\..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_vs120.vcxproj.filters b/Crypto_Win/samples/genrsakey/genrsakey_vs120.vcxproj.filters deleted file mode 100644 index 9127ae21e..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_vs120.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {1fd105e1-78f1-4b84-b7e2-fb6538761f13} - - - {1d2163fd-86e8-4938-bfe7-f7146257af5d} - - - - - Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs100.vcxproj b/Crypto_Win/samples/genrsakey/genrsakey_x64_vs100.vcxproj deleted file mode 100644 index f281e09b3..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs100.vcxproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - debug_shared - x64 - - - debug_static_md - x64 - - - debug_static_mt - x64 - - - release_shared - x64 - - - release_static_md - x64 - - - release_static_mt - x64 - - - - genrsakey - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947} - genrsakey - Win32Proj - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - bin64\ - obj64\genrsakey\$(Configuration)\ - true - bin64\ - obj64\genrsakey\$(Configuration)\ - false - bin64\static_mt\ - obj64\genrsakey\$(Configuration)\ - true - bin64\static_mt\ - obj64\genrsakey\$(Configuration)\ - false - bin64\static_md\ - obj64\genrsakey\$(Configuration)\ - true - bin64\static_md\ - obj64\genrsakey\$(Configuration)\ - false - genrsakeyd - genrsakeyd - genrsakeyd - genrsakey - genrsakey - genrsakey - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\genrsakeyd.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\genrsakeyd.pdb - Console - MachineX64 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\genrsakey.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - %(AdditionalOptions) - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - iphlpapi.lib;winmm.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_mt\genrsakeyd.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\static_mt\genrsakeyd.pdb - Console - MachineX64 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - iphlpapi.lib;winmm.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_mt\genrsakey.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - %(AdditionalOptions) - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - iphlpapi.lib;winmm.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_md\genrsakeyd.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\static_md\genrsakeyd.pdb - Console - MachineX64 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - iphlpapi.lib;winmm.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_md\genrsakey.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - %(AdditionalOptions) - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs100.vcxproj.filters b/Crypto_Win/samples/genrsakey/genrsakey_x64_vs100.vcxproj.filters deleted file mode 100644 index b3edf2ac2..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs100.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {ad9ec987-f68b-4f5a-8360-47fba97424b2} - - - {6ae71d7a-4d84-41f6-8525-7523184ff8e5} - - - - - Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs110.vcxproj b/Crypto_Win/samples/genrsakey/genrsakey_x64_vs110.vcxproj deleted file mode 100644 index c7b5d1f4a..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs110.vcxproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - debug_shared - x64 - - - debug_static_md - x64 - - - debug_static_mt - x64 - - - release_shared - x64 - - - release_static_md - x64 - - - release_static_mt - x64 - - - - genrsakey - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947} - genrsakey - Win32Proj - - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - Application - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.61030.0 - genrsakeyd - genrsakeyd - genrsakeyd - genrsakey - genrsakey - genrsakey - - - bin64\ - obj64\genrsakey\$(Configuration)\ - true - - - bin64\ - obj64\genrsakey\$(Configuration)\ - false - - - bin64\static_mt\ - obj64\genrsakey\$(Configuration)\ - true - - - bin64\static_mt\ - obj64\genrsakey\$(Configuration)\ - false - - - bin64\static_md\ - obj64\genrsakey\$(Configuration)\ - true - - - bin64\static_md\ - obj64\genrsakey\$(Configuration)\ - false - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\genrsakeyd.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\genrsakeyd.pdb - Console - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\genrsakey.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;winmm.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_mt\genrsakeyd.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\static_mt\genrsakeyd.pdb - Console - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - iphlpapi.lib;winmm.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_mt\genrsakey.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;winmm.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_md\genrsakeyd.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\static_md\genrsakeyd.pdb - Console - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - iphlpapi.lib;winmm.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_md\genrsakey.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs110.vcxproj.filters b/Crypto_Win/samples/genrsakey/genrsakey_x64_vs110.vcxproj.filters deleted file mode 100644 index 2b2e0d506..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs110.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {6818d1bf-5226-43d3-93aa-b1e47a05e38c} - - - {2693cc05-7a6f-42ef-aaf7-1d26db305827} - - - - - Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs120.vcxproj b/Crypto_Win/samples/genrsakey/genrsakey_x64_vs120.vcxproj deleted file mode 100644 index c24796330..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs120.vcxproj +++ /dev/null @@ -1,311 +0,0 @@ - - - - - debug_shared - x64 - - - debug_static_md - x64 - - - debug_static_mt - x64 - - - release_shared - x64 - - - release_static_md - x64 - - - release_static_mt - x64 - - - - genrsakey - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947} - genrsakey - Win32Proj - - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - genrsakeyd - genrsakeyd - genrsakeyd - genrsakey - genrsakey - genrsakey - - - bin64\ - obj64\genrsakey\$(Configuration)\ - true - - - bin64\ - obj64\genrsakey\$(Configuration)\ - false - - - bin64\static_mt\ - obj64\genrsakey\$(Configuration)\ - true - - - bin64\static_mt\ - obj64\genrsakey\$(Configuration)\ - false - - - bin64\static_md\ - obj64\genrsakey\$(Configuration)\ - true - - - bin64\static_md\ - obj64\genrsakey\$(Configuration)\ - false - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\genrsakeyd.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\genrsakeyd.pdb - Console - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - libeay32.lib;ssleay32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\genrsakey.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;winmm.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_mt\genrsakeyd.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\static_mt\genrsakeyd.pdb - Console - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - iphlpapi.lib;winmm.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_mt\genrsakey.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - - - - - Disabled - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - iphlpapi.lib;winmm.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_md\genrsakeyd.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\static_md\genrsakeyd.pdb - Console - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Crypto\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - iphlpapi.lib;winmm.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - bin64\static_md\genrsakey.exe - ..\..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs120.vcxproj.filters b/Crypto_Win/samples/genrsakey/genrsakey_x64_vs120.vcxproj.filters deleted file mode 100644 index bc7b2cb72..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs120.vcxproj.filters +++ /dev/null @@ -1,16 +0,0 @@ - - - - - {66fd0748-fed7-4e97-9a73-72ea6ac19073} - - - {bf3cb9b5-418b-490b-8352-2795c64585a5} - - - - - Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs90.vcproj b/Crypto_Win/samples/genrsakey/genrsakey_x64_vs90.vcproj deleted file mode 100644 index fa1c417e7..000000000 --- a/Crypto_Win/samples/genrsakey/genrsakey_x64_vs90.vcproj +++ /dev/null @@ -1,447 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/samples/genrsakey/src/genrsakey.cpp b/Crypto_Win/samples/genrsakey/src/genrsakey.cpp deleted file mode 100644 index 35af7456c..000000000 --- a/Crypto_Win/samples/genrsakey/src/genrsakey.cpp +++ /dev/null @@ -1,218 +0,0 @@ -// -// genrsakey.cpp -// -// $Id: //poco/1.4/Crypto/samples/genrsakey/src/genrsakey.cpp#1 $ -// -// This sample demonstrates the XYZ class. -// -// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// Permission is hereby granted, free of charge, to any person or organization -// obtaining a copy of the software and accompanying documentation covered by -// this license (the "Software") to use, reproduce, display, distribute, -// execute, and transmit the Software, and to prepare derivative works of the -// Software, and to permit third-parties to whom the Software is furnished to -// do so, all subject to the following: -// -// The copyright notices in the Software and this entire statement, including -// the above license grant, this restriction and the following disclaimer, -// must be included in all copies of the Software, in whole or in part, and -// all derivative works of the Software, unless such copies or derivative -// works are solely in the form of machine-executable object code generated by -// a source language processor. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// - - -#include "Poco/Util/Application.h" -#include "Poco/Util/Option.h" -#include "Poco/Util/OptionException.h" -#include "Poco/Util/OptionSet.h" -#include "Poco/Util/HelpFormatter.h" -#include "Poco/Util/AbstractConfiguration.h" -#include "Poco/AutoPtr.h" -#include "Poco/NumberFormatter.h" -#include "Poco/NumberParser.h" -#include "Poco/String.h" -#include "Poco/Crypto/RSAKey.h" -#include - - -using Poco::Util::Application; -using Poco::Util::Option; -using Poco::Util::OptionSet; -using Poco::Util::HelpFormatter; -using Poco::Util::AbstractConfiguration; -using Poco::Util::OptionCallback; -using Poco::AutoPtr; -using Poco::NumberParser; -using Poco::Crypto::RSAKey; - - -class RSAApp: public Application - /// This sample demonstrates some of the features of the Util::Application class, - /// such as configuration file handling and command line arguments processing. - /// - /// Try genrsakey --help (on Unix platforms) or genrsakey /help (elsewhere) for - /// more information. -{ -public: - RSAApp(): - _helpRequested(false), - _length(RSAKey::KL_1024), - _exp(RSAKey::EXP_LARGE), - _name(), - _pwd() - { - Poco::Crypto::initializeCrypto(); - } - - ~RSAApp() - { - Poco::Crypto::uninitializeCrypto(); - } - -protected: - void initialize(Application& self) - { - loadConfiguration(); // load default configuration files, if present - Application::initialize(self); - } - - void uninitialize() - { - Application::uninitialize(); - } - - void reinitialize(Application& self) - { - Application::reinitialize(self); - } - - void defineOptions(OptionSet& options) - { - Application::defineOptions(options); - - options.addOption( - Option("help", "h", "display help information on command line arguments") - .required(false) - .repeatable(false) - .callback(OptionCallback(this, &RSAApp::handleHelp))); - - options.addOption( - Option("?", "?", "display help information on command line arguments") - .required(false) - .repeatable(false) - .callback(OptionCallback(this, &RSAApp::handleHelp))); - - options.addOption( - Option("key", "k", "define the key length") - .required(false) - .repeatable(false) - .argument("512|1024|2048|4096") - .callback(OptionCallback(this, &RSAApp::handleKeyLength))); - - options.addOption( - Option("exponent", "e", "defines the exponent of the key") - .required(false) - .repeatable(false) - .argument("small|large") - .callback(OptionCallback(this, &RSAApp::handleExponent))); - - options.addOption( - Option("file", "f", "defines the file base name. creates a file.pub and a file.priv") - .required(true) - .repeatable(false) - .argument("filebasename") - .callback(OptionCallback(this, &RSAApp::handleFilePrefix))); - - options.addOption( - Option("password", "p", "defines the password used to encrypt the private key file. If not defined user will be asked via stdin to provide in") - .required(false) - .repeatable(false) - .argument("pwd") - .callback(OptionCallback(this, &RSAApp::handlePassword))); - } - - void handleHelp(const std::string& name, const std::string& value) - { - _helpRequested = true; - displayHelp(); - stopOptionsProcessing(); - } - - void handleKeyLength(const std::string& name, const std::string& value) - { - int keyLen = Poco::NumberParser::parse(value); - if (keyLen == 512 || keyLen == 1024 || keyLen == 2048 || keyLen == 4096) - _length = (RSAKey::KeyLength)keyLen; - else - throw Poco::Util::IncompatibleOptionsException("Illegal key length value"); - } - - void handleExponent(const std::string& name, const std::string& value) - { - if (Poco::icompare(value, "small") == 0) - _exp = RSAKey::EXP_SMALL; - else - _exp = RSAKey::EXP_LARGE; - } - - void handleFilePrefix(const std::string& name, const std::string& value) - { - if (value.empty()) - throw Poco::Util::IncompatibleOptionsException("Empty file prefix forbidden"); - _name = value; - } - - void handlePassword(const std::string& name, const std::string& value) - { - _pwd = value; - } - - void displayHelp() - { - HelpFormatter helpFormatter(options()); - helpFormatter.setCommand(commandName()); - helpFormatter.setUsage("OPTIONS"); - helpFormatter.setHeader("Application for generating RSA public/private key pairs."); - helpFormatter.format(std::cout); - } - - int main(const std::vector& args) - { - if (!_helpRequested) - { - logger().information("Generating key with length " + Poco::NumberFormatter::format((int)_length)); - logger().information(std::string("Exponent is ") + ((_exp == RSAKey::EXP_SMALL)?"small":"large")); - logger().information("Generating key"); - RSAKey key(_length, _exp); - logger().information("Generating key: DONE"); - std::string pubFile(_name + ".pub"); - std::string privFile(_name + ".priv"); - - logger().information("Saving key to " + pubFile + " and " + privFile); - key.save(pubFile, privFile, _pwd); - logger().information("Key saved"); - } - return Application::EXIT_OK; - } - -private: - bool _helpRequested; - RSAKey::KeyLength _length; - RSAKey::Exponent _exp; - std::string _name; - std::string _pwd; -}; - - -POCO_APP_MAIN(RSAApp) diff --git a/Crypto_Win/samples/samples.progen b/Crypto_Win/samples/samples.progen deleted file mode 100644 index be1c4389d..000000000 --- a/Crypto_Win/samples/samples.progen +++ /dev/null @@ -1,4 +0,0 @@ -vc.project.platforms = Win32, x64, WinCE -vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md -vc.solution.create = true -vc.solution.include = genrsakey\\genrsakey diff --git a/Crypto_Win/samples/samples_CE_VS90.sln b/Crypto_Win/samples/samples_CE_VS90.sln deleted file mode 100644 index e5286660f..000000000 --- a/Crypto_Win/samples/samples_CE_VS90.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_CE_vs90.vcproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Digi JumpStart (ARMV4I) = debug_shared|Digi JumpStart (ARMV4I) - release_shared|Digi JumpStart (ARMV4I) = release_shared|Digi JumpStart (ARMV4I) - debug_static_mt|Digi JumpStart (ARMV4I) = debug_static_mt|Digi JumpStart (ARMV4I) - release_static_mt|Digi JumpStart (ARMV4I) = release_static_mt|Digi JumpStart (ARMV4I) - debug_static_md|Digi JumpStart (ARMV4I) = debug_static_md|Digi JumpStart (ARMV4I) - release_static_md|Digi JumpStart (ARMV4I) = release_static_md|Digi JumpStart (ARMV4I) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Digi JumpStart (ARMV4I).ActiveCfg = debug_shared|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Digi JumpStart (ARMV4I).Build.0 = debug_shared|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Digi JumpStart (ARMV4I).Deploy.0 = debug_shared|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Digi JumpStart (ARMV4I).ActiveCfg = release_shared|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Digi JumpStart (ARMV4I).Build.0 = release_shared|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Digi JumpStart (ARMV4I).Deploy.0 = release_shared|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_mt|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Digi JumpStart (ARMV4I).Build.0 = debug_static_mt|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_mt|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = release_static_mt|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Digi JumpStart (ARMV4I).Build.0 = release_static_mt|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = release_static_mt|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_md|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Digi JumpStart (ARMV4I).Build.0 = debug_static_md|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_md|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Digi JumpStart (ARMV4I).ActiveCfg = release_static_md|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Digi JumpStart (ARMV4I).Build.0 = release_static_md|Digi JumpStart (ARMV4I) - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Digi JumpStart (ARMV4I).Deploy.0 = release_static_md|Digi JumpStart (ARMV4I) - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_VS71.sln b/Crypto_Win/samples/samples_VS71.sln deleted file mode 100644 index 33a89491d..000000000 --- a/Crypto_Win/samples/samples_VS71.sln +++ /dev/null @@ -1,33 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_vs71.vcproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - debug_shared = debug_shared - release_shared = release_shared - debug_static_mt = debug_static_mt - release_static_mt = release_static_mt - debug_static_md = debug_static_md - release_static_md = release_static_md - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared.ActiveCfg = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared.Build.0 = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared.ActiveCfg = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared.Build.0 = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt.ActiveCfg = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt.Build.0 = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt.ActiveCfg = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt.Build.0 = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md.ActiveCfg = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md.Build.0 = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md.ActiveCfg = release_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md.Build.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_VS80.sln b/Crypto_Win/samples/samples_VS80.sln deleted file mode 100644 index 2d38891e2..000000000 --- a/Crypto_Win/samples/samples_VS80.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_vs80.vcproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Win32 = debug_shared|Win32 - release_shared|Win32 = release_shared|Win32 - debug_static_mt|Win32 = debug_static_mt|Win32 - release_static_mt|Win32 = release_static_mt|Win32 - debug_static_md|Win32 = debug_static_md|Win32 - release_static_md|Win32 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Build.0 = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_VS90.sln b/Crypto_Win/samples/samples_VS90.sln deleted file mode 100644 index 7233c82bd..000000000 --- a/Crypto_Win/samples/samples_VS90.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_vs90.vcproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Win32 = debug_shared|Win32 - release_shared|Win32 = release_shared|Win32 - debug_static_mt|Win32 = debug_static_mt|Win32 - release_static_mt|Win32 = release_static_mt|Win32 - debug_static_md|Win32 = debug_static_md|Win32 - release_static_md|Win32 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Build.0 = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_WEC2013_vs110.sln b/Crypto_Win/samples/samples_WEC2013_vs110.sln deleted file mode 100644 index eec046ab7..000000000 --- a/Crypto_Win/samples/samples_WEC2013_vs110.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_WEC2013_vs110.vcxproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|SDK_AM335X_SK_WEC2013_V300 = debug_shared|SDK_AM335X_SK_WEC2013_V300 - release_shared|SDK_AM335X_SK_WEC2013_V300 = release_shared|SDK_AM335X_SK_WEC2013_V300 - debug_static_mt|SDK_AM335X_SK_WEC2013_V300 = debug_static_mt|SDK_AM335X_SK_WEC2013_V300 - release_static_mt|SDK_AM335X_SK_WEC2013_V300 = release_static_mt|SDK_AM335X_SK_WEC2013_V300 - debug_static_md|SDK_AM335X_SK_WEC2013_V300 = debug_static_md|SDK_AM335X_SK_WEC2013_V300 - release_static_md|SDK_AM335X_SK_WEC2013_V300 = release_static_md|SDK_AM335X_SK_WEC2013_V300 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = debug_shared|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|SDK_AM335X_SK_WEC2013_V300.Build.0 = debug_shared|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = debug_shared|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = release_shared|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|SDK_AM335X_SK_WEC2013_V300.Build.0 = release_shared|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = release_shared|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = debug_static_mt|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|SDK_AM335X_SK_WEC2013_V300.Build.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = release_static_mt|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|SDK_AM335X_SK_WEC2013_V300.Build.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = debug_static_md|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|SDK_AM335X_SK_WEC2013_V300.Build.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|SDK_AM335X_SK_WEC2013_V300.ActiveCfg = release_static_md|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|SDK_AM335X_SK_WEC2013_V300.Build.0 = release_static_md|SDK_AM335X_SK_WEC2013_V300 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|SDK_AM335X_SK_WEC2013_V300.Deploy.0 = release_static_md|SDK_AM335X_SK_WEC2013_V300 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_WEC2013_vs120.sln b/Crypto_Win/samples/samples_WEC2013_vs120.sln deleted file mode 100644 index 8d06d607f..000000000 --- a/Crypto_Win/samples/samples_WEC2013_vs120.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_WEC2013_vs120.vcxproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|SDK_AM335X_SK_WEC2013_V310 = debug_shared|SDK_AM335X_SK_WEC2013_V310 - release_shared|SDK_AM335X_SK_WEC2013_V310 = release_shared|SDK_AM335X_SK_WEC2013_V310 - debug_static_mt|SDK_AM335X_SK_WEC2013_V310 = debug_static_mt|SDK_AM335X_SK_WEC2013_V310 - release_static_mt|SDK_AM335X_SK_WEC2013_V310 = release_static_mt|SDK_AM335X_SK_WEC2013_V310 - debug_static_md|SDK_AM335X_SK_WEC2013_V310 = debug_static_md|SDK_AM335X_SK_WEC2013_V310 - release_static_md|SDK_AM335X_SK_WEC2013_V310 = release_static_md|SDK_AM335X_SK_WEC2013_V310 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = debug_shared|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|SDK_AM335X_SK_WEC2013_V310.Build.0 = debug_shared|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = debug_shared|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = release_shared|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|SDK_AM335X_SK_WEC2013_V310.Build.0 = release_shared|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = release_shared|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = debug_static_mt|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|SDK_AM335X_SK_WEC2013_V310.Build.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = debug_static_mt|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = release_static_mt|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|SDK_AM335X_SK_WEC2013_V310.Build.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = release_static_mt|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = debug_static_md|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|SDK_AM335X_SK_WEC2013_V310.Build.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = debug_static_md|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|SDK_AM335X_SK_WEC2013_V310.ActiveCfg = release_static_md|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|SDK_AM335X_SK_WEC2013_V310.Build.0 = release_static_md|SDK_AM335X_SK_WEC2013_V310 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|SDK_AM335X_SK_WEC2013_V310.Deploy.0 = release_static_md|SDK_AM335X_SK_WEC2013_V310 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_vs100.sln b/Crypto_Win/samples/samples_vs100.sln deleted file mode 100644 index f2a18f66f..000000000 --- a/Crypto_Win/samples/samples_vs100.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_vs100.vcxproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Win32 = debug_shared|Win32 - release_shared|Win32 = release_shared|Win32 - debug_static_mt|Win32 = debug_static_mt|Win32 - release_static_mt|Win32 = release_static_mt|Win32 - debug_static_md|Win32 = debug_static_md|Win32 - release_static_md|Win32 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Build.0 = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_vs110.sln b/Crypto_Win/samples/samples_vs110.sln deleted file mode 100644 index 8b64f56ad..000000000 --- a/Crypto_Win/samples/samples_vs110.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_vs110.vcxproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Win32 = debug_shared|Win32 - release_shared|Win32 = release_shared|Win32 - debug_static_mt|Win32 = debug_static_mt|Win32 - release_static_mt|Win32 = release_static_mt|Win32 - debug_static_md|Win32 = debug_static_md|Win32 - release_static_md|Win32 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Build.0 = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_vs120.sln b/Crypto_Win/samples/samples_vs120.sln deleted file mode 100644 index 348805354..000000000 --- a/Crypto_Win/samples/samples_vs120.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_vs120.vcxproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|Win32 = debug_shared|Win32 - release_shared|Win32 = release_shared|Win32 - debug_static_mt|Win32 = debug_static_mt|Win32 - release_static_mt|Win32 = release_static_mt|Win32 - debug_static_md|Win32 = debug_static_md|Win32 - release_static_md|Win32 = release_static_md|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Build.0 = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_x64_vs100.sln b/Crypto_Win/samples/samples_x64_vs100.sln deleted file mode 100644 index 8fe3e1038..000000000 --- a/Crypto_Win/samples/samples_x64_vs100.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_x64_vs100.vcxproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|x64 = debug_shared|x64 - release_shared|x64 = release_shared|x64 - debug_static_mt|x64 = debug_static_mt|x64 - release_static_mt|x64 = release_static_mt|x64 - debug_static_md|x64 = debug_static_md|x64 - release_static_md|x64 = release_static_md|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.Build.0 = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.ActiveCfg = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.Build.0 = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.Deploy.0 = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.Build.0 = release_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.Deploy.0 = release_static_md|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_x64_vs110.sln b/Crypto_Win/samples/samples_x64_vs110.sln deleted file mode 100644 index b51c30964..000000000 --- a/Crypto_Win/samples/samples_x64_vs110.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_x64_vs110.vcxproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|x64 = debug_shared|x64 - release_shared|x64 = release_shared|x64 - debug_static_mt|x64 = debug_static_mt|x64 - release_static_mt|x64 = release_static_mt|x64 - debug_static_md|x64 = debug_static_md|x64 - release_static_md|x64 = release_static_md|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.Build.0 = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.ActiveCfg = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.Build.0 = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.Deploy.0 = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.Build.0 = release_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.Deploy.0 = release_static_md|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_x64_vs120.sln b/Crypto_Win/samples/samples_x64_vs120.sln deleted file mode 100644 index 9efedd3c5..000000000 --- a/Crypto_Win/samples/samples_x64_vs120.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_x64_vs120.vcxproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|x64 = debug_shared|x64 - release_shared|x64 = release_shared|x64 - debug_static_mt|x64 = debug_static_mt|x64 - release_static_mt|x64 = release_static_mt|x64 - debug_static_md|x64 = debug_static_md|x64 - release_static_md|x64 = release_static_md|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.Build.0 = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.ActiveCfg = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.Build.0 = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.Deploy.0 = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.Build.0 = release_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.Deploy.0 = release_static_md|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/samples/samples_x64_vs90.sln b/Crypto_Win/samples/samples_x64_vs90.sln deleted file mode 100644 index 503385804..000000000 --- a/Crypto_Win/samples/samples_x64_vs90.sln +++ /dev/null @@ -1,37 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrsakey", "genrsakey\genrsakey_x64_vs90.vcproj", "{D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - debug_shared|x64 = debug_shared|x64 - release_shared|x64 = release_shared|x64 - debug_static_mt|x64 = debug_static_mt|x64 - release_static_mt|x64 = release_static_mt|x64 - debug_static_md|x64 = debug_static_md|x64 - release_static_md|x64 = release_static_md|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.ActiveCfg = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.Build.0 = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_shared|x64.Deploy.0 = debug_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.ActiveCfg = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.Build.0 = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_shared|x64.Deploy.0 = release_shared|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.Build.0 = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.ActiveCfg = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.Build.0 = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_mt|x64.Deploy.0 = release_static_mt|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.ActiveCfg = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.Build.0 = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.debug_static_md|x64.Deploy.0 = debug_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.ActiveCfg = release_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.Build.0 = release_static_md|x64 - {D6BE1AD9-4CB6-3184-8DF8-5210AE7D6947}.release_static_md|x64.Deploy.0 = release_static_md|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Crypto_Win/src/Cipher.cpp b/Crypto_Win/src/Cipher.cpp deleted file mode 100644 index b1df60037..000000000 --- a/Crypto_Win/src/Cipher.cpp +++ /dev/null @@ -1,142 +0,0 @@ -// -// Cipher.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: Cipher -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/Cipher.h" -#include "Poco/Crypto/CryptoStream.h" -#include "Poco/Crypto/CryptoTransform.h" -#include "Poco/Base64Encoder.h" -#include "Poco/Base64Decoder.h" -#include "Poco/HexBinaryEncoder.h" -#include "Poco/HexBinaryDecoder.h" -#include "Poco/StreamCopier.h" -#include "Poco/Exception.h" -#include -#include - - -namespace Poco { -namespace Crypto { - - -Cipher::Cipher() -{ -} - - -Cipher::~Cipher() -{ -} - - -std::string Cipher::encryptString(const std::string& str, Encoding encoding) -{ - std::istringstream source(str); - std::ostringstream sink; - - encrypt(source, sink, encoding); - - return sink.str(); -} - - -std::string Cipher::decryptString(const std::string& str, Encoding encoding) -{ - std::istringstream source(str); - std::ostringstream sink; - - decrypt(source, sink, encoding); - return sink.str(); -} - - -void Cipher::encrypt(std::istream& source, std::ostream& sink, Encoding encoding) -{ - CryptoInputStream encryptor(source, createEncryptor()); - - switch (encoding) - { - case ENC_NONE: - StreamCopier::copyStream(encryptor, sink); - break; - - case ENC_BASE64: - case ENC_BASE64_NO_LF: - { - Poco::Base64Encoder encoder(sink); - if (encoding == ENC_BASE64_NO_LF) - { - encoder.rdbuf()->setLineLength(0); - } - StreamCopier::copyStream(encryptor, encoder); - encoder.close(); - } - break; - - case ENC_BINHEX: - case ENC_BINHEX_NO_LF: - { - Poco::HexBinaryEncoder encoder(sink); - if (encoding == ENC_BINHEX_NO_LF) - { - encoder.rdbuf()->setLineLength(0); - } - StreamCopier::copyStream(encryptor, encoder); - encoder.close(); - } - break; - - default: - throw Poco::InvalidArgumentException("Invalid argument", "encoding"); - } -} - - -void Cipher::decrypt(std::istream& source, std::ostream& sink, Encoding encoding) -{ - CryptoOutputStream decryptor(sink, createDecryptor()); - - switch (encoding) - { - case ENC_NONE: - StreamCopier::copyStream(source, decryptor); - decryptor.close(); - break; - - case ENC_BASE64: - case ENC_BASE64_NO_LF: - { - Poco::Base64Decoder decoder(source); - StreamCopier::copyStream(decoder, decryptor); - decryptor.close(); - } - break; - - case ENC_BINHEX: - case ENC_BINHEX_NO_LF: - { - Poco::HexBinaryDecoder decoder(source); - StreamCopier::copyStream(decoder, decryptor); - decryptor.close(); - } - break; - - default: - throw Poco::InvalidArgumentException("Invalid argument", "encoding"); - } -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/CipherFactory.cpp b/Crypto_Win/src/CipherFactory.cpp deleted file mode 100644 index 3c539cff4..000000000 --- a/Crypto_Win/src/CipherFactory.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// -// CipherFactory.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CipherFactory -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/CipherFactory.h" -#include "Poco/Crypto/Cipher.h" -#include "Poco/Crypto/CipherKey.h" -#include "Poco/Crypto/RSAKey.h" -#include "Poco/Crypto/CipherImpl.h" -#include "Poco/Crypto/RSACipherImpl.h" -#include "Poco/Exception.h" -#include "Poco/SingletonHolder.h" - - -namespace Poco { -namespace Crypto { - - -CipherFactory::CipherFactory() -{ -} - - -CipherFactory::~CipherFactory() -{ -} - - -namespace -{ - static Poco::SingletonHolder holder; -} - - -CipherFactory& CipherFactory::defaultFactory() -{ - return *holder.get(); -} - - -Cipher* CipherFactory::createCipher(const CipherKey& key) -{ - return new CipherImpl(key); -} - - -Cipher* CipherFactory::createCipher(const RSAKey& key, RSAPaddingMode paddingMode) -{ - return new RSACipherImpl(key, paddingMode); -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/CipherImpl.cpp b/Crypto_Win/src/CipherImpl.cpp deleted file mode 100644 index d8334811f..000000000 --- a/Crypto_Win/src/CipherImpl.cpp +++ /dev/null @@ -1,198 +0,0 @@ -// -// CipherImpl.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CipherImpl -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/CipherImpl.h" -#include "Poco/Crypto/CryptoTransform.h" -#include "Poco/Exception.h" -#include "Poco/Buffer.h" -#include - - -namespace Poco { -namespace Crypto { - - -class CryptoTransformImpl: public CryptoTransform -{ -public: - enum Direction - { - DIR_ENCRYPT, - DIR_DECRYPT - }; - - CryptoTransformImpl(CipherKeyImpl::Ptr pKey, Direction dir); - ~CryptoTransformImpl(); - std::size_t blockSize() const; - int setPadding(int padding); - - std::streamsize transform( - const unsigned char* input, - std::streamsize inputLength, - unsigned char* output, - std::streamsize outputLength); - - std::streamsize finalize( - unsigned char* output, - std::streamsize length); - -private: - CipherKeyImpl::Ptr _pKey; - Direction _dir; - Poco::Buffer _buffer; - std::size_t _leftOver; -}; - - -CryptoTransformImpl::CryptoTransformImpl(CipherKeyImpl::Ptr pKey, Direction dir): - _pKey(pKey), - _dir(dir), - _buffer(2*_pKey->blockSize()), - _leftOver(0) -{ -} - - -CryptoTransformImpl::~CryptoTransformImpl() -{ -} - - -std::size_t CryptoTransformImpl::blockSize() const -{ - return _pKey->blockSize(); -} - - -int CryptoTransformImpl::setPadding(int padding) -{ - if (padding != 1) throw Poco::NotImplementedException("padding cannot be disabled"); - return 1; -} - - -std::streamsize CryptoTransformImpl::transform( - const unsigned char* input, - std::streamsize inputLength, - unsigned char* output, - std::streamsize outputLength) -{ - // CryptEncrypt and CryptDecrypt require a multiple of block size - std::size_t blockSz = blockSize(); - poco_assert (outputLength >= (inputLength + blockSz)); - - int blocks = static_cast((_leftOver + inputLength)/blockSz); - if (blocks > 0) - { - std::streamsize blockedSize = blocks*blockSz; - std::streamsize processed = blockedSize - _leftOver; - - poco_assert (blockedSize <= outputLength); - - std::memcpy(output, _buffer.begin(), _leftOver); - std::memcpy(output + _leftOver, input, static_cast(processed)); - - _leftOver = static_cast(inputLength - processed); - if (_leftOver == 0) - { - // always leave something over for finalize - _leftOver = blockSz; - if (processed > blockSz) - processed -= blockSz; - else - processed = 0; - blockedSize -= blockSz; - } - std::memcpy(_buffer.begin(), input + processed, _leftOver); - - DWORD dataLen = static_cast(blockedSize); - DWORD bufLen = static_cast(outputLength); - if (dataLen > 0) - { - if (_dir == DIR_ENCRYPT) - { - BOOL rc = CryptEncrypt(_pKey->_hKey, 0, FALSE, 0, reinterpret_cast(output), &dataLen, bufLen); - DWORD err = GetLastError(); - if (!rc) throw Poco::IOException("failed to encrypt data", GetLastError()); - } - else - { - BOOL rc = CryptDecrypt(_pKey->_hKey, 0, FALSE, 0, reinterpret_cast(output), &dataLen); - if (!rc) throw Poco::IOException("failed to decrypt data", GetLastError()); - } - } - return static_cast(dataLen); - } - else - { - poco_assert_dbg (_leftOver + inputLength < blockSz); - std::memcpy(_buffer.begin() + _leftOver, input, static_cast(inputLength)); - _leftOver += static_cast(inputLength); - return 0; - } -} - - -std::streamsize CryptoTransformImpl::finalize( - unsigned char* output, - std::streamsize length) -{ - poco_assert (length >= blockSize()); - - std::memcpy(output, _buffer.begin(), _leftOver); - DWORD dataLen = static_cast(_leftOver); - DWORD bufLen = static_cast(length); - if (_dir == DIR_ENCRYPT) - { - BOOL rc = CryptEncrypt(_pKey->_hKey, 0, TRUE, 0, reinterpret_cast(output), &dataLen, bufLen); - if (!rc) throw Poco::IOException("failed to encrypt data", GetLastError()); - } - else - { - BOOL rc = CryptDecrypt(_pKey->_hKey, 0, TRUE, 0, reinterpret_cast(output), &dataLen); - if (!rc) throw Poco::IOException("failed to decrypt data", GetLastError()); - } - - return static_cast(dataLen); -} - - -CipherImpl::CipherImpl(const CipherKey& key): - _key(key) -{ -} - - -CipherImpl::~CipherImpl() -{ -} - - -CryptoTransform* CipherImpl::createEncryptor() -{ - CipherKeyImpl::Ptr pKey = _key.impl(); - return new CryptoTransformImpl(pKey, CryptoTransformImpl::DIR_ENCRYPT); -} - - -CryptoTransform* CipherImpl::createDecryptor() -{ - CipherKeyImpl::Ptr pKey = _key.impl(); - return new CryptoTransformImpl(pKey, CryptoTransformImpl::DIR_DECRYPT); -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/CipherKey.cpp b/Crypto_Win/src/CipherKey.cpp deleted file mode 100644 index 80a4a5a97..000000000 --- a/Crypto_Win/src/CipherKey.cpp +++ /dev/null @@ -1,47 +0,0 @@ -// -// CipherKey.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CipherKey -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/CipherKey.h" - - -namespace Poco { -namespace Crypto { - - -CipherKey::CipherKey(const std::string& name, const std::string& passphrase, const std::string& salt, int iterationCount): - _pImpl(new CipherKeyImpl(name, passphrase, salt, iterationCount)) -{ -} - - -CipherKey::CipherKey(const std::string& name, const ByteVec& key, const ByteVec& iv): - _pImpl(new CipherKeyImpl(name, key, iv)) -{ -} - - -CipherKey::CipherKey(const std::string& name): - _pImpl(new CipherKeyImpl(name)) -{ -} - - -CipherKey::~CipherKey() -{ -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/CipherKeyImpl.cpp b/Crypto_Win/src/CipherKeyImpl.cpp deleted file mode 100644 index 20674f87c..000000000 --- a/Crypto_Win/src/CipherKeyImpl.cpp +++ /dev/null @@ -1,728 +0,0 @@ -// -// CipherKeyImpl.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CipherKeyImpl -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/CipherKeyImpl.h" -#include "Poco/Crypto/CryptoTransform.h" -#include "Poco/Crypto/CipherFactory.h" -#include "Poco/Crypto/DigestEngine.h" -#include "Poco/Exception.h" -#include "Poco/RandomStream.h" -#include "Poco/String.h" - - -namespace -{ - // TODO: Not sure if we need this. May be useful for importing PEM private/public keys. Delete if not needed - - // Following code taken and adapted from http://support.microsoft.com/kb/228786. - // - // Sometimes it is convenient to export and import plain text session keys. - // However, the Microsoft Cryptographic Providers (Base and Enhanced) do not - // support this feature. Both CryptExportKey() and CryptImportKey() require a - // valid key handle to encrypt and decrypt the session key, respectively. - // But by using an "exponent-of-one" private key the same effect can be achieved - // to encrypt and decrypt the session key. - - BOOL CreatePrivateExponentOneKey(HCRYPTPROV hProv, - DWORD dwKeySpec, - HCRYPTKEY *hPrivateKey); - - BOOL GenerateSessionKeyWithAlgorithm(HCRYPTPROV hProv, - ALG_ID Alg, - HCRYPTKEY *hSessionKey); - - BOOL DeriveSessionKeyWithAlgorithm(HCRYPTPROV hProv, - ALG_ID Alg, - LPBYTE lpHashingData, - DWORD dwHashingData, - HCRYPTKEY *hSessionKey); - - BOOL ExportPlainSessionBlob(HCRYPTKEY hPublicKey, - HCRYPTKEY hSessionKey, - LPBYTE *pbKeyMaterial, - DWORD *dwKeyMaterial); - - BOOL ImportPlainSessionBlob(HCRYPTPROV hProv, - HCRYPTKEY hPrivateKey, - ALG_ID dwAlgId, - LPBYTE pbKeyMaterial, - DWORD dwKeyMaterial, - HCRYPTKEY *hSessionKey); - - - BOOL CreatePrivateExponentOneKey(HCRYPTPROV hProv, - DWORD dwKeySpec, - HCRYPTKEY *hPrivateKey) - { - BOOL fReturn = FALSE; - BOOL fResult; - int n; - LPBYTE keyblob = NULL; - DWORD dwkeyblob; - DWORD dwBitLen; - BYTE *ptr; - - __try - { - *hPrivateKey = 0; - - if ((dwKeySpec != AT_KEYEXCHANGE) && (dwKeySpec != AT_SIGNATURE)) __leave; - - // Generate the private key - fResult = CryptGenKey(hProv, dwKeySpec, CRYPT_EXPORTABLE, hPrivateKey); - if (!fResult) __leave; - - // Export the private key, we'll convert it to a private - // exponent of one key - fResult = CryptExportKey(*hPrivateKey, 0, PRIVATEKEYBLOB, 0, NULL, &dwkeyblob); - if (!fResult) __leave; - - keyblob = (LPBYTE)LocalAlloc(LPTR, dwkeyblob); - if (!keyblob) __leave; - - fResult = CryptExportKey(*hPrivateKey, 0, PRIVATEKEYBLOB, 0, keyblob, &dwkeyblob); - if (!fResult) __leave; - - CryptDestroyKey(*hPrivateKey); - *hPrivateKey = 0; - - // Get the bit length of the key - memcpy(&dwBitLen, &keyblob[12], 4); - - // Modify the Exponent in Key BLOB format - // Key BLOB format is documented in SDK - - // Convert pubexp in rsapubkey to 1 - ptr = &keyblob[16]; - for (n = 0; n < 4; n++) - { - if (n == 0) ptr[n] = 1; - else ptr[n] = 0; - } - - // Skip pubexp - ptr += 4; - // Skip modulus, prime1, prime2 - ptr += (dwBitLen / 8); - ptr += (dwBitLen / 16); - ptr += (dwBitLen / 16); - - // Convert exponent1 to 1 - for (n = 0; n < (dwBitLen / 16); n++) - { - if (n == 0) ptr[n] = 1; - else ptr[n] = 0; - } - - // Skip exponent1 - ptr += (dwBitLen / 16); - - // Convert exponent2 to 1 - for (n = 0; n < (dwBitLen / 16); n++) - { - if (n == 0) ptr[n] = 1; - else ptr[n] = 0; - } - - // Skip exponent2, coefficient - ptr += (dwBitLen / 16); - ptr += (dwBitLen / 16); - - // Convert privateExponent to 1 - for (n = 0; n < (dwBitLen / 8); n++) - { - if (n == 0) ptr[n] = 1; - else ptr[n] = 0; - } - - // Import the exponent-of-one private key. - if (!CryptImportKey(hProv, keyblob, dwkeyblob, 0, 0, hPrivateKey)) - { - __leave; - } - - fReturn = TRUE; - } - __finally - { - if (keyblob) LocalFree(keyblob); - - if (!fReturn) - { - if (*hPrivateKey) CryptDestroyKey(*hPrivateKey); - } - } - - return fReturn; - } - - - BOOL GenerateSessionKeyWithAlgorithm(HCRYPTPROV hProv, - ALG_ID Alg, - HCRYPTKEY *hSessionKey) - { - BOOL fResult; - - *hSessionKey = 0; - - fResult = CryptGenKey(hProv, Alg, CRYPT_EXPORTABLE, hSessionKey); - if (!fResult) - { - return FALSE; - } - - return TRUE; - } - - - BOOL DeriveSessionKeyWithAlgorithm(HCRYPTPROV hProv, - ALG_ID Alg, - LPBYTE lpHashingData, - DWORD dwHashingData, - HCRYPTKEY *hSessionKey) - { - BOOL fResult; - BOOL fReturn = FALSE; - HCRYPTHASH hHash = 0; - - __try - { - *hSessionKey = 0; - - fResult = CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash); - if (!fResult) __leave; - - fResult = CryptHashData(hHash, lpHashingData, dwHashingData, 0); - if (!fResult) __leave; - - fResult = CryptDeriveKey(hProv, Alg, hHash, CRYPT_EXPORTABLE, hSessionKey); - if (!fResult) __leave; - - fReturn = TRUE; - } - __finally - { - if (hHash) CryptDestroyHash(hHash); - } - - return fReturn; - } - - - BOOL ExportPlainSessionBlob(HCRYPTKEY hPublicKey, - HCRYPTKEY hSessionKey, - LPBYTE *pbKeyMaterial, - DWORD *dwKeyMaterial) - { - BOOL fReturn = FALSE; - BOOL fResult; - DWORD dwSize, n; - LPBYTE pbSessionBlob = NULL; - DWORD dwSessionBlob; - LPBYTE pbPtr; - - __try - { - *pbKeyMaterial = NULL; - *dwKeyMaterial = 0; - - fResult = CryptExportKey(hSessionKey, hPublicKey, SIMPLEBLOB, 0, NULL, &dwSessionBlob); - if (!fResult) __leave; - - pbSessionBlob = (LPBYTE)LocalAlloc(LPTR, dwSessionBlob); - if (!pbSessionBlob) __leave; - - fResult = CryptExportKey(hSessionKey, hPublicKey, SIMPLEBLOB, 0, pbSessionBlob, &dwSessionBlob); - if (!fResult) __leave; - - // Get session key size in bits - dwSize = sizeof(DWORD); - fResult = CryptGetKeyParam(hSessionKey, KP_KEYLEN, (LPBYTE)dwKeyMaterial, &dwSize, 0); - if (!fResult) __leave; - - // Get the number of bytes and allocate buffer - *dwKeyMaterial /= 8; - *pbKeyMaterial = (LPBYTE)LocalAlloc(LPTR, *dwKeyMaterial); - if (!*pbKeyMaterial) __leave; - - // Skip the header - pbPtr = pbSessionBlob; - pbPtr += sizeof(BLOBHEADER); - pbPtr += sizeof(ALG_ID); - - // We are at the beginning of the key - // but we need to start at the end since - // it's reversed - pbPtr += (*dwKeyMaterial - 1); - - // Copy the raw key into our return buffer - for (n = 0; n < *dwKeyMaterial; n++) - { - (*pbKeyMaterial)[n] = *pbPtr; - pbPtr--; - } - - fReturn = TRUE; - } - __finally - { - if (pbSessionBlob) LocalFree(pbSessionBlob); - - if ((!fReturn) && (*pbKeyMaterial)) - { - LocalFree(*pbKeyMaterial); - *pbKeyMaterial = NULL; - *dwKeyMaterial = 0; - } - } - - return fReturn; - } - - - BOOL ImportPlainSessionBlob(HCRYPTPROV hProv, - HCRYPTKEY hPrivateKey, - ALG_ID dwAlgId, - LPBYTE pbKeyMaterial, - DWORD dwKeyMaterial, - HCRYPTKEY *hSessionKey) - { - BOOL fResult; - BOOL fReturn = FALSE; - BOOL fFound = FALSE; - LPBYTE pbSessionBlob = NULL; - DWORD dwSessionBlob, dwSize, n; - DWORD dwPublicKeySize; - DWORD dwProvSessionKeySize; - ALG_ID dwPrivKeyAlg; - LPBYTE pbPtr; - DWORD dwFlags = CRYPT_FIRST; - PROV_ENUMALGS_EX ProvEnum; - HCRYPTKEY hTempKey = 0; - - __try - { - // Double check to see if this provider supports this algorithm - // and key size - do - { - dwSize = sizeof(ProvEnum); - fResult = CryptGetProvParam(hProv, PP_ENUMALGS_EX, (LPBYTE)&ProvEnum, &dwSize, dwFlags); - if (!fResult) break; - - dwFlags = 0; - - if (ProvEnum.aiAlgid == dwAlgId) fFound = TRUE; - - } while (!fFound); - - if (!fFound) __leave; - - // We have to get the key size(including padding) - // from an HCRYPTKEY handle. PP_ENUMALGS_EX contains - // the key size without the padding so we can't use it. - fResult = CryptGenKey(hProv, dwAlgId, 0, &hTempKey); - if (!fResult) __leave; - - dwSize = sizeof(DWORD); - fResult = CryptGetKeyParam(hTempKey, KP_KEYLEN, (LPBYTE)&dwProvSessionKeySize, &dwSize, 0); - if (!fResult) __leave; - CryptDestroyKey(hTempKey); - hTempKey = 0; - - // Our key is too big, leave - if ((dwKeyMaterial * 8) > dwProvSessionKeySize) __leave; - - // Get private key's algorithm - dwSize = sizeof(ALG_ID); - fResult = CryptGetKeyParam(hPrivateKey, KP_ALGID, (LPBYTE)&dwPrivKeyAlg, &dwSize, 0); - if (!fResult) __leave; - - // Get private key's length in bits - dwSize = sizeof(DWORD); - fResult = CryptGetKeyParam(hPrivateKey, KP_KEYLEN, (LPBYTE)&dwPublicKeySize, &dwSize, 0); - if (!fResult) __leave; - - // calculate Simple blob's length - dwSessionBlob = (dwPublicKeySize / 8) + sizeof(ALG_ID) + sizeof(BLOBHEADER); - - // allocate simple blob buffer - pbSessionBlob = (LPBYTE)LocalAlloc(LPTR, dwSessionBlob); - if (!pbSessionBlob) __leave; - - pbPtr = pbSessionBlob; - - // SIMPLEBLOB Format is documented in SDK - // Copy header to buffer - ((BLOBHEADER *)pbPtr)->bType = SIMPLEBLOB; - ((BLOBHEADER *)pbPtr)->bVersion = 2; - ((BLOBHEADER *)pbPtr)->reserved = 0; - ((BLOBHEADER *)pbPtr)->aiKeyAlg = dwAlgId; - pbPtr += sizeof(BLOBHEADER); - - // Copy private key algorithm to buffer - *((DWORD *)pbPtr) = dwPrivKeyAlg; - pbPtr += sizeof(ALG_ID); - - // Place the key material in reverse order - for (n = 0; n < dwKeyMaterial; n++) - { - pbPtr[n] = pbKeyMaterial[dwKeyMaterial - n - 1]; - } - - // 3 is for the first reserved byte after the key material + the 2 reserved bytes at the end. - dwSize = dwSessionBlob - (sizeof(ALG_ID) + sizeof(BLOBHEADER) + dwKeyMaterial + 3); - pbPtr += (dwKeyMaterial + 1); - - // Generate random data for the rest of the buffer - // (except that last two bytes) - fResult = CryptGenRandom(hProv, dwSize, pbPtr); - if (!fResult) __leave; - - for (n = 0; n < dwSize; n++) - { - if (pbPtr[n] == 0) pbPtr[n] = 1; - } - - pbSessionBlob[dwSessionBlob - 2] = 2; - - fResult = CryptImportKey(hProv, pbSessionBlob, dwSessionBlob, - hPrivateKey, CRYPT_EXPORTABLE, hSessionKey); - if (!fResult) __leave; - - fReturn = TRUE; - } - __finally - { - if (hTempKey) CryptDestroyKey(hTempKey); - if (pbSessionBlob) LocalFree(pbSessionBlob); - } - - return fReturn; - } -} - - -namespace Poco { -namespace Crypto { - - -CipherKeyImpl::CipherKeyImpl(const std::string& name, - const std::string& passphrase, - const std::string& salt, - int iterationCount): - _hKey(0), - _name(name), - _id(id(name)), - _key(keySize()), - _iv(ivSize()) -{ - generateKey(passphrase, salt, iterationCount); - importKey(); - try - { - importIV(); - } - catch (...) - { - CryptDestroyKey(_hKey); - throw; - } -} - - -CipherKeyImpl::CipherKeyImpl(const std::string& name, - const ByteVec& key, - const ByteVec& iv): - _hKey(0), - _name(name), - _id(id(name)), - _key(key), - _iv(iv) -{ - if (_key.size() != keySize()) throw Poco::InvalidArgumentException("invalid key length"); - if (_iv.size() != ivSize()) throw Poco::InvalidArgumentException("invalid iv length"); - importKey(); - try - { - importIV(); - } - catch (...) - { - CryptDestroyKey(_hKey); - throw; - } -} - - -CipherKeyImpl::CipherKeyImpl(const std::string& name): - _hKey(0), - _name(name), - _id(id(name)), - _key(keySize()), - _iv(ivSize()) -{ - generateKey(); - importKey(); - try - { - importIV(); - } - catch (...) - { - CryptDestroyKey(_hKey); - throw; - } -} - - -CipherKeyImpl::~CipherKeyImpl() -{ - if (_hKey) CryptDestroyKey(_hKey); -} - - -CipherKeyImpl::Mode CipherKeyImpl::mode() const -{ - if (blockSize() != 0) - { - DWORD mode; - DWORD modeLen = sizeof(mode); - BOOL rc = CryptGetKeyParam(_hKey, KP_MODE, reinterpret_cast(&mode), &modeLen, 0); - if (rc) - { - switch (mode) - { - case CRYPT_MODE_ECB: - return MODE_ECB; - case CRYPT_MODE_CBC: - return MODE_CBC; - case CRYPT_MODE_OFB: - return MODE_OFB; - case CRYPT_MODE_CFB: - return MODE_CFB; - default: - throw Poco::IllegalStateException("unexpected cipher mode"); - } - } - else throw Poco::SystemException("cannot get cipher mode"); - } - else return MODE_STREAM_CIPHER; -} - - -void CipherKeyImpl::generateKey() -{ - getRandomBytes(_key, keySize()); - getRandomBytes(_iv, ivSize()); -} - - -void CipherKeyImpl::getRandomBytes(ByteVec& vec, std::size_t count) -{ - Poco::RandomInputStream random; - - vec.clear(); - vec.reserve(count); - - for (int i = 0; i < count; ++i) - vec.push_back(static_cast(random.get())); -} - - -void CipherKeyImpl::generateKey( - const std::string& password, - const std::string& salt, - int iterationCount) -{ - // We must be compatible with the OpenSSL implementation of Crypto. - // OpenSSL documentation specifies that the salt must be an 8-byte array. - unsigned char saltBytes[8]; - - if (!salt.empty()) - { - int len = static_cast(salt.size()); - // Create the salt array from the salt string - for (int i = 0; i < 8; ++i) - saltBytes[i] = salt.at(i % len); - for (int i = 8; i < len; ++i) - saltBytes[i % 8] ^= salt.at(i); - } - - // Now create the key and IV, using the MD5 digest algorithm. - // We emulate the OpenSSL EVP_BytesToKey() function using MD5. - - // First iteration - DigestEngine md5("MD5"); - md5.update(password.data(), password.size()); - if (!salt.empty()) md5.update(saltBytes, 8); - Poco::DigestEngine::Digest d; - d = md5.digest(); - for (int i = 1; i < iterationCount; i++) - { - md5.reset(); - md5.update(&d[0], d.size()); - d = md5.digest(); - } - int keySz = keySize(); - int ivSz = ivSize(); - int requiredSz = keySz + ivSz; - int availableSz = static_cast(d.size()); - int k = 1; - Poco::DigestEngine::Digest extraD(d); - while (availableSz < requiredSz) - { - md5.reset(); - md5.update(&extraD[0], extraD.size()); - md5.update(password.data(), password.size()); - if (!salt.empty()) md5.update(saltBytes, 8); - extraD = md5.digest(); - for (int i = 1; i < iterationCount; i++) - { - md5.reset(); - md5.update(&extraD[0], extraD.size()); - extraD = md5.digest(); - } - availableSz += static_cast(extraD.size()); - d.insert(d.end(), extraD.begin(), extraD.end()); - } - - _key.assign(d.begin(), d.begin() + keySz); - _iv.assign(d.begin() + keySz, d.begin() + requiredSz); -} - - -int CipherKeyImpl::keySize() const -{ - switch (_id) - { - case CALG_3DES: - return 192/8; // 168 key bits plus parity - case CALG_3DES_112: - return 128/8; // 112 key bits plus parity - case CALG_AES_128: - return 128/8; - case CALG_AES_192: - return 192/8; - case CALG_AES_256: - return 256/8; - case CALG_DES: - return 64/8; // 56 key bits plus parity - case CALG_RC2: - return 128/8; - case CALG_RC4: - return 128/8; - default: - poco_bugcheck(); - return 0; - } -} - - -int CipherKeyImpl::blockSize() const -{ - switch (_id) - { - case CALG_3DES: - return 64/8; - case CALG_3DES_112: - return 64/8; - case CALG_AES_128: - case CALG_AES_192: - case CALG_AES_256: - return 128/8; - case CALG_DES: - return 64/8; - case CALG_RC2: - return 64/8; - case CALG_RC4: - return 0; - default: - poco_bugcheck(); - return 0; - } -} - - -int CipherKeyImpl::ivSize() const -{ - switch (_id) - { - case CALG_DES: - case CALG_3DES: - case CALG_3DES_112: - return 8; - case CALG_AES_128: - case CALG_AES_192: - case CALG_AES_256: - return 16; - case CALG_RC2: - return 8; - case CALG_RC4: - return 0; - default: - poco_bugcheck(); - return 0; - } -} - - -void CipherKeyImpl::importKey() -{ - // Create Exponent of One private key - HCRYPTKEY hPubPrivKey = 0; - BOOL rc = CreatePrivateExponentOneKey(_sp.handle(), AT_KEYEXCHANGE, &hPubPrivKey); - if (!rc) throw Poco::SystemException("cannot create private key for importing key", GetLastError()); - rc = ImportPlainSessionBlob(_sp.handle(), hPubPrivKey, _id, &_key[0], static_cast(_key.size()), &_hKey); - CryptDestroyKey(hPubPrivKey); - if (!rc) throw Poco::SystemException("cannot import key", GetLastError()); -} - - -void CipherKeyImpl::importIV() -{ - if (!_iv.empty()) - { - BOOL rc = CryptSetKeyParam(_hKey, KP_IV, static_cast(&_iv[0]), 0); - if (!rc) throw Poco::SystemException("cannot import iv", GetLastError()); - } -} - - -ALG_ID CipherKeyImpl::id(const std::string& name) -{ - if (icompare(name, "3DES") == 0) - return CALG_3DES; - else if (icompare(name, "3DES-112") == 0 || icompare(name, "3DES112") == 0) - return CALG_3DES_112; - else if (icompare(name, "AES-128") == 0 || icompare(name, "AES128") == 0) - return CALG_AES_128; - else if (icompare(name, "AES-192") == 0 || icompare(name, "AES192") == 0) - return CALG_AES_192; - else if (icompare(name, "AES") == 0 || icompare(name, "AES-256") == 0 || icompare(name, "AES256") == 0) - return CALG_AES_256; - else if (icompare(name, "DES") == 0) - return CALG_DES; - else if (icompare(name, "RC2") == 0) - return CALG_RC2; - else if (icompare(name, "RC4") == 0) - return CALG_RC4; - else - throw Poco::NotFoundException("cryptographic algorithm", name); -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/CryptoStream.cpp b/Crypto_Win/src/CryptoStream.cpp deleted file mode 100644 index 762062a3d..000000000 --- a/Crypto_Win/src/CryptoStream.cpp +++ /dev/null @@ -1,357 +0,0 @@ -// -// CryptoStream.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CryptoStream -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/CryptoStream.h" -#include "Poco/Crypto/CryptoTransform.h" -#include "Poco/Crypto/Cipher.h" -#include "Poco/Exception.h" -#include - - -#undef min -#undef max - - -namespace Poco { -namespace Crypto { - - -// -// CryptoStreamBuf -// - - -CryptoStreamBuf::CryptoStreamBuf(std::istream& istr, CryptoTransform* pTransform, std::streamsize bufferSize): - Poco::BufferedStreamBuf(bufferSize, std::ios::in), - _pTransform(pTransform), - _pIstr(&istr), - _pOstr(0), - _eof(false), - _buffer(static_cast(bufferSize)) -{ - poco_check_ptr (pTransform); - poco_assert (bufferSize > 2 * pTransform->blockSize()); -} - - -CryptoStreamBuf::CryptoStreamBuf(std::ostream& ostr, CryptoTransform* pTransform, std::streamsize bufferSize): - Poco::BufferedStreamBuf(bufferSize, std::ios::out), - _pTransform(pTransform), - _pIstr(0), - _pOstr(&ostr), - _eof(false), - _buffer(static_cast(bufferSize)) -{ - poco_check_ptr (pTransform); - poco_assert (bufferSize > 2 * pTransform->blockSize()); -} - - -CryptoStreamBuf::~CryptoStreamBuf() -{ - try - { - close(); - } - catch (...) - { - } - delete _pTransform; -} - - -void CryptoStreamBuf::close() -{ - sync(); - - if (_pIstr) - { - _pIstr = 0; - } - else if (_pOstr) - { - // Close can be called multiple times. By zeroing the pointer we make - // sure that we call finalize() only once, even if an exception is - // thrown. - std::ostream* pOstr = _pOstr; - _pOstr = 0; - - // Finalize transformation. - std::streamsize n = _pTransform->finalize(_buffer.begin(), static_cast(_buffer.size())); - - if (n > 0) - { - pOstr->write(reinterpret_cast(_buffer.begin()), n); - if (!pOstr->good()) - throw Poco::IOException("Output stream failure"); - } - } -} - - -int CryptoStreamBuf::readFromDevice(char* buffer, std::streamsize length) -{ - if (!_pIstr) - return 0; - - int count = 0; - - while (!_eof) - { - int m = (static_cast(length) - count)/2 - static_cast(_pTransform->blockSize()); - - // Make sure we can read at least one more block. Explicitely check - // for m < 0 since blockSize() returns an unsigned int and the - // comparison might give false results for m < 0. - if (m <= 0) - break; - - int n = 0; - - if (_pIstr->good()) - { - _pIstr->read(reinterpret_cast(_buffer.begin()), m); - n = static_cast(_pIstr->gcount()); - } - - if (n == 0) - { - _eof = true; - - // No more data, finalize transformation - count += static_cast(_pTransform->finalize( - reinterpret_cast(buffer + count), - static_cast(length) - count)); - } - else - { - // Transform next chunk of data - count += static_cast(_pTransform->transform( - _buffer.begin(), - n, - reinterpret_cast(buffer + count), - static_cast(length) - count)); - } - } - - return count; -} - - -int CryptoStreamBuf::writeToDevice(const char* buffer, std::streamsize length) -{ - if (!_pOstr) - return 0; - - std::size_t maxChunkSize = _buffer.size()/2; - std::size_t count = 0; - - while (count < length) - { - // Truncate chunk size so that the maximum output fits into _buffer. - std::size_t n = static_cast(length) - count; - if (n > maxChunkSize) - n = maxChunkSize; - - // Transform next chunk of data - std::streamsize k = _pTransform->transform( - reinterpret_cast(buffer + count), - static_cast(n), - _buffer.begin(), - static_cast(_buffer.size())); - - // Attention: (n != k) might be true. In count, we have to track how - // many bytes from buffer have been consumed, not how many bytes have - // been written to _pOstr! - count += n; - - if (k > 0) - { - _pOstr->write(reinterpret_cast(_buffer.begin()), k); - if (!_pOstr->good()) - throw Poco::IOException("Output stream failure"); - } - } - - return static_cast(count); -} - - -// -// CryptoIOS -// - - -CryptoIOS::CryptoIOS(std::istream& istr, CryptoTransform* pTransform, std::streamsize bufferSize): - _buf(istr, pTransform, bufferSize) -{ - poco_ios_init(&_buf); -} - - -CryptoIOS::CryptoIOS(std::ostream& ostr, CryptoTransform* pTransform, std::streamsize bufferSize): - _buf(ostr, pTransform, bufferSize) -{ - poco_ios_init(&_buf); -} - - -CryptoIOS::~CryptoIOS() -{ -} - - -CryptoStreamBuf* CryptoIOS::rdbuf() -{ - return &_buf; -} - - -// -// CryptoInputStream -// - - -CryptoInputStream::CryptoInputStream(std::istream& istr, CryptoTransform* pTransform, std::streamsize bufferSize): - CryptoIOS(istr, pTransform, bufferSize), - std::istream(&_buf) -{ -} - - -CryptoInputStream::CryptoInputStream(std::istream& istr, Cipher& cipher, std::streamsize bufferSize): - CryptoIOS(istr, cipher.createEncryptor(), bufferSize), - std::istream(&_buf) -{ -} - - -CryptoInputStream::~CryptoInputStream() -{ -} - - -// -// CryptoOutputStream -// - - -CryptoOutputStream::CryptoOutputStream(std::ostream& ostr, CryptoTransform* pTransform, std::streamsize bufferSize): - CryptoIOS(ostr, pTransform, bufferSize), - std::ostream(&_buf) -{ -} - - -CryptoOutputStream::CryptoOutputStream(std::ostream& ostr, Cipher& cipher, std::streamsize bufferSize): - CryptoIOS(ostr, cipher.createDecryptor(), bufferSize), - std::ostream(&_buf) -{ -} - - -CryptoOutputStream::~CryptoOutputStream() -{ -} - - -void CryptoOutputStream::close() -{ - _buf.close(); -} - - -// -// EncryptingInputStream -// - - -EncryptingInputStream::EncryptingInputStream(std::istream& istr, Cipher& cipher, std::streamsize bufferSize): - CryptoIOS(istr, cipher.createEncryptor(), bufferSize), - std::istream(&_buf) -{ -} - - -EncryptingInputStream::~EncryptingInputStream() -{ -} - - -// -// EncryptingOuputStream -// - - -EncryptingOutputStream::EncryptingOutputStream(std::ostream& ostr, Cipher& cipher, std::streamsize bufferSize): - CryptoIOS(ostr, cipher.createEncryptor(), bufferSize), - std::ostream(&_buf) -{ -} - - -EncryptingOutputStream::~EncryptingOutputStream() -{ -} - - -void EncryptingOutputStream::close() -{ - _buf.close(); -} - - -// -// DecryptingInputStream -// - - -DecryptingInputStream::DecryptingInputStream(std::istream& istr, Cipher& cipher, std::streamsize bufferSize): - CryptoIOS(istr, cipher.createDecryptor(), bufferSize), - std::istream(&_buf) -{ -} - - -DecryptingInputStream::~DecryptingInputStream() -{ -} - - -// -// DecryptingOuputStream -// - - -DecryptingOutputStream::DecryptingOutputStream(std::ostream& ostr, Cipher& cipher, std::streamsize bufferSize): - CryptoIOS(ostr, cipher.createDecryptor(), bufferSize), - std::ostream(&_buf) -{ -} - - -DecryptingOutputStream::~DecryptingOutputStream() -{ -} - - -void DecryptingOutputStream::close() -{ - _buf.close(); -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/CryptoTransform.cpp b/Crypto_Win/src/CryptoTransform.cpp deleted file mode 100644 index f6d59db84..000000000 --- a/Crypto_Win/src/CryptoTransform.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// -// CryptoTransform.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: Cipher -// Module: CryptoTransform -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/CryptoTransform.h" - - -namespace Poco { -namespace Crypto { - - -CryptoTransform::CryptoTransform() -{ -} - - -CryptoTransform::~CryptoTransform() -{ -} - - -int CryptoTransform::setPadding(int padding) -{ - return 1; -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/DigestEngine.cpp b/Crypto_Win/src/DigestEngine.cpp deleted file mode 100644 index 2613a268f..000000000 --- a/Crypto_Win/src/DigestEngine.cpp +++ /dev/null @@ -1,100 +0,0 @@ -// -// DigestEngine.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: Digest -// Module: DigestEngine -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/DigestEngine.h" -#include "Poco/Exception.h" -#include "Poco/String.h" - - -namespace Poco { -namespace Crypto { - - -DigestEngine::DigestEngine(const std::string& name): - _name(name), - _handle(0) -{ - reset(); -} - - -DigestEngine::~DigestEngine() -{ - CryptDestroyHash(_handle); -} - - -std::size_t DigestEngine::digestLength() const -{ - DWORD hashLen; - DWORD len = sizeof(hashLen); - if (CryptGetHashParam(_handle, HP_HASHSIZE, reinterpret_cast(&hashLen), &len, 0)) - return static_cast(hashLen); - else - throw Poco::SystemException("Failed to obtain hash size", GetLastError()); -} - - -void DigestEngine::reset() -{ - if (_handle) - { - CryptDestroyHash(_handle); - _handle = 0; - } - ALG_ID algo; - if (icompare(_name, "MD2") == 0) - algo = CALG_MD2; - else if (icompare(_name, "MD4") == 0) - algo = CALG_MD4; - else if (icompare(_name, "MD5") == 0) - algo = CALG_MD5; - else if (icompare(_name, "SHA1") == 0 || icompare(_name, "SHA-1") == 0) - algo = CALG_SHA1; - else if (icompare(_name, "SHA256") == 0 || icompare(_name, "SHA-256") == 0) - algo = CALG_SHA_256; - else if (icompare(_name, "SHA384") == 0 || icompare(_name, "SHA-384") == 0) - algo = CALG_SHA_384; - else if (icompare(_name, "SHA512") == 0 || icompare(_name, "SHA-512") == 0) - algo = CALG_SHA_512; - else - throw Poco::NotFoundException("hash algorithm", _name); - if (!CryptCreateHash(_sp.handle(), algo, NULL, 0, &_handle)) - throw Poco::SystemException("Failed to create hash", GetLastError()); -} - - -const Poco::DigestEngine::Digest& DigestEngine::digest() -{ - _digest.clear(); - std::size_t hashLen = digestLength(); - _digest.resize(hashLen); - DWORD len = static_cast(hashLen); - if (!CryptGetHashParam(_handle, HP_HASHVAL, &_digest[0], &len, 0)) - throw Poco::SystemException("Failed to obtain hash", GetLastError()); - reset(); - return _digest; -} - - -void DigestEngine::updateImpl(const void* data, std::size_t length) -{ - if (!CryptHashData(_handle, reinterpret_cast(data), static_cast(length), 0)) - throw Poco::SystemException("Failed to hash data", GetLastError()); -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/RSACipherImpl.cpp b/Crypto_Win/src/RSACipherImpl.cpp deleted file mode 100644 index d3078b367..000000000 --- a/Crypto_Win/src/RSACipherImpl.cpp +++ /dev/null @@ -1,395 +0,0 @@ -// -// RSACipherImpl.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: RSA -// Module: RSACipherImpl -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/RSACipherImpl.h" -#include "Poco/Crypto/CryptoTransform.h" -#include "Poco/Error.h" -#include "Poco/Exception.h" - - -// TODO: this is still OpenSSL code - -namespace Poco { -namespace Crypto { - - -namespace -{ - void throwError() - { - DWORD err = Error::last(); - std::string errStr = Error::getMessage(err); - throw Poco::IOException(errStr); - } - - /* - int mapPaddingMode(RSAPaddingMode paddingMode) - { - switch (paddingMode) - { - case RSA_PADDING_PKCS1: - return BCRYPT_PAD_PKCS1; - case RSA_PADDING_PKCS1_OAEP: - return BCRYPT_PAD_OAEP; - //case RSA_PADDING_SSLV23: ??? - // return RSA_SSLV23_PADDING; - case RSA_PADDING_NONE: - return BCRYPT_PAD_NONE; - default: - poco_bugcheck(); - return BCRYPT_PAD_NONE; - // BCRYPT_PAD_PSS ??? - // - // ??? - // #if (NTDDI_VERSION >= NTDDI_WINBLUE) - // #define BCRYPT_PAD_PKCS1_OPTIONAL_HASH_OID 0x00000010 //BCryptVerifySignature - // #endif - } - } - */ - - std::size_t rsaBlockSize(const ServiceProvider& rsa) - { - BYTE* pbData = NULL; - DWORD dwDataLen = 0; - // ??? (from documentation) "This function must not be used on a thread of a multithreaded program." ??? - if (CryptGetProvParam(rsa.handle(), PP_SESSION_KEYSIZE, NULL, &dwDataLen, 0)) - { - std::vector data(dwDataLen); - pbData = &data[0]; - if (CryptGetProvParam(rsa.handle(), PP_SESSION_KEYSIZE, pbData, &dwDataLen, 0)) - { - // ??? what is in pbData? DWORD? BYTE? TODO: check at runtime - } - else // !CryptGetProvParam - { - DWORD err = Error::last(); - std::string errStr = "[RSAEncryptImpl::blockSize()]: "; - errStr += Error::getMessage(err); - switch (err) - { - case ERROR_INVALID_HANDLE: case ERROR_INVALID_PARAMETER: - case ERROR_MORE_DATA: case NTE_BAD_FLAGS: - case NTE_BAD_TYPE: case NTE_BAD_UID: - throw Poco::InvalidArgumentException(errStr); - default: - throw Poco::SystemException(errStr); - } - } - } // !CryptGetProvParam length - else - { - throw Poco::SystemException("Cannot obtain length for block size value."); - } - - return static_cast(dwDataLen); - } - - - class RSAEncryptImpl: public CryptoTransform - { - public: - RSAEncryptImpl(const ServiceProvider& rsa, RSAPaddingMode paddingMode); - ~RSAEncryptImpl(); - - std::size_t blockSize() const; - std::size_t maxDataSize() const; - - std::streamsize transform( - const unsigned char* input, - std::streamsize inputLength, - unsigned char* output, - std::streamsize outputLength); - - std::streamsize finalize(unsigned char* output, std::streamsize length); - - private: - DWORD encrypt(unsigned char* output, std::streamsize outputLength, BOOL isFinal); - - const ServiceProvider& _rsa; - RSAPaddingMode _paddingMode; - std::streamsize _pos; - unsigned char* _pBuf; - }; - - - RSAEncryptImpl::RSAEncryptImpl(const ServiceProvider& rsa, RSAPaddingMode paddingMode) : - _rsa(rsa), - _paddingMode(paddingMode), - _pos(0), - _pBuf(0) - { - _pBuf = new unsigned char[blockSize()]; - } - - - RSAEncryptImpl::~RSAEncryptImpl() - { - delete [] _pBuf; - } - - - std::size_t RSAEncryptImpl::blockSize() const - { - return rsaBlockSize(_rsa); - } - - - std::size_t RSAEncryptImpl::maxDataSize() const - { - // ??? same as openssl? - std::size_t size = blockSize(); - switch (_paddingMode) - { - case RSA_PADDING_PKCS1: - case RSA_PADDING_SSLV23: - size -= 11; - break; - case RSA_PADDING_PKCS1_OAEP: - size -= 41; - break; - default: - break; - } - return size; - } - - DWORD RSAEncryptImpl::encrypt(unsigned char* output, std::streamsize outputLength, BOOL isFinal) - { - DWORD n = static_cast(_pos + 1); - if (!CryptEncrypt(_rsa.handle(), NULL, isFinal, 0, NULL, &n, 0)) - throwError(); - poco_assert(n > _pos); - poco_assert_dbg(n <= maxDataSize()); - std::vector data(n); - n = static_cast(_pos + 1); - std::memcpy(&data[0], _pBuf, n); - if (!CryptEncrypt(_rsa.handle(), NULL, isFinal, 0, &data[0], &n, n)) - throwError(); - poco_assert(n <= outputLength); - std::memcpy(output, &data[0], n); - return n; - } - - std::streamsize RSAEncryptImpl::transform(const unsigned char* input, - std::streamsize inputLength, - unsigned char* output, - std::streamsize outputLength) - { - // always fill up the buffer before writing! - std::streamsize maxSize = static_cast(maxDataSize()); - std::streamsize rsaSize = static_cast(blockSize()); - poco_assert_dbg(_pos <= maxSize); - poco_assert (outputLength >= rsaSize); - int rc = 0; - while (inputLength > 0) - { - // check how many data bytes we are missing to get the buffer full - poco_assert_dbg (maxSize >= _pos); - std::streamsize missing = maxSize - _pos; - if (missing == 0) - { - poco_assert (outputLength >= rsaSize); - //int n = 0; - //int n = RSA_public_encrypt(static_cast(maxSize), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); - DWORD n = encrypt(output, outputLength, FALSE); - rc += n; - output += n; - outputLength -= n; - _pos = 0; - } - else - { - if (missing > inputLength) - missing = inputLength; - - std::memcpy(_pBuf + _pos, input, static_cast(missing)); - input += missing; - _pos += missing; - inputLength -= missing; - } - } - return rc; - } - - - std::streamsize RSAEncryptImpl::finalize(unsigned char* output, std::streamsize length) - { - poco_assert (length >= blockSize()); - poco_assert (_pos <= maxDataSize()); - int rc = 0; - if (_pos > 0) - { - //rc = RSA_public_encrypt(static_cast(_pos), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); - //if (rc == -1) throwError(); - rc = encrypt(output, length, TRUE); - } - return rc; - } - - - class RSADecryptImpl: public CryptoTransform - { - public: - RSADecryptImpl(const ServiceProvider& rsa, RSAPaddingMode paddingMode); - ~RSADecryptImpl(); - - std::size_t blockSize() const; - - std::streamsize transform( - const unsigned char* input, - std::streamsize inputLength, - unsigned char* output, - std::streamsize outputLength); - - std::streamsize finalize( - unsigned char* output, - std::streamsize length); - - private: - DWORD decrypt(unsigned char* output, std::streamsize outputLength, BOOL isFinal); - - const ServiceProvider& _rsa; - RSAPaddingMode _paddingMode; - std::streamsize _pos; - unsigned char* _pBuf; - }; - - - RSADecryptImpl::RSADecryptImpl(const ServiceProvider& rsa, RSAPaddingMode paddingMode) : - _rsa(rsa), - _paddingMode(paddingMode), - _pos(0), - _pBuf(0) - { - _pBuf = new unsigned char[blockSize()]; - } - - - RSADecryptImpl::~RSADecryptImpl() - { - delete [] _pBuf; - } - - - std::size_t RSADecryptImpl::blockSize() const - { - return rsaBlockSize(_rsa); - } - - DWORD RSADecryptImpl::decrypt(unsigned char* output, std::streamsize outputLength, BOOL isFinal) - { - DWORD n = static_cast(_pos + 1); - if (!CryptDecrypt(_rsa.handle(), NULL, isFinal, 0, NULL, &n)) - throwError(); - poco_assert(n > _pos); - //poco_assert_dbg(n <= maxDataSize()); - std::vector data(n); - n = static_cast(_pos + 1); - std::memcpy(&data[0], _pBuf, n); - if (!CryptDecrypt(_rsa.handle(), NULL, isFinal, 0, &data[0], &n)) - throwError(); - poco_assert(n <= outputLength); - std::memcpy(output, &data[0], n); - return n; - } - - - std::streamsize RSADecryptImpl::transform( - const unsigned char* input, - std::streamsize inputLength, - unsigned char* output, - std::streamsize outputLength) - { - - // always fill up the buffer before decrypting! - std::streamsize rsaSize = static_cast(blockSize()); - poco_assert_dbg(_pos <= rsaSize); - poco_assert (outputLength >= rsaSize); - int rc = 0; - while (inputLength > 0) - { - // check how many data bytes we are missing to get the buffer full - poco_assert_dbg (rsaSize >= _pos); - std::streamsize missing = rsaSize - _pos; - if (missing == 0) - { - //int tmp = RSA_private_decrypt(static_cast(rsaSize), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); - DWORD tmp = decrypt(output, outputLength, FALSE); - if (tmp == -1) - throwError(); - rc += tmp; - output += tmp; - outputLength -= tmp; - _pos = 0; - - } - else - { - if (missing > inputLength) - missing = inputLength; - - std::memcpy(_pBuf + _pos, input, static_cast(missing)); - input += missing; - _pos += missing; - inputLength -= missing; - } - } - return rc; - } - - - std::streamsize RSADecryptImpl::finalize(unsigned char* output, std::streamsize length) - { - poco_assert (length >= blockSize()); - int rc = 0; - if (_pos > 0) - { - //rc = RSA_private_decrypt(static_cast(_pos), _pBuf, output, const_cast(_pRSA), mapPaddingMode(_paddingMode)); - rc = decrypt(output, length, TRUE); - if (rc == -1) - throwError(); - } - return rc; - } -} - - -RSACipherImpl::RSACipherImpl(const RSAKey& key, RSAPaddingMode paddingMode): - _key(key), - _paddingMode(paddingMode) -{ -} - - -RSACipherImpl::~RSACipherImpl() -{ -} - - -CryptoTransform* RSACipherImpl::createEncryptor() -{ - return new RSAEncryptImpl(_key.impl()->serviceProvider(), _paddingMode); -} - - -CryptoTransform* RSACipherImpl::createDecryptor() -{ - return new RSADecryptImpl(_key.impl()->serviceProvider(), _paddingMode); -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/RSADigestEngine.cpp b/Crypto_Win/src/RSADigestEngine.cpp deleted file mode 100644 index 0af09caf5..000000000 --- a/Crypto_Win/src/RSADigestEngine.cpp +++ /dev/null @@ -1,139 +0,0 @@ -// -// RSADigestEngine.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: RSA -// Module: RSADigestEngine -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/RSADigestEngine.h" -#include "Poco/Format.h" -#include "Poco/Error.h" -#include "Poco/Base64Encoder.h" -#include - - -namespace Poco { -namespace Crypto { - - -RSADigestEngine::RSADigestEngine(const RSAKey& key, DigestType digestType): - _key(key), - _engine(digestType == DIGEST_MD5 ? static_cast(_md5Engine) : static_cast(_sha1Engine)), - _type(digestType == DIGEST_MD5 ? szOID_RSA_MD5 : szOID_ECDSA_SHA1) -{ -} - - -RSADigestEngine::~RSADigestEngine() -{ -} - - -std::size_t RSADigestEngine::digestLength() const -{ - return _engine.digestLength(); -} - - -void RSADigestEngine::reset() -{ - _engine.reset(); - _digest.clear(); - _signature.clear(); -} - - -const DigestEngine::Digest& RSADigestEngine::digest() -{ - if (_digest.empty()) - { - _digest = _engine.digest(); - } - return _digest; -} - - -const DigestEngine::Digest& RSADigestEngine::signature() -{ - if (_signature.empty()) - { - digest(); - - std::string begin = "-----BEGIN RSA PUBLIC KEY-----\n"; - //TODO: base64 encode data and pass to CryptImportKey API - std::string sig(_digest.begin(), _digest.end()); - std::string end = "\n-----END RSA PUBLIC KEY-----"; - - std::ostringstream ostr; - Base64Encoder encoder(ostr); - encoder << sig; - encoder.close(); - - begin.append(ostr.str()).append(end); - _signature.assign(begin.begin(), begin.end()); - } - - return _signature; -} - - -bool RSADigestEngine::verify(const DigestEngine::Digest& sig) -{ - digest(); - - DWORD cbData = 0; - BYTE* pbData = NULL; - - if (CryptExportKey(_key.impl()->privateKey(), 0, PRIVATEKEYBLOB, 0/*???*/, - NULL, &cbData)) - { - std::vector pkData(cbData); - pbData = &pkData[0]; - - if (CryptExportKey(_key.impl()->publicKey(), 0, PRIVATEKEYBLOB, 0/*???*/, - pbData, &cbData)) - { - // TODO: base64-decode pbData - } - else // !CryptExportKey - { - DWORD err = Error::last(); - std::string errStr = Error::getMessage(err); - switch (err) - { - case ERROR_INVALID_HANDLE: case ERROR_INVALID_PARAMETER: - case NTE_BAD_DATA: case NTE_BAD_FLAGS: - case NTE_BAD_KEY: case NTE_BAD_KEY_STATE: - case NTE_BAD_PUBLIC_KEY: case NTE_BAD_TYPE: - case NTE_BAD_UID: case NTE_NO_KEY: - throw Poco::InvalidArgumentException(errStr); - default: - throw Poco::SystemException("Cannot export public key."); - } - } - } - else // !CryptExportKey length - { - throw Poco::SystemException("Cannot obtain key export length."); - } - - return false; -} - - -void RSADigestEngine::updateImpl(const void* data, std::size_t length) -{ - _engine.update(data, length); -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/RSAKey.cpp b/Crypto_Win/src/RSAKey.cpp deleted file mode 100644 index 58cf677a3..000000000 --- a/Crypto_Win/src/RSAKey.cpp +++ /dev/null @@ -1,88 +0,0 @@ -// -// RSAKey.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: RSA -// Module: RSAKey -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/RSAKey.h" - - -// TODO: this is still OpenSSL code - - -namespace Poco { -namespace Crypto { - - -RSAKey::RSAKey(const X509Certificate& cert): - _pImpl(new RSAKeyImpl(cert)) -{ -} - - -RSAKey::RSAKey(KeyLength keyLength, Exponent): - _pImpl(0) -{ - // Exponent is not supported and ignored - _pImpl = new RSAKeyImpl(keyLength, 0); -} - - -RSAKey::RSAKey(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase): - _pImpl(new RSAKeyImpl(publicKeyFile, privateKeyFile, privateKeyPassphrase)) -{ -} - - -RSAKey::RSAKey(std::istream* pPublicKeyStream, std::istream* pPrivateKeyStream, const std::string& privateKeyPassphrase): - _pImpl(new RSAKeyImpl(pPublicKeyStream, pPrivateKeyStream, privateKeyPassphrase)) -{ -} - - -RSAKey::~RSAKey() -{ -} - - -int RSAKey::size() const -{ - return _pImpl->size(); -} - - -void RSAKey::save(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase) -{ - _pImpl->save(publicKeyFile, privateKeyFile, privateKeyPassphrase); -} - - -void RSAKey::save(std::ostream* pPublicKeyStream, std::ostream* pPrivateKeyStream, const std::string& privateKeyPassphrase) -{ - _pImpl->save(pPublicKeyStream, pPrivateKeyStream, privateKeyPassphrase); -} - - -namespace -{ - static const std::string RSA("rsa"); -} - - -const std::string& RSAKey::name() const -{ - return RSA; -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/RSAKeyImpl.cpp b/Crypto_Win/src/RSAKeyImpl.cpp deleted file mode 100644 index 179cc5384..000000000 --- a/Crypto_Win/src/RSAKeyImpl.cpp +++ /dev/null @@ -1,184 +0,0 @@ -// -// RSAKeyImpl.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: RSA -// Module: RSAKeyImpl -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/RSAKeyImpl.h" -#include "Poco/Crypto/X509Certificate.h" -#include "Poco/FileStream.h" -#include "Poco/StreamCopier.h" -#include "Poco/Buffer.h" -#include "Poco/MemoryStream.h" -#include "Poco/Base64Decoder.h" -#include "Poco/Base64Encoder.h" -#include - - -// TODO: this is partially implemented. PEM handling needs to be done. - - -namespace Poco { -namespace Crypto { - - -RSAKeyImpl::RSAKeyImpl(const X509Certificate& cert): - _hPrivateKey(0), - _hPublicKey(0) -{ - DWORD rc = CryptImportPublicKeyInfo(_sp.handle(), X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, &cert.system()->pCertInfo->SubjectPublicKeyInfo, &_hPublicKey); - if (!rc) throw Poco::SystemException("Cannot import public key from certificate"); -} - - -RSAKeyImpl::RSAKeyImpl(int keyLength, unsigned long exponent): - _hPrivateKey(0), - _hPublicKey(0) -{ - DWORD flags = keyLength << 16; - flags |= CRYPT_EXPORTABLE; - DWORD rc = CryptGenKey(_sp.handle(), AT_SIGNATURE, flags, &_hPrivateKey); - if (!rc) throw Poco::SystemException("Cannot generate RSA key pair"); - - DWORD size = 0; - rc = CryptExportPublicKeyInfo(_sp.handle(), AT_SIGNATURE, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, NULL, &size); - if (rc) - { - Poco::Buffer keyBuffer(size); - rc = CryptExportPublicKeyInfo(_sp.handle(), AT_SIGNATURE, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, reinterpret_cast(keyBuffer.begin()), &size); - if (rc) - { - rc = CryptImportPublicKeyInfo(_sp.handle(), X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, reinterpret_cast(keyBuffer.begin()), &_hPublicKey); - } - } - if (!rc) - { - CryptDestroyKey(_hPrivateKey); - throw Poco::SystemException("Cannot extract public key"); - } -} - - -RSAKeyImpl::RSAKeyImpl(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase): - _hPrivateKey(0), - _hPublicKey(0) -{ - if (!privateKeyFile.empty()) - { - Poco::FileInputStream istr(privateKeyFile); - loadPrivateKey(istr); - } - if (!publicKeyFile.empty()) - { - Poco::FileInputStream istr(publicKeyFile); - loadPublicKey(istr); - } -} - - -RSAKeyImpl::RSAKeyImpl(std::istream* pPublicKeyStream, std::istream* pPrivateKeyStream, const std::string& privateKeyPassphrase): - _hPrivateKey(0), - _hPublicKey(0) -{ - if (pPrivateKeyStream) - { - loadPrivateKey(*pPrivateKeyStream); - } - if (pPublicKeyStream) - { - loadPublicKey(*pPublicKeyStream); - } -} - - -RSAKeyImpl::~RSAKeyImpl() -{ - if (_hPrivateKey) CryptDestroyKey(_hPrivateKey); - if (_hPublicKey) CryptDestroyKey(_hPublicKey); -} - - -int RSAKeyImpl::size() const -{ - BYTE keyLength; - DWORD size = sizeof(keyLength); - if (!CryptGetKeyParam(_hPrivateKey, KP_KEYLEN, &keyLength, &size, 0)) - throw Poco::SystemException("Cannot obtain key length"); - return static_cast(keyLength); -} - - -void RSAKeyImpl::save(const std::string& publicKeyFile, const std::string& privateKeyFile, const std::string& privateKeyPassphrase) -{ - if (_hPrivateKey && !privateKeyFile.empty()) - { - Poco::FileOutputStream ostr(privateKeyFile); - savePrivateKey(ostr); - } - if (_hPublicKey && !publicKeyFile.empty()) - { - Poco::FileOutputStream ostr(publicKeyFile); - savePublicKey(ostr); - } -} - - -void RSAKeyImpl::save(std::ostream* pPublicKeyStream, std::ostream* pPrivateKeyStream, const std::string& privateKeyPassphrase) -{ - if (_hPrivateKey && pPrivateKeyStream) - { - savePrivateKey(*pPrivateKeyStream); - } - if (_hPublicKey && pPublicKeyStream) - { - savePublicKey(*pPublicKeyStream); - } -} - - -void RSAKeyImpl::loadPrivateKey(std::istream& istr) -{ - std::string data; - std::string der; - Poco::StreamCopier::copyToString(istr, data); - if (data.compare(0, 31, "-----BEGIN RSA PRIVATE KEY-----") == 0) - { - const char* pemBegin = data.data() + 31; - const char* pemEnd = data.data() + data.size() - 29; - while (pemEnd > pemBegin && std::memcmp(pemEnd, "-----END RSA PRIVATE KEY-----", 29) != 0) --pemEnd; - if (pemEnd == pemBegin) throw Poco::DataFormatException("Not a valid PEM file - end marker missing"); - - Poco::MemoryInputStream mis(pemBegin, pemEnd - pemBegin); - Poco::Base64Decoder dec(mis); - Poco::StreamCopier::copyToString(dec, der); - } - -} - - -void RSAKeyImpl::loadPublicKey(std::istream& istr) -{ -} - - -void RSAKeyImpl::savePrivateKey(std::ostream& ostr) -{ -} - - -void RSAKeyImpl::savePublicKey(std::ostream& ostr) -{ -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/ServiceProvider.cpp b/Crypto_Win/src/ServiceProvider.cpp deleted file mode 100644 index e26dcfba4..000000000 --- a/Crypto_Win/src/ServiceProvider.cpp +++ /dev/null @@ -1,57 +0,0 @@ -// -// ServiceProvider.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: CryptoCore -// Module: ServiceProvider -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/ServiceProvider.h" -#include "Poco/Exception.h" - - -namespace Poco { -namespace Crypto { - - -ServiceProvider::ServiceProvider() -{ - BOOL ok = CryptAcquireContext( - &_handle, - NULL, - MS_ENH_RSA_AES_PROV, - PROV_RSA_AES, - CRYPT_VERIFYCONTEXT | CRYPT_SILENT); - if (!ok) - { - DWORD err = GetLastError(); - throw Poco::SystemException("Cannot acquire crypt context", err); - } -} - - -ServiceProvider::~ServiceProvider() -{ - CryptReleaseContext(_handle, 0); -} - - -void initializeCrypto() -{ -} - - -void uninitializeCrypto() -{ -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/src/X509Certificate.cpp b/Crypto_Win/src/X509Certificate.cpp deleted file mode 100644 index 052f1acd5..000000000 --- a/Crypto_Win/src/X509Certificate.cpp +++ /dev/null @@ -1,468 +0,0 @@ -// -// X509Certificate.cpp -// -// $Id$ -// -// Library: Crypto_Win -// Package: Certificate -// Module: X509Certificate -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Crypto/X509Certificate.h" -#include "Poco/StreamCopier.h" -#include "Poco/String.h" -#include "Poco/DateTimeParser.h" -#include "Poco/Base64Encoder.h" -#include "Poco/Base64Decoder.h" -#include "Poco/File.h" -#include "Poco/FileStream.h" -#include "Poco/MemoryStream.h" -#include "Poco/Buffer.h" -#include "Poco/UnicodeConverter.h" -#include "Poco/Format.h" - - -namespace Poco { -namespace Crypto { - - -X509Certificate::X509Certificate(const std::string& path): - _pCert(0) -{ - importCertificate(path); - init(); -} - - -X509Certificate::X509Certificate(std::istream& istr): - _pCert(0) -{ - importCertificate(istr); - init(); -} - - -X509Certificate::X509Certificate(const std::string& certName, const std::string& certStoreName, bool useMachineStore): - _pCert(0) -{ - loadCertificate(certName, certStoreName, useMachineStore); - init(); -} - - -X509Certificate::X509Certificate(PCCERT_CONTEXT pCert): - _pCert(pCert) -{ - poco_check_ptr(_pCert); - - init(); -} - - -X509Certificate::X509Certificate(const X509Certificate& cert): - _issuerName(cert._issuerName), - _subjectName(cert._subjectName), - _pCert(cert._pCert) -{ - _pCert = CertDuplicateCertificateContext(_pCert); -} - - -X509Certificate::X509Certificate(PCCERT_CONTEXT pCert, bool shared): - _pCert(pCert) -{ - poco_check_ptr(_pCert); - - if (shared) - { - _pCert = CertDuplicateCertificateContext(_pCert); - } - - init(); -} - - -X509Certificate& X509Certificate::operator = (const X509Certificate& cert) -{ - X509Certificate tmp(cert); - swap(tmp); - return *this; -} - - -void X509Certificate::swap(X509Certificate& cert) -{ - using std::swap; - swap(cert._issuerName, _issuerName); - swap(cert._subjectName, _subjectName); - swap(cert._pCert, _pCert); -} - - -X509Certificate::~X509Certificate() -{ - CertFreeCertificateContext(_pCert); -} - - -void X509Certificate::init() -{ - std::string name = issuerName(NID_COUNTRY); - if (!name.empty()) - { - _issuerName += "/C="; - _issuerName += name; - } - name = issuerName(NID_STATE_OR_PROVINCE); - if (!name.empty()) - { - _issuerName += "/ST="; - _issuerName += name; - } - name = issuerName(NID_LOCALITY_NAME); - if (!name.empty()) - { - _issuerName += "/L="; - _issuerName += name; - } - name = issuerName(NID_ORGANIZATION_NAME); - if (!name.empty()) - { - _issuerName += "/O="; - _issuerName += name; - } - name = issuerName(NID_ORGANIZATION_UNIT_NAME); - if (!name.empty()) - { - _issuerName += "/OU="; - _issuerName += name; - } - name = issuerName(NID_COMMON_NAME); - if (!name.empty()) - { - _issuerName += "/CN="; - _issuerName += name; - } - - name = subjectName(NID_COUNTRY); - if (!name.empty()) - { - _subjectName += "/C="; - _subjectName += name; - } - name = subjectName(NID_STATE_OR_PROVINCE); - if (!name.empty()) - { - _subjectName += "/ST="; - _subjectName += name; - } - name = subjectName(NID_LOCALITY_NAME); - if (!name.empty()) - { - _subjectName += "/L="; - _subjectName += name; - } - name = subjectName(NID_ORGANIZATION_NAME); - if (!name.empty()) - { - _subjectName += "/O="; - _subjectName += name; - } - name = subjectName(NID_ORGANIZATION_UNIT_NAME); - if (!name.empty()) - { - _subjectName += "/OU="; - _subjectName += name; - } - name = subjectName(NID_COMMON_NAME); - if (!name.empty()) - { - _subjectName += "/CN="; - _subjectName += name; - } -} - - -std::string X509Certificate::commonName() const -{ - return subjectName(NID_COMMON_NAME); -} - - -std::string X509Certificate::issuerName(NID nid) const -{ - std::string result; - DWORD size = CertGetNameStringW(_pCert, CERT_NAME_ATTR_TYPE, CERT_NAME_ISSUER_FLAG, nid2oid(nid), 0, 0); - Poco::Buffer data(size); - CertGetNameStringW(_pCert, CERT_NAME_ATTR_TYPE, CERT_NAME_ISSUER_FLAG, nid2oid(nid), data.begin(), size); - Poco::UnicodeConverter::convert(data.begin(), result); - return result; -} - - -std::string X509Certificate::subjectName(NID nid) const -{ - std::string result; - DWORD size = CertGetNameStringW(_pCert, CERT_NAME_ATTR_TYPE, 0, nid2oid(nid), 0, 0); - Poco::Buffer data(size); - CertGetNameStringW(_pCert, CERT_NAME_ATTR_TYPE, 0, nid2oid(nid), data.begin(), size); - Poco::UnicodeConverter::convert(data.begin(), result); - return result; -} - - -void X509Certificate::extractNames(std::string& cmnName, std::set& domainNames) const -{ - domainNames.clear(); - cmnName = commonName(); - PCERT_EXTENSION pExt = _pCert->pCertInfo->rgExtension; - for (int i = 0; i < _pCert->pCertInfo->cExtension; i++, pExt++) - { - if (std::strcmp(pExt->pszObjId, szOID_SUBJECT_ALT_NAME2) == 0) - { - DWORD flags(0); -#if defined(CRYPT_DECODE_ENABLE_PUNYCODE_FLAG) - flags |= CRYPT_DECODE_ENABLE_PUNYCODE_FLAG; -#endif - Poco::Buffer buffer(256); - DWORD bufferSize = buffer.sizeBytes(); - BOOL rc = CryptDecodeObjectEx( - X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, - pExt->pszObjId, - pExt->Value.pbData, - pExt->Value.cbData, - flags, - 0, - buffer.begin(), - &bufferSize); - if (!rc && GetLastError() == ERROR_MORE_DATA) - { - buffer.resize(bufferSize); - rc = CryptDecodeObjectEx( - X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, - pExt->pszObjId, - pExt->Value.pbData, - pExt->Value.cbData, - flags, - 0, - buffer.begin(), - &bufferSize); - } - if (rc) - { - PCERT_ALT_NAME_INFO pNameInfo = reinterpret_cast(buffer.begin()); - for (int i = 0; i < pNameInfo->cAltEntry; i++) - { - std::wstring waltName(pNameInfo->rgAltEntry[i].pwszDNSName); - std::string altName; - Poco::UnicodeConverter::toUTF8(waltName, altName); - domainNames.insert(altName); - } - } - } - } - if (!cmnName.empty() && domainNames.empty()) - { - domainNames.insert(cmnName); - } -} - - -Poco::DateTime X509Certificate::validFrom() const -{ - Poco::Timestamp ts = Poco::Timestamp::fromFileTimeNP(_pCert->pCertInfo->NotBefore.dwLowDateTime, _pCert->pCertInfo->NotBefore.dwHighDateTime); - return Poco::DateTime(ts); -} - - -Poco::DateTime X509Certificate::expiresOn() const -{ - Poco::Timestamp ts = Poco::Timestamp::fromFileTimeNP(_pCert->pCertInfo->NotAfter.dwLowDateTime, _pCert->pCertInfo->NotAfter.dwHighDateTime); - return Poco::DateTime(ts); -} - - -bool X509Certificate::issuedBy(const X509Certificate& issuerCertificate) const -{ - CERT_CHAIN_PARA chainPara; - PCCERT_CHAIN_CONTEXT pChainContext = 0; - std::memset(&chainPara, 0, sizeof(chainPara)); - chainPara.cbSize = sizeof(chainPara); - - if (!CertGetCertificateChain( - NULL, - _pCert, - NULL, - NULL, - &chainPara, - 0, - NULL, - &pChainContext)) - { - throw SystemException("Cannot get certificate chain", subjectName(), GetLastError()); - } - - bool result = false; - for (DWORD i = 0; i < pChainContext->cChain && !result; i++) - { - for (DWORD k = 0; k < pChainContext->rgpChain[i]->cElement && !result; k++) - { - PCCERT_CONTEXT pChainCert = pChainContext->rgpChain[i]->rgpElement[k]->pCertContext; - if (CertCompareCertificate(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, issuerCertificate.system()->pCertInfo, pChainCert->pCertInfo)) - { - if (CertComparePublicKeyInfo(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, &issuerCertificate.system()->pCertInfo->SubjectPublicKeyInfo, &pChainCert->pCertInfo->SubjectPublicKeyInfo)) - { - result = true; - } - } - } - } - CertFreeCertificateChain(pChainContext); - return result; -} - - -void* X509Certificate::nid2oid(NID nid) -{ - const char* result = 0; - switch (nid) - { - case NID_COMMON_NAME: - result = szOID_COMMON_NAME; - break; - case NID_COUNTRY: - result = szOID_COUNTRY_NAME; - break; - case NID_LOCALITY_NAME: - result = szOID_LOCALITY_NAME; - break; - case NID_STATE_OR_PROVINCE: - result = szOID_STATE_OR_PROVINCE_NAME; - break; - case NID_ORGANIZATION_NAME: - result = szOID_ORGANIZATION_NAME; - break; - case NID_ORGANIZATION_UNIT_NAME: - result = szOID_ORGANIZATIONAL_UNIT_NAME; - break; - default: - poco_bugcheck(); - result = ""; - break; - } - return const_cast(result); -} - - -void X509Certificate::loadCertificate(const std::string& certName, const std::string& certStoreName, bool useMachineStore) -{ - std::wstring wcertStore; - Poco::UnicodeConverter::convert(certStoreName, wcertStore); - HCERTSTORE hCertStore; - if (useMachineStore) - hCertStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE, certStoreName.c_str()); - else - hCertStore = CertOpenSystemStoreW(0, wcertStore.c_str()); - - if (!hCertStore) throw SystemException("Failed to open certificate store", certStoreName, GetLastError()); - - CERT_RDN_ATTR cert_rdn_attr; - cert_rdn_attr.pszObjId = szOID_COMMON_NAME; - cert_rdn_attr.dwValueType = CERT_RDN_ANY_TYPE; - cert_rdn_attr.Value.cbData = static_cast(certName.size()); - cert_rdn_attr.Value.pbData = reinterpret_cast(const_cast(certName.c_str())); - - CERT_RDN cert_rdn; - cert_rdn.cRDNAttr = 1; - cert_rdn.rgRDNAttr = &cert_rdn_attr; - - _pCert = CertFindCertificateInStore(hCertStore, X509_ASN_ENCODING, 0, CERT_FIND_SUBJECT_ATTR, &cert_rdn, NULL); - if (!_pCert) - { - CertCloseStore(hCertStore, 0); - throw NotFoundException(Poco::format("Failed to find certificate %s in store %s", certName, certStoreName)); - } - CertCloseStore(hCertStore, 0); -} - - -void X509Certificate::importCertificate(const std::string& certPath) -{ - Poco::File certFile(certPath); - if (!certFile.exists()) throw Poco::FileNotFoundException(certPath); - Poco::File::FileSize size = certFile.getSize(); - if (size > 4096) throw Poco::DataFormatException("certificate file too large", certPath); - if (size < 32) throw Poco::DataFormatException("certificate file too small", certPath); - Poco::Buffer buffer(static_cast(size)); - Poco::FileInputStream istr(certPath); - istr.read(buffer.begin(), buffer.size()); - if (istr.gcount() != size) throw Poco::IOException("error reading certificate file"); - importCertificate(buffer.begin(), buffer.size()); -} - - -void X509Certificate::importCertificate(std::istream& istr) -{ - std::string data; - Poco::StreamCopier::copyToString(istr, data); - if (!data.empty()) - { - importCertificate(data.data(), data.size()); - } - else throw Poco::IOException("failed to read certificate from stream"); -} - - -void X509Certificate::importCertificate(const char* pBuffer, std::size_t size) -{ - if (std::memcmp(pBuffer, "-----BEGIN CERTIFICATE-----", 27) == 0) - importPEMCertificate(pBuffer + 27, size - 27); - else - importDERCertificate(pBuffer, size); -} - - -void X509Certificate::importPEMCertificate(const char* pBuffer, std::size_t size) -{ - Poco::Buffer derBuffer(size); - std::size_t derSize = 0; - - const char* pemBegin = pBuffer; - const char* pemEnd = pemBegin + (size - 25); - while (pemEnd > pemBegin && std::memcmp(pemEnd, "-----END CERTIFICATE-----", 25) != 0) --pemEnd; - if (pemEnd == pemBegin) throw Poco::DataFormatException("Not a valid PEM file - end marker missing"); - - Poco::MemoryInputStream istr(pemBegin, pemEnd - pemBegin); - Poco::Base64Decoder dec(istr); - - char* derBegin = derBuffer.begin(); - char* derEnd = derBegin; - - int ch = dec.get(); - while (ch != -1) - { - *derEnd++ = static_cast(ch); - ch = dec.get(); - } - - importDERCertificate(derBegin, derEnd - derBegin); -} - - -void X509Certificate::importDERCertificate(const char* pBuffer, std::size_t size) -{ - _pCert = CertCreateCertificateContext(X509_ASN_ENCODING, reinterpret_cast(pBuffer), static_cast(size)); - if (!_pCert) - { - throw Poco::DataFormatException("Failed to load certificate from file", GetLastError()); - } -} - - -} } // namespace Poco::Crypto diff --git a/Crypto_Win/testsuite/Makefile b/Crypto_Win/testsuite/Makefile deleted file mode 100644 index d19251715..000000000 --- a/Crypto_Win/testsuite/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# -# Makefile -# -# $Id: //poco/1.4/Crypto/testsuite/Makefile#3 $ -# -# Makefile for Poco Crypto testsuite -# - -include $(POCO_BASE)/build/rules/global - -SYSLIBS += -lssl -lcrypto -lz -ldl - -objects = CryptoTestSuite Driver \ - CryptoTest RSATest DigestEngineTest - -target = testrunner -target_version = 1 -target_libs = PocoCrypto PocoFoundation CppUnit - -include $(POCO_BASE)/build/rules/exec diff --git a/Crypto_Win/testsuite/TestSuite.progen b/Crypto_Win/testsuite/TestSuite.progen deleted file mode 100644 index c89e97373..000000000 --- a/Crypto_Win/testsuite/TestSuite.progen +++ /dev/null @@ -1,16 +0,0 @@ -vc.project.guid = C1B1BB96-5198-48EB-AB48-9A0A0B54FB15 -vc.project.name = TestSuite -vc.project.target = TestSuite -vc.project.type = testsuite -vc.project.pocobase = ..\\.. -vc.project.platforms = Win32, x64, WinCE -vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md -vc.project.prototype = TestSuite_vs90.vcproj -vc.project.compiler.include = ..\\..\\Foundation\\include -vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib -vc.project.linker.dependencies.debug_shared = libeay32.lib ssleay32.lib -vc.project.linker.dependencies.release_shared = libeay32.lib ssleay32.lib -vc.project.linker.dependencies.debug_static_md = libeay32mdd.lib ssleay32mdd.lib Crypt32.lib -vc.project.linker.dependencies.release_static_md = libeay32md.lib ssleay32md.lib Crypt32.lib -vc.project.linker.dependencies.debug_static_mt = libeay32mtd.lib ssleay32mtd.lib Crypt32.lib -vc.project.linker.dependencies.release_static_mt = libeay32mt.lib ssleay32mt.lib Crypt32.lib diff --git a/Crypto_Win/testsuite/TestSuite_CE_VS90.vcproj b/Crypto_Win/testsuite/TestSuite_CE_VS90.vcproj deleted file mode 100644 index ceb77974c..000000000 --- a/Crypto_Win/testsuite/TestSuite_CE_VS90.vcproj +++ /dev/null @@ -1,509 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_VS71.vcproj b/Crypto_Win/testsuite/TestSuite_VS71.vcproj deleted file mode 100644 index c0ae60630..000000000 --- a/Crypto_Win/testsuite/TestSuite_VS71.vcproj +++ /dev/null @@ -1,450 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_VS80.vcproj b/Crypto_Win/testsuite/TestSuite_VS80.vcproj deleted file mode 100644 index 58aae6b01..000000000 --- a/Crypto_Win/testsuite/TestSuite_VS80.vcproj +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_VS90.vcproj b/Crypto_Win/testsuite/TestSuite_VS90.vcproj deleted file mode 100644 index 24a50dc36..000000000 --- a/Crypto_Win/testsuite/TestSuite_VS90.vcproj +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_WEC2013_vs110.vcxproj b/Crypto_Win/testsuite/TestSuite_WEC2013_vs110.vcxproj deleted file mode 100644 index 87cedf439..000000000 --- a/Crypto_Win/testsuite/TestSuite_WEC2013_vs110.vcxproj +++ /dev/null @@ -1,324 +0,0 @@ - - - - - debug_shared - SDK_AM335X_SK_WEC2013_V300 - - - debug_static_md - SDK_AM335X_SK_WEC2013_V300 - - - debug_static_mt - SDK_AM335X_SK_WEC2013_V300 - - - release_shared - SDK_AM335X_SK_WEC2013_V300 - - - release_static_md - SDK_AM335X_SK_WEC2013_V300 - - - release_static_mt - SDK_AM335X_SK_WEC2013_V300 - - - - TestSuite - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15} - en-US - 11.0 - true - SDK_AM335X_SK_WEC2013_V300 - CE800 - - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.61030.0 - TestSuited - TestSuited - TestSuited - TestSuite - TestSuite - TestSuite - - - bin\$(Platform)\shared\ - obj\TestSuite\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\shared\ - obj\TestSuite\$(Platform)\$(Configuration)\ - false - - - bin\$(Platform)\static_mt\ - obj\TestSuite\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\static_mt\ - obj\TestSuite\$(Platform)\$(Configuration)\ - false - - - bin\$(Platform)\static_md\ - obj\TestSuite\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\static_md\ - obj\TestSuite\$(Platform)\$(Configuration)\ - false - - - - Win32 - - - Disabled - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitd.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin\$(Platform)\shared\TestSuited.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\shared\TestSuited.pdb - wmainCRTStartup - WindowsCE - - - - - Win32 - - - MaxSpeed - true - Speed - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - Level3 - ProgramDatabase - - - CppUnit.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin\$(Platform)\shared\TestSuite.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - wmainCRTStartup - WindowsCE - - - - - Win32 - - - Disabled - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebug - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmtd.lib;iphlpapi.lib;ws2_32.lib;iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;%(AdditionalDependencies) - bin\$(Platform)\static_mt\TestSuited.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\static_mt\TestSuited.pdb - wmainCRTStartup - WindowsCE - - - - - Win32 - - - MaxSpeed - Default - true - Speed - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreaded - false - true - - Level3 - ProgramDatabase - Default - - - CppUnitmt.lib;iphlpapi.lib;ws2_32.lib;iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;%(AdditionalDependencies) - bin\$(Platform)\static_mt\TestSuite.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - wmainCRTStartup - WindowsCE - - - - - Win32 - - - Disabled - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmdd.lib;iphlpapi.lib;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;%(AdditionalDependencies) - bin\$(Platform)\static_md\TestSuited.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\static_md\TestSuited.pdb - wmainCRTStartup - WindowsCE - - - - - Win32 - - - MaxSpeed - Default - true - Speed - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - - Level3 - ProgramDatabase - Default - - - CppUnitmd.lib;iphlpapi.lib;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;%(AdditionalDependencies) - bin\$(Platform)\static_md\TestSuite.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - wmainCRTStartup - WindowsCE - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_WEC2013_vs110.vcxproj.filters b/Crypto_Win/testsuite/TestSuite_WEC2013_vs110.vcxproj.filters deleted file mode 100644 index 238b7c2a9..000000000 --- a/Crypto_Win/testsuite/TestSuite_WEC2013_vs110.vcxproj.filters +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {35788f54-4635-4e8e-aada-d9474c81c412} - - - {32feaf9c-ea41-44f3-9f06-e68a4cfddd0b} - - - {aa5742fa-c814-4a79-8a22-a1ff8cb65010} - - - {4e51160e-257f-4035-8a01-35ae6a9cce13} - - - {b3006fef-ad80-4508-acba-31477fae9f53} - - - {b36a58f6-443c-4d65-bf06-b70e8c7c4570} - - - {365e7b52-b6d7-4b31-9d64-793bde0e441c} - - - {098cbdea-c14a-4512-91fd-1a03177b3d44} - - - - - Crypto\Header Files - - - Crypto\Header Files - - - Crypto\Header Files - - - _Suite\Header Files - - - - - Crypto\Header Files - - - Crypto\Source Files - - - Crypto\Source Files - - - _Suite\Source Files - - - _Driver\Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/testsuite/TestSuite_WEC2013_vs120.vcxproj b/Crypto_Win/testsuite/TestSuite_WEC2013_vs120.vcxproj deleted file mode 100644 index b8e37f1aa..000000000 --- a/Crypto_Win/testsuite/TestSuite_WEC2013_vs120.vcxproj +++ /dev/null @@ -1,324 +0,0 @@ - - - - - debug_shared - SDK_AM335X_SK_WEC2013_V310 - - - debug_static_md - SDK_AM335X_SK_WEC2013_V310 - - - debug_static_mt - SDK_AM335X_SK_WEC2013_V310 - - - release_shared - SDK_AM335X_SK_WEC2013_V310 - - - release_static_md - SDK_AM335X_SK_WEC2013_V310 - - - release_static_mt - SDK_AM335X_SK_WEC2013_V310 - - - - TestSuite - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15} - en-US - 11.0 - true - SDK_AM335X_SK_WEC2013_V310 - CE800 - - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - Application - Unicode - CE800 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - TestSuited - TestSuited - TestSuited - TestSuite - TestSuite - TestSuite - - - bin\$(Platform)\shared\ - obj\TestSuite\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\shared\ - obj\TestSuite\$(Platform)\$(Configuration)\ - false - - - bin\$(Platform)\static_mt\ - obj\TestSuite\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\static_mt\ - obj\TestSuite\$(Platform)\$(Configuration)\ - false - - - bin\$(Platform)\static_md\ - obj\TestSuite\$(Platform)\$(Configuration)\ - true - - - bin\$(Platform)\static_md\ - obj\TestSuite\$(Platform)\$(Configuration)\ - false - - - - Win32 - - - Disabled - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitd.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin\$(Platform)\shared\TestSuited.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\shared\TestSuited.pdb - wmainCRTStartup - WindowsCE - - - - - Win32 - - - MaxSpeed - true - Speed - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - Level3 - ProgramDatabase - - - CppUnit.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin\$(Platform)\shared\TestSuite.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - wmainCRTStartup - WindowsCE - - - - - Win32 - - - Disabled - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebug - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmtd.lib;iphlpapi.lib;ws2_32.lib;iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;%(AdditionalDependencies) - bin\$(Platform)\static_mt\TestSuited.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\static_mt\TestSuited.pdb - wmainCRTStartup - WindowsCE - - - - - Win32 - - - MaxSpeed - Default - true - Speed - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreaded - false - true - - Level3 - ProgramDatabase - Default - - - CppUnitmt.lib;iphlpapi.lib;ws2_32.lib;iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;%(AdditionalDependencies) - bin\$(Platform)\static_mt\TestSuite.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - wmainCRTStartup - WindowsCE - - - - - Win32 - - - Disabled - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - _DEBUG;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDebugDLL - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmdd.lib;iphlpapi.lib;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;%(AdditionalDependencies) - bin\$(Platform)\static_md\TestSuited.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - true - bin\$(Platform)\static_md\TestSuited.pdb - wmainCRTStartup - WindowsCE - - - - - Win32 - - - MaxSpeed - Default - true - Speed - ..\include;..\..\CppUnit\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - NDEBUG;POCO_STATIC;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - false - MultiThreadedDLL - false - true - - Level3 - ProgramDatabase - Default - - - CppUnitmd.lib;iphlpapi.lib;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;%(AdditionalDependencies) - bin\$(Platform)\static_md\TestSuite.exe - ..\..\lib\$(Platform);%(AdditionalLibraryDirectories) - false - - true - true - wmainCRTStartup - WindowsCE - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_WEC2013_vs120.vcxproj.filters b/Crypto_Win/testsuite/TestSuite_WEC2013_vs120.vcxproj.filters deleted file mode 100644 index 615c0a8a8..000000000 --- a/Crypto_Win/testsuite/TestSuite_WEC2013_vs120.vcxproj.filters +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {6b1e3817-7a3b-4e0e-9412-c9f8b28dc139} - - - {d96f6480-2f98-4aec-b4b2-4a09f79b77a3} - - - {7c1e89d6-348d-4d4b-8edb-28f84d7d1a1e} - - - {7f67f0a4-a6d1-438f-ae7e-1f16fcbc886a} - - - {a8efe410-8fff-4c39-88fc-f5be171b7c2e} - - - {44ecf9c8-77f8-4229-a186-91c1314ddc9c} - - - {378e415b-a0ca-41cb-93f3-a32d50b698ea} - - - {cef6da5c-7ff0-4230-961d-926b65549633} - - - - - Crypto\Header Files - - - Crypto\Header Files - - - Crypto\Header Files - - - _Suite\Header Files - - - - - Crypto\Header Files - - - Crypto\Source Files - - - Crypto\Source Files - - - _Suite\Source Files - - - _Driver\Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/testsuite/TestSuite_vs100.vcxproj b/Crypto_Win/testsuite/TestSuite_vs100.vcxproj deleted file mode 100644 index 612856490..000000000 --- a/Crypto_Win/testsuite/TestSuite_vs100.vcxproj +++ /dev/null @@ -1,329 +0,0 @@ - - - - - debug_shared - Win32 - - - debug_static_md - Win32 - - - debug_static_mt - Win32 - - - release_shared - Win32 - - - release_static_md - Win32 - - - release_static_mt - Win32 - - - - TestSuite - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15} - TestSuite - Win32Proj - - - - Application - Dynamic - MultiByte - - - Application - Dynamic - MultiByte - - - Application - Static - MultiByte - - - Application - Static - MultiByte - - - Application - Dynamic - MultiByte - - - Application - Dynamic - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - bin\ - obj\TestSuite\$(Configuration)\ - true - bin\ - obj\TestSuite\$(Configuration)\ - false - bin\static_mt\ - obj\TestSuite\$(Configuration)\ - true - bin\static_mt\ - obj\TestSuite\$(Configuration)\ - false - bin\static_md\ - obj\TestSuite\$(Configuration)\ - true - bin\static_md\ - obj\TestSuite\$(Configuration)\ - false - TestSuited - TestSuited - TestSuited - TestSuite - TestSuite - TestSuite - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnitd.lib;WinTestRunnerd.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin\TestSuited.exe - ..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\TestSuited.pdb - Windows - MachineX86 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnit.lib;WinTestRunner.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin\TestSuite.exe - ..\..\lib;%(AdditionalLibraryDirectories) - false - Windows - true - true - MachineX86 - %(AdditionalOptions) - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnitmtd.lib;WinTestRunnermtd.lib;iphlpapi.lib;winmm.lib;nafxcwd.lib;libcmtd.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_mt\TestSuited.exe - ..\..\lib;%(AdditionalLibraryDirectories) - nafxcwd.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries) - true - true - bin\static_mt\TestSuited.pdb - Windows - MachineX86 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnitmt.lib;WinTestRunnermt.lib;iphlpapi.lib;winmm.lib;nafxcw.lib;libcmt.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_mt\TestSuite.exe - ..\..\lib;%(AdditionalLibraryDirectories) - nafxcw.lib;libcmt.lib;%(IgnoreSpecificDefaultLibraries) - false - Windows - true - true - MachineX86 - %(AdditionalOptions) - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnitmdd.lib;WinTestRunnermdd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_md\TestSuited.exe - ..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\static_md\TestSuited.pdb - Windows - MachineX86 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnitmd.lib;WinTestRunnermd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_md\TestSuite.exe - ..\..\lib;%(AdditionalLibraryDirectories) - false - Windows - true - true - MachineX86 - %(AdditionalOptions) - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_vs100.vcxproj.filters b/Crypto_Win/testsuite/TestSuite_vs100.vcxproj.filters deleted file mode 100644 index 3c0c76eec..000000000 --- a/Crypto_Win/testsuite/TestSuite_vs100.vcxproj.filters +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {2e81c67a-6bc2-4ef9-beda-4d0dfbfd34c1} - - - {cf8362d4-6b5f-4998-86b2-2c8a74bc05be} - - - {030ab2ba-d69f-41a1-ab58-a55af058bfa3} - - - {e467705e-b0bb-462b-a4be-ea82c641fea9} - - - {e0718cf5-b95d-4dd5-8a86-3bb1e0f83960} - - - {85b7360d-2af8-492b-a685-ce9693a99c8d} - - - {de665081-1d11-40fc-bdf2-91ccc344ec79} - - - {6359537a-2511-47ca-976e-ee8c7e015955} - - - - - Crypto\Header Files - - - Crypto\Header Files - - - Crypto\Header Files - - - _Suite\Header Files - - - - - Crypto\Header Files - - - Crypto\Source Files - - - Crypto\Source Files - - - _Suite\Source Files - - - _Driver\Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/testsuite/TestSuite_vs110.vcxproj b/Crypto_Win/testsuite/TestSuite_vs110.vcxproj deleted file mode 100644 index 8997254bc..000000000 --- a/Crypto_Win/testsuite/TestSuite_vs110.vcxproj +++ /dev/null @@ -1,329 +0,0 @@ - - - - - debug_shared - Win32 - - - debug_static_md - Win32 - - - debug_static_mt - Win32 - - - release_shared - Win32 - - - release_static_md - Win32 - - - release_static_mt - Win32 - - - - TestSuite - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15} - TestSuite - Win32Proj - - - - Application - Dynamic - MultiByte - v110 - - - Application - Dynamic - MultiByte - v110 - - - Application - Static - MultiByte - v110 - - - Application - Static - MultiByte - v110 - - - Application - Dynamic - MultiByte - v110 - - - Application - Dynamic - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.61030.0 - TestSuited - TestSuited - TestSuited - TestSuite - TestSuite - TestSuite - - - bin\ - obj\TestSuite\$(Configuration)\ - true - - - bin\ - obj\TestSuite\$(Configuration)\ - false - - - bin\static_mt\ - obj\TestSuite\$(Configuration)\ - true - - - bin\static_mt\ - obj\TestSuite\$(Configuration)\ - false - - - bin\static_md\ - obj\TestSuite\$(Configuration)\ - true - - - bin\static_md\ - obj\TestSuite\$(Configuration)\ - false - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitd.lib;WinTestRunnerd.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin\TestSuited.exe - ..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\TestSuited.pdb - Windows - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - CppUnit.lib;WinTestRunner.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin\TestSuite.exe - ..\..\lib;%(AdditionalLibraryDirectories) - false - Windows - true - true - MachineX86 - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmtd.lib;WinTestRunnermtd.lib;iphlpapi.lib;winmm.lib;nafxcwd.lib;libcmtd.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_mt\TestSuited.exe - ..\..\lib;%(AdditionalLibraryDirectories) - nafxcwd.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries) - true - true - bin\static_mt\TestSuited.pdb - Windows - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - CppUnitmt.lib;WinTestRunnermt.lib;iphlpapi.lib;winmm.lib;nafxcw.lib;libcmt.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_mt\TestSuite.exe - ..\..\lib;%(AdditionalLibraryDirectories) - nafxcw.lib;libcmt.lib;%(IgnoreSpecificDefaultLibraries) - false - Windows - true - true - MachineX86 - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmdd.lib;WinTestRunnermdd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_md\TestSuited.exe - ..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\static_md\TestSuited.pdb - Windows - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - CppUnitmd.lib;WinTestRunnermd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_md\TestSuite.exe - ..\..\lib;%(AdditionalLibraryDirectories) - false - Windows - true - true - MachineX86 - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_vs110.vcxproj.filters b/Crypto_Win/testsuite/TestSuite_vs110.vcxproj.filters deleted file mode 100644 index f84a58025..000000000 --- a/Crypto_Win/testsuite/TestSuite_vs110.vcxproj.filters +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {014e77f7-846c-429b-90a3-803eedbc6e3e} - - - {d26461be-3eaa-409d-a38f-7fef85515e73} - - - {09706442-8e6d-4d7a-b711-2920437e01cd} - - - {2effe60e-7ff6-4633-8765-f48887f37d81} - - - {0d1820ab-a3da-4189-b2dc-1014f1074484} - - - {d5f7546b-05f4-48d0-a832-d646c7406c34} - - - {d4420b98-d730-43b2-b74c-0217080fcddf} - - - {b7deedad-a908-4891-b1a1-478393f76e86} - - - - - Crypto\Header Files - - - Crypto\Header Files - - - Crypto\Header Files - - - _Suite\Header Files - - - - - Crypto\Header Files - - - Crypto\Source Files - - - Crypto\Source Files - - - _Suite\Source Files - - - _Driver\Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/testsuite/TestSuite_vs120.vcxproj b/Crypto_Win/testsuite/TestSuite_vs120.vcxproj deleted file mode 100644 index a4a7933eb..000000000 --- a/Crypto_Win/testsuite/TestSuite_vs120.vcxproj +++ /dev/null @@ -1,321 +0,0 @@ - - - - - debug_shared - Win32 - - - debug_static_md - Win32 - - - debug_static_mt - Win32 - - - release_shared - Win32 - - - release_static_md - Win32 - - - release_static_mt - Win32 - - - - TestSuite - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15} - TestSuite - Win32Proj - - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - TestSuited - TestSuited - TestSuited - TestSuite - TestSuite - TestSuite - - - bin\ - obj\TestSuite\$(Configuration)\ - true - - - bin\ - obj\TestSuite\$(Configuration)\ - false - - - bin\static_mt\ - obj\TestSuite\$(Configuration)\ - true - - - bin\static_mt\ - obj\TestSuite\$(Configuration)\ - false - - - bin\static_md\ - obj\TestSuite\$(Configuration)\ - true - - - bin\static_md\ - obj\TestSuite\$(Configuration)\ - false - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitd.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin\TestSuited.exe - ..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\TestSuited.pdb - Console - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - CppUnit.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin\TestSuite.exe - ..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmtd.lib;iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_mt\TestSuited.exe - ..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\static_mt\TestSuited.pdb - Console - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - CppUnitmt.lib;iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_mt\TestSuite.exe - ..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmdd.lib;iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_md\TestSuited.exe - ..\..\lib;%(AdditionalLibraryDirectories) - true - true - bin\static_md\TestSuited.pdb - Console - MachineX86 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - CppUnitmd.lib;iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;%(AdditionalDependencies) - bin\static_md\TestSuite.exe - ..\..\lib;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX86 - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_vs120.vcxproj.filters b/Crypto_Win/testsuite/TestSuite_vs120.vcxproj.filters deleted file mode 100644 index 816c74eaa..000000000 --- a/Crypto_Win/testsuite/TestSuite_vs120.vcxproj.filters +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {459e496a-a2fc-49f8-8ca7-ca61c064d6a0} - - - {e9da8263-1ef7-4060-9753-eb696260cbaf} - - - {3124b00d-a395-4bb7-a3b9-ba5324ace3fc} - - - {9e176283-a706-49bb-9ea9-7357c5724116} - - - {9b423ac9-4414-453d-a446-f80e63510e72} - - - {3c2139b6-672a-429d-a375-33e17f986ccc} - - - {b34b91cb-3b41-47a2-8107-c21f904959fa} - - - {a407d211-28b2-4e6f-a2a2-4f8c0818f05c} - - - - - Crypto\Header Files - - - Crypto\Header Files - - - Crypto\Header Files - - - _Suite\Header Files - - - - - Crypto\Header Files - - - Crypto\Source Files - - - Crypto\Source Files - - - _Suite\Source Files - - - _Driver\Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/testsuite/TestSuite_x64_vs100.vcxproj b/Crypto_Win/testsuite/TestSuite_x64_vs100.vcxproj deleted file mode 100644 index bb7dae0fd..000000000 --- a/Crypto_Win/testsuite/TestSuite_x64_vs100.vcxproj +++ /dev/null @@ -1,329 +0,0 @@ - - - - - debug_shared - x64 - - - debug_static_md - x64 - - - debug_static_mt - x64 - - - release_shared - x64 - - - release_static_md - x64 - - - release_static_mt - x64 - - - - TestSuite - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15} - TestSuite - Win32Proj - - - - Application - Dynamic - MultiByte - - - Application - Dynamic - MultiByte - - - Application - Static - MultiByte - - - Application - Static - MultiByte - - - Application - Dynamic - MultiByte - - - Application - Dynamic - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - bin64\ - obj64\TestSuite\$(Configuration)\ - true - bin64\ - obj64\TestSuite\$(Configuration)\ - false - bin64\static_mt\ - obj64\TestSuite\$(Configuration)\ - true - bin64\static_mt\ - obj64\TestSuite\$(Configuration)\ - false - bin64\static_md\ - obj64\TestSuite\$(Configuration)\ - true - bin64\static_md\ - obj64\TestSuite\$(Configuration)\ - false - TestSuited - TestSuited - TestSuited - TestSuite - TestSuite - TestSuite - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnitd.lib;WinTestRunnerd.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin64\TestSuited.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\TestSuited.pdb - Windows - MachineX64 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnit.lib;WinTestRunner.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin64\TestSuite.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - false - Windows - true - true - MachineX64 - %(AdditionalOptions) - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnitmtd.lib;WinTestRunnermtd.lib;iphlpapi.lib;winmm.lib;nafxcwd.lib;libcmtd.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_mt\TestSuited.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - nafxcwd.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries) - true - true - bin64\static_mt\TestSuited.pdb - Windows - MachineX64 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnitmt.lib;WinTestRunnermt.lib;iphlpapi.lib;winmm.lib;nafxcw.lib;libcmt.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_mt\TestSuite.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - nafxcw.lib;libcmt.lib;%(IgnoreSpecificDefaultLibraries) - false - Windows - true - true - MachineX64 - %(AdditionalOptions) - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnitmdd.lib;WinTestRunnermdd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_md\TestSuited.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\static_md\TestSuited.pdb - Windows - MachineX64 - %(AdditionalOptions) - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - %(DisableSpecificWarnings) - %(AdditionalOptions) - - - CppUnitmd.lib;WinTestRunnermd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_md\TestSuite.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - false - Windows - true - true - MachineX64 - %(AdditionalOptions) - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_x64_vs100.vcxproj.filters b/Crypto_Win/testsuite/TestSuite_x64_vs100.vcxproj.filters deleted file mode 100644 index bcdf1416c..000000000 --- a/Crypto_Win/testsuite/TestSuite_x64_vs100.vcxproj.filters +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {63e1deda-f6ae-4c70-9fbb-a3d51542ae90} - - - {865e9af6-e184-4adb-a2aa-a8f104a88930} - - - {a753ad66-3331-4b4a-9deb-84af4a23da0f} - - - {f26fa859-efa2-432b-a0ae-f7d537a87789} - - - {5bb34859-da21-42f7-b5ed-237c82105e7c} - - - {0e764686-a08b-4010-a825-61f0a0f40e65} - - - {96625a23-6d42-4529-ac7d-c8acccf3edd5} - - - {257f434b-80d3-4085-b9ae-6f5c6d370b04} - - - - - Crypto\Header Files - - - Crypto\Header Files - - - Crypto\Header Files - - - _Suite\Header Files - - - - - Crypto\Header Files - - - Crypto\Source Files - - - Crypto\Source Files - - - _Suite\Source Files - - - _Driver\Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/testsuite/TestSuite_x64_vs110.vcxproj b/Crypto_Win/testsuite/TestSuite_x64_vs110.vcxproj deleted file mode 100644 index ec646b455..000000000 --- a/Crypto_Win/testsuite/TestSuite_x64_vs110.vcxproj +++ /dev/null @@ -1,329 +0,0 @@ - - - - - debug_shared - x64 - - - debug_static_md - x64 - - - debug_static_mt - x64 - - - release_shared - x64 - - - release_static_md - x64 - - - release_static_mt - x64 - - - - TestSuite - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15} - TestSuite - Win32Proj - - - - Application - Dynamic - MultiByte - v110 - - - Application - Dynamic - MultiByte - v110 - - - Application - Static - MultiByte - v110 - - - Application - Static - MultiByte - v110 - - - Application - Dynamic - MultiByte - v110 - - - Application - Dynamic - MultiByte - v110 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>11.0.61030.0 - TestSuited - TestSuited - TestSuited - TestSuite - TestSuite - TestSuite - - - bin64\ - obj64\TestSuite\$(Configuration)\ - true - - - bin64\ - obj64\TestSuite\$(Configuration)\ - false - - - bin64\static_mt\ - obj64\TestSuite\$(Configuration)\ - true - - - bin64\static_mt\ - obj64\TestSuite\$(Configuration)\ - false - - - bin64\static_md\ - obj64\TestSuite\$(Configuration)\ - true - - - bin64\static_md\ - obj64\TestSuite\$(Configuration)\ - false - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitd.lib;WinTestRunnerd.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin64\TestSuited.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\TestSuited.pdb - Windows - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - CppUnit.lib;WinTestRunner.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin64\TestSuite.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - false - Windows - true - true - MachineX64 - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmtd.lib;WinTestRunnermtd.lib;iphlpapi.lib;winmm.lib;nafxcwd.lib;libcmtd.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_mt\TestSuited.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - nafxcwd.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries) - true - true - bin64\static_mt\TestSuited.pdb - Windows - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - CppUnitmt.lib;WinTestRunnermt.lib;iphlpapi.lib;winmm.lib;nafxcw.lib;libcmt.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_mt\TestSuite.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - nafxcw.lib;libcmt.lib;%(IgnoreSpecificDefaultLibraries) - false - Windows - true - true - MachineX64 - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmdd.lib;WinTestRunnermdd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_md\TestSuited.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\static_md\TestSuited.pdb - Windows - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - CppUnitmd.lib;WinTestRunnermd.lib;iphlpapi.lib;winmm.lib;WinTestRunner.res;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_md\TestSuite.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - false - Windows - true - true - MachineX64 - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_x64_vs110.vcxproj.filters b/Crypto_Win/testsuite/TestSuite_x64_vs110.vcxproj.filters deleted file mode 100644 index 73cc73431..000000000 --- a/Crypto_Win/testsuite/TestSuite_x64_vs110.vcxproj.filters +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {cdcff4b8-a020-49b5-9c52-4198ce411ecb} - - - {903c31e8-0ed1-4d80-9611-5b27ec533829} - - - {e05b946b-318d-4146-9f4c-d0a3010c1f50} - - - {b068c915-89d0-4c76-9e77-0662a07858ff} - - - {146413b2-1cc1-43c3-b10b-a7e9fe4e0701} - - - {e717b790-e4a5-4134-82d0-4d779e1c4421} - - - {4c736132-6b87-46b8-bf6c-853f4b76be39} - - - {cb756d1c-207e-4c11-a60a-85e2af53eb79} - - - - - Crypto\Header Files - - - Crypto\Header Files - - - Crypto\Header Files - - - _Suite\Header Files - - - - - Crypto\Header Files - - - Crypto\Source Files - - - Crypto\Source Files - - - _Suite\Source Files - - - _Driver\Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/testsuite/TestSuite_x64_vs120.vcxproj b/Crypto_Win/testsuite/TestSuite_x64_vs120.vcxproj deleted file mode 100644 index adf4adf1f..000000000 --- a/Crypto_Win/testsuite/TestSuite_x64_vs120.vcxproj +++ /dev/null @@ -1,321 +0,0 @@ - - - - - debug_shared - x64 - - - debug_static_md - x64 - - - debug_static_mt - x64 - - - release_shared - x64 - - - release_static_md - x64 - - - release_static_mt - x64 - - - - TestSuite - {C1B1BB96-5198-48EB-AB48-9A0A0B54FB15} - TestSuite - Win32Proj - - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - Application - MultiByte - v120 - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - TestSuited - TestSuited - TestSuited - TestSuite - TestSuite - TestSuite - - - bin64\ - obj64\TestSuite\$(Configuration)\ - true - - - bin64\ - obj64\TestSuite\$(Configuration)\ - false - - - bin64\static_mt\ - obj64\TestSuite\$(Configuration)\ - true - - - bin64\static_mt\ - obj64\TestSuite\$(Configuration)\ - false - - - bin64\static_md\ - obj64\TestSuite\$(Configuration)\ - true - - - bin64\static_md\ - obj64\TestSuite\$(Configuration)\ - false - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitd.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin64\TestSuited.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\TestSuited.pdb - Console - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - CppUnit.lib;ws2_32.lib;iphlpapi.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - bin64\TestSuite.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmtd.lib;iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;libeay32mtd.lib;ssleay32mtd.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_mt\TestSuited.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\static_mt\TestSuited.pdb - Console - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreaded - false - true - true - true - - Level3 - - Default - - - CppUnitmt.lib;iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;libeay32mt.lib;ssleay32mt.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_mt\TestSuite.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - - - - - Disabled - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebugDLL - true - true - true - true - - Level3 - ProgramDatabase - Default - - - CppUnitmdd.lib;iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;libeay32mdd.lib;ssleay32mdd.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_md\TestSuited.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - true - true - bin64\static_md\TestSuited.pdb - Console - MachineX64 - - - - - MaxSpeed - OnlyExplicitInline - true - Speed - true - ..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;WINVER=0x0600;POCO_STATIC;%(PreprocessorDefinitions) - true - MultiThreadedDLL - false - true - true - true - - Level3 - - Default - - - CppUnitmd.lib;iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;libeay32md.lib;ssleay32md.lib;Crypt32.lib;%(AdditionalDependencies) - bin64\static_md\TestSuite.exe - ..\..\lib64;%(AdditionalLibraryDirectories) - false - Console - true - true - MachineX64 - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/TestSuite_x64_vs120.vcxproj.filters b/Crypto_Win/testsuite/TestSuite_x64_vs120.vcxproj.filters deleted file mode 100644 index 9d0086c88..000000000 --- a/Crypto_Win/testsuite/TestSuite_x64_vs120.vcxproj.filters +++ /dev/null @@ -1,60 +0,0 @@ - - - - - {fc8ea5a1-f9c8-48b4-96cf-ffe95de41956} - - - {78d9128b-4eef-430f-88ce-73c9fc40b7e3} - - - {7b9690d0-e594-4ca4-bfed-7e1cfeeae63a} - - - {a8e9b1d9-a196-47a2-99ed-f1f515e7eb23} - - - {02425812-0d8b-4170-81f0-5da2907362fa} - - - {e0d81a60-337f-43a5-b588-8164db295c3b} - - - {0bf95e33-6391-49a2-98a8-282aac8fa5df} - - - {af4912b2-1add-4ff0-a1e1-6f32f6d56522} - - - - - Crypto\Header Files - - - Crypto\Header Files - - - Crypto\Header Files - - - _Suite\Header Files - - - - - Crypto\Header Files - - - Crypto\Source Files - - - Crypto\Source Files - - - _Suite\Source Files - - - _Driver\Source Files - - - \ No newline at end of file diff --git a/Crypto_Win/testsuite/TestSuite_x64_vs90.vcproj b/Crypto_Win/testsuite/TestSuite_x64_vs90.vcproj deleted file mode 100644 index 550495a2a..000000000 --- a/Crypto_Win/testsuite/TestSuite_x64_vs90.vcproj +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Crypto_Win/testsuite/src/CryptoTest.cpp b/Crypto_Win/testsuite/src/CryptoTest.cpp deleted file mode 100644 index b79bdbbb7..000000000 --- a/Crypto_Win/testsuite/src/CryptoTest.cpp +++ /dev/null @@ -1,277 +0,0 @@ -// -// CryptoTest.cpp -// -// $Id$ -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "CryptoTest.h" -#include "CppUnit/TestCaller.h" -#include "CppUnit/TestSuite.h" -#include "Poco/Crypto/CipherFactory.h" -#include "Poco/Crypto/Cipher.h" -#include "Poco/Crypto/CipherKey.h" -#include "Poco/Crypto/X509Certificate.h" -#include "Poco/Crypto/CryptoStream.h" -#include "Poco/StreamCopier.h" -#include "Poco/Base64Encoder.h" -#include - - -using namespace Poco::Crypto; - - -static const std::string APPINF_PEM( - "-----BEGIN CERTIFICATE-----\n" - "MIIESzCCAzOgAwIBAgIBATALBgkqhkiG9w0BAQUwgdMxEzARBgNVBAMMCmFwcGlu\n" - "Zi5jb20xNjA0BgNVBAoMLUFwcGxpZWQgSW5mb3JtYXRpY3MgU29mdHdhcmUgRW5n\n" - "aW5lZXJpbmcgR21iSDEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxEjAQBgNVBAgMCUNh\n" - "cmludGhpYTELMAkGA1UEBhMCQVQxHjAcBgNVBAcMFVN0LiBKYWtvYiBpbSBSb3Nl\n" - "bnRhbDEtMCsGCSqGSIb3DQEJARYeZ3VlbnRlci5vYmlsdHNjaG5pZ0BhcHBpbmYu\n" - "Y29tMB4XDTA5MDUwNzE0NTY1NloXDTI5MDUwMjE0NTY1NlowgdMxEzARBgNVBAMM\n" - "CmFwcGluZi5jb20xNjA0BgNVBAoMLUFwcGxpZWQgSW5mb3JtYXRpY3MgU29mdHdh\n" - "cmUgRW5naW5lZXJpbmcgR21iSDEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxEjAQBgNV\n" - "BAgMCUNhcmludGhpYTELMAkGA1UEBhMCQVQxHjAcBgNVBAcMFVN0LiBKYWtvYiBp\n" - "bSBSb3NlbnRhbDEtMCsGCSqGSIb3DQEJARYeZ3VlbnRlci5vYmlsdHNjaG5pZ0Bh\n" - "cHBpbmYuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA89GolWCR\n" - "KtLQclJ2M2QtpFqzNC54hUQdR6n8+DAeruH9WFwLSdWW2fEi+jrtd/WEWCdt4PxX\n" - "F2/eBYeURus7Hg2ZtJGDd3je0+Ygsv7+we4cMN/knaBY7rATqhmnZWk+yBpkf5F2\n" - "IHp9gBxUaJWmt/bq3XrvTtzrDXpCd4zg4zPXZ8IC8ket5o3K2vnkAOsIsgN+Ffqd\n" - "4GjF4dsblG6u6E3VarGRLwGtgB8BAZOA/33mV4FHSMkc4OXpAChaK3tM8YhrLw+m\n" - "XtsfqDiv1825S6OWFCKGj/iX8X2QAkrdB63vXCSpb3de/ByIUfp31PpMlMh6dKo1\n" - "vf7yj0nb2w0utQIDAQABoyowKDAOBgNVHQ8BAf8EBAMCB4AwFgYDVR0lAQH/BAww\n" - "CgYIKwYBBQUHAwMwDQYJKoZIhvcNAQEFBQADggEBAM0cpfb4BgiU/rkYe121P581\n" - "ftg5Ck1PYYda1Fy/FgzbgJh2AwVo/6sn6GF79/QkEcWEgtCMNNO3LMTTddUUApuP\n" - "jnEimyfmUhIThyud/vryzTMNa/eZMwaAqUQWqLf+AwgqjUsBSMenbSHavzJOpsvR\n" - "LI0PQ1VvqB+3UGz0JUnBJiKvHs83Fdm4ewPAf3M5fGcIa+Fl2nU5Plzwzskj84f6\n" - "73ZlEEi3aW9JieNy7RWsMM+1E8Sj2CGRZC4BM9V1Fgnsh4+VHX8Eu7eHucvfeIYx\n" - "3mmLMoK4sCayL/FGhrUDw5AkWb8tKNpRXY+W60Et281yxQSeWLPIbatVzIWI0/M=\n" - "-----END CERTIFICATE-----\n" -); - - -CryptoTest::CryptoTest(const std::string& name): CppUnit::TestCase(name) -{ -} - - -CryptoTest::~CryptoTest() -{ -} - - -void CryptoTest::testEncryptDecrypt() -{ - Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("aes256")); - - for (std::size_t n = 1; n < MAX_DATA_SIZE; n++) - { - std::string in(n, 'x'); - std::string out = pCipher->encryptString(in, Cipher::ENC_NONE); - std::string result = pCipher->decryptString(out, Cipher::ENC_NONE); - assert (in == result); - } - - for (std::size_t n = 1; n < MAX_DATA_SIZE; n++) - { - std::string in(n, 'x'); - std::string out = pCipher->encryptString(in, Cipher::ENC_BASE64); - std::string result = pCipher->decryptString(out, Cipher::ENC_BASE64); - assert (in == result); - } - - for (std::size_t n = 1; n < MAX_DATA_SIZE; n++) - { - std::string in(n, 'x'); - std::string out = pCipher->encryptString(in, Cipher::ENC_BINHEX); - std::string result = pCipher->decryptString(out, Cipher::ENC_BINHEX); - assert (in == result); - } -} - - -void CryptoTest::testEncryptDecryptWithSalt() -{ - Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("aes256", "simplepwd", "Too much salt")); - Cipher::Ptr pCipher2 = CipherFactory::defaultFactory().createCipher(CipherKey("aes256", "simplepwd", "Too much salt")); - - for (std::size_t n = 1; n < MAX_DATA_SIZE; n++) - { - std::string in(n, 'x'); - std::string out = pCipher->encryptString(in, Cipher::ENC_NONE); - std::string result = pCipher2->decryptString(out, Cipher::ENC_NONE); - assert (in == result); - } - - for (std::size_t n = 1; n < MAX_DATA_SIZE; n++) - { - std::string in(n, 'x'); - std::string out = pCipher->encryptString(in, Cipher::ENC_BASE64); - std::string result = pCipher2->decryptString(out, Cipher::ENC_BASE64); - assert (in == result); - } - - for (std::size_t n = 1; n < MAX_DATA_SIZE; n++) - { - std::string in(n, 'x'); - std::string out = pCipher->encryptString(in, Cipher::ENC_BINHEX); - std::string result = pCipher2->decryptString(out, Cipher::ENC_BINHEX); - assert (in == result); - } -} - - -void CryptoTest::testEncryptDecryptDESECB() -{ - Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("3DES", "password")); - - for (std::size_t n = 1; n < MAX_DATA_SIZE; n++) - { - std::string in(n, 'x'); - std::string out = pCipher->encryptString(in, Cipher::ENC_NONE); - std::string result = pCipher->decryptString(out, Cipher::ENC_NONE); - assert (in == result); - } - - for (std::size_t n = 1; n < MAX_DATA_SIZE; n++) - { - std::string in(n, 'x'); - std::string out = pCipher->encryptString(in, Cipher::ENC_BASE64); - std::string result = pCipher->decryptString(out, Cipher::ENC_BASE64); - assert (in == result); - } - - for (std::size_t n = 1; n < MAX_DATA_SIZE; n++) - { - std::string in(n, 'x'); - std::string out = pCipher->encryptString(in, Cipher::ENC_BINHEX); - std::string result = pCipher->decryptString(out, Cipher::ENC_BINHEX); - assert (in == result); - } -} - - -void CryptoTest::testPassword() -{ - CipherKey key("aes256", "password", "salt"); - - std::ostringstream keyStream; - Poco::Base64Encoder base64KeyEnc(keyStream); - base64KeyEnc.write(reinterpret_cast(&key.getKey()[0]), key.keySize()); - base64KeyEnc.close(); - std::string base64Key = keyStream.str(); - assert (base64Key == "hIzxBt58GDd7/6mRp88bewKk42lM4QwaF78ek0FkVoA="); -} - - -void CryptoTest::testEncryptInterop() -{ - Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("aes256", "password", "salt")); - - // test vectors from OpenSSL implementation - const std::string plainText = "This is a secret message."; - const std::string expectedCipherText = "9HITTPaU3A/LaZzldbdnRZ109DKlshouKren/n8BsHc="; - std::string cipherText = pCipher->encryptString(plainText, Cipher::ENC_BASE64); - assert (cipherText == expectedCipherText); -} - - -void CryptoTest::testDecryptInterop() -{ - Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("aes256", "password", "salt")); - - // test vectors from OpenSSL implementation - const std::string expectedPlainText = "This is a secret message."; - const std::string cipherText = "9HITTPaU3A/LaZzldbdnRZ109DKlshouKren/n8BsHc="; - std::string plainText = pCipher->decryptString(cipherText, Cipher::ENC_BASE64); - assert (plainText == expectedPlainText); -} - - -void CryptoTest::testStreams() -{ - Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(CipherKey("aes256")); - - static const std::string SECRET_MESSAGE = "This is a secret message. Don't tell anyone."; - - std::stringstream sstr; - EncryptingOutputStream encryptor(sstr, *pCipher); - encryptor << SECRET_MESSAGE; - encryptor.close(); - - DecryptingInputStream decryptor(sstr, *pCipher); - std::string result; - Poco::StreamCopier::copyToString(decryptor, result); - - assert (result == SECRET_MESSAGE); - assert (decryptor.eof()); - assert (!decryptor.bad()); - - - std::istringstream emptyStream; - DecryptingInputStream badDecryptor(emptyStream, *pCipher); - Poco::StreamCopier::copyToString(badDecryptor, result); - - assert (badDecryptor.fail()); - assert (badDecryptor.bad()); - assert (!badDecryptor.eof()); -} - - -void CryptoTest::testCertificate() -{ - std::istringstream certStream(APPINF_PEM); - X509Certificate cert(certStream); - - std::string subjectName(cert.subjectName()); - std::string issuerName(cert.issuerName()); - std::string commonName(cert.commonName()); - std::string country(cert.subjectName(X509Certificate::NID_COUNTRY)); - std::string localityName(cert.subjectName(X509Certificate::NID_LOCALITY_NAME)); - std::string stateOrProvince(cert.subjectName(X509Certificate::NID_STATE_OR_PROVINCE)); - std::string organizationName(cert.subjectName(X509Certificate::NID_ORGANIZATION_NAME)); - std::string organizationUnitName(cert.subjectName(X509Certificate::NID_ORGANIZATION_UNIT_NAME)); - - assert (subjectName == "/C=AT/ST=Carinthia/L=St. Jakob im Rosental/O=Applied Informatics Software Engineering GmbH/OU=Development/CN=appinf.com"); - assert (issuerName == subjectName); - assert (commonName == "appinf.com"); - assert (country == "AT"); - assert (localityName == "St. Jakob im Rosental"); - assert (stateOrProvince == "Carinthia"); - assert (organizationName == "Applied Informatics Software Engineering GmbH"); - assert (organizationUnitName == "Development"); - - assert (cert.issuedBy(cert)); -} - - -void CryptoTest::setUp() -{ -} - - -void CryptoTest::tearDown() -{ -} - - -CppUnit::Test* CryptoTest::suite() -{ - CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("CryptoTest"); - - CppUnit_addTest(pSuite, CryptoTest, testEncryptDecrypt); - CppUnit_addTest(pSuite, CryptoTest, testEncryptDecryptWithSalt); - CppUnit_addTest(pSuite, CryptoTest, testEncryptDecryptDESECB); - CppUnit_addTest(pSuite, CryptoTest, testPassword); - CppUnit_addTest(pSuite, CryptoTest, testEncryptInterop); - CppUnit_addTest(pSuite, CryptoTest, testDecryptInterop); - CppUnit_addTest(pSuite, CryptoTest, testStreams); - CppUnit_addTest(pSuite, CryptoTest, testCertificate); - - return pSuite; -} diff --git a/Crypto_Win/testsuite/src/CryptoTest.h b/Crypto_Win/testsuite/src/CryptoTest.h deleted file mode 100644 index cef21aace..000000000 --- a/Crypto_Win/testsuite/src/CryptoTest.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// CryptoTest.h -// -// $Id: //poco/1.4/Crypto/testsuite/src/CryptoTest.h#3 $ -// -// Definition of the CryptoTest class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef CryptoTest_INCLUDED -#define CryptoTest_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "CppUnit/TestCase.h" - - -class CryptoTest: public CppUnit::TestCase -{ -public: - enum - { - MAX_DATA_SIZE = 10000 - }; - - CryptoTest(const std::string& name); - ~CryptoTest(); - - void testEncryptDecrypt(); - void testEncryptDecryptWithSalt(); - void testEncryptDecryptDESECB(); - void testPassword(); - void testEncryptInterop(); - void testDecryptInterop(); - void testStreams(); - void testCertificate(); - - void setUp(); - void tearDown(); - - static CppUnit::Test* suite(); - -private: -}; - - -#endif // CryptoTest_INCLUDED diff --git a/Crypto_Win/testsuite/src/CryptoTestSuite.cpp b/Crypto_Win/testsuite/src/CryptoTestSuite.cpp deleted file mode 100644 index 1d2298cfb..000000000 --- a/Crypto_Win/testsuite/src/CryptoTestSuite.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// -// CryptoTestSuite.cpp -// -// $Id: //poco/1.4/Crypto/testsuite/src/CryptoTestSuite.cpp#2 $ -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "CryptoTestSuite.h" -#include "CryptoTest.h" -//#include "RSATest.h" -#include "DigestEngineTest.h" - - -CppUnit::Test* CryptoTestSuite::suite() -{ - CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("CryptoTestSuite"); - - pSuite->addTest(CryptoTest::suite()); -// pSuite->addTest(RSATest::suite()); - pSuite->addTest(DigestEngineTest::suite()); - - return pSuite; -} diff --git a/Crypto_Win/testsuite/src/CryptoTestSuite.h b/Crypto_Win/testsuite/src/CryptoTestSuite.h deleted file mode 100644 index 2da8f6969..000000000 --- a/Crypto_Win/testsuite/src/CryptoTestSuite.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// CryptoTestSuite.h -// -// $Id: //poco/1.4/Crypto/testsuite/src/CryptoTestSuite.h#1 $ -// -// Definition of the CryptoTestSuite class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef CryptoTestSuite_INCLUDED -#define CryptoTestSuite_INCLUDED - - -#include "CppUnit/TestSuite.h" - - -class CryptoTestSuite -{ -public: - static CppUnit::Test* suite(); -}; - - -#endif // CryptoTestSuite_INCLUDED diff --git a/Crypto_Win/testsuite/src/DigestEngineTest.cpp b/Crypto_Win/testsuite/src/DigestEngineTest.cpp deleted file mode 100644 index 8f5a80271..000000000 --- a/Crypto_Win/testsuite/src/DigestEngineTest.cpp +++ /dev/null @@ -1,98 +0,0 @@ -// -// DigestEngineTest.cpp -// -// $Id: //poco/1.4/Crypto/testsuite/src/DigestEngineTest.cpp#1 $ -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "DigestEngineTest.h" -#include "CppUnit/TestCaller.h" -#include "CppUnit/TestSuite.h" -#include "Poco/Crypto/DigestEngine.h" - - -using Poco::Crypto::DigestEngine; - - -DigestEngineTest::DigestEngineTest(const std::string& name): CppUnit::TestCase(name) -{ -} - - -DigestEngineTest::~DigestEngineTest() -{ -} - - -void DigestEngineTest::testMD5() -{ - DigestEngine engine("MD5"); - - // test vectors from RFC 1321 - - engine.update(""); - assert(DigestEngine::digestToHex(engine.digest()) == "d41d8cd98f00b204e9800998ecf8427e"); - - engine.update("a"); - assert(DigestEngine::digestToHex(engine.digest()) == "0cc175b9c0f1b6a831c399e269772661"); - - engine.update("abc"); - assert(DigestEngine::digestToHex(engine.digest()) == "900150983cd24fb0d6963f7d28e17f72"); - - engine.update("message digest"); - assert(DigestEngine::digestToHex(engine.digest()) == "f96b697d7cb7938d525a2f31aaf161d0"); - - engine.update("abcdefghijklmnopqrstuvwxyz"); - assert(DigestEngine::digestToHex(engine.digest()) == "c3fcd3d76192e4007dfb496cca67e13b"); - - engine.update("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); - engine.update("abcdefghijklmnopqrstuvwxyz0123456789"); - assert(DigestEngine::digestToHex(engine.digest()) == "d174ab98d277d9f5a5611c2c9f419d9f"); - - engine.update("12345678901234567890123456789012345678901234567890123456789012345678901234567890"); - assert(DigestEngine::digestToHex(engine.digest()) == "57edf4a22be3c955ac49da2e2107b67a"); -} - - -void DigestEngineTest::testSHA1() -{ - DigestEngine engine("SHA1"); - - // test vectors from FIPS 180-1 - - engine.update("abc"); - assert(DigestEngine::digestToHex(engine.digest()) == "a9993e364706816aba3e25717850c26c9cd0d89d"); - - engine.update("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"); - assert(DigestEngine::digestToHex(engine.digest()) == "84983e441c3bd26ebaae4aa1f95129e5e54670f1"); - - for (int i = 0; i < 1000000; ++i) - engine.update('a'); - assert(DigestEngine::digestToHex(engine.digest()) == "34aa973cd4c4daa4f61eeb2bdbad27316534016f"); -} - - -void DigestEngineTest::setUp() -{ -} - - -void DigestEngineTest::tearDown() -{ -} - - -CppUnit::Test* DigestEngineTest::suite() -{ - CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("DigestEngineTest"); - - CppUnit_addTest(pSuite, DigestEngineTest, testMD5); - CppUnit_addTest(pSuite, DigestEngineTest, testSHA1); - - return pSuite; -} diff --git a/Crypto_Win/testsuite/src/DigestEngineTest.h b/Crypto_Win/testsuite/src/DigestEngineTest.h deleted file mode 100644 index a39f2d847..000000000 --- a/Crypto_Win/testsuite/src/DigestEngineTest.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// DigestEngineTest.h -// -// $Id: //poco/1.4/Crypto/testsuite/src/DigestEngineTest.h#1 $ -// -// Definition of the DigestEngineTest class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef DigestEngineTest_INCLUDED -#define DigestEngineTest_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "CppUnit/TestCase.h" - - -class DigestEngineTest: public CppUnit::TestCase -{ -public: - DigestEngineTest(const std::string& name); - ~DigestEngineTest(); - - void testMD5(); - void testSHA1(); - - void setUp(); - void tearDown(); - - static CppUnit::Test* suite(); - -private: -}; - - -#endif // DigestEngineTest_INCLUDED diff --git a/Crypto_Win/testsuite/src/Driver.cpp b/Crypto_Win/testsuite/src/Driver.cpp deleted file mode 100644 index 64619257d..000000000 --- a/Crypto_Win/testsuite/src/Driver.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// -// Driver.cpp -// -// $Id: //poco/1.4/Crypto/testsuite/src/Driver.cpp#1 $ -// -// Console-based test driver for Poco Crypto. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "CppUnit/TestRunner.h" -#include "CryptoTestSuite.h" -#include "Poco/Crypto/Crypto.h" - - -class CryptoInitializer -{ -public: - CryptoInitializer() - { - Poco::Crypto::initializeCrypto(); - } - - ~CryptoInitializer() - { - Poco::Crypto::uninitializeCrypto(); - } -}; - - -int main(int ac, char **av) -{ - CryptoInitializer ci; - - std::vector args; - for (int i = 0; i < ac; ++i) - args.push_back(std::string(av[i])); - CppUnit::TestRunner runner; - runner.addTest("CryptoTestSuite", CryptoTestSuite::suite()); - return runner.run(args) ? 0 : 1; -} diff --git a/Crypto_Win/testsuite/src/RSATest.cpp b/Crypto_Win/testsuite/src/RSATest.cpp deleted file mode 100644 index 044be4c79..000000000 --- a/Crypto_Win/testsuite/src/RSATest.cpp +++ /dev/null @@ -1,233 +0,0 @@ -// -// RSATest.cpp -// -// $Id: //poco/1.4/Crypto/testsuite/src/RSATest.cpp#1 $ -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "RSATest.h" -#include "CppUnit/TestCaller.h" -#include "CppUnit/TestSuite.h" -#include "Poco/Crypto/RSADigestEngine.h" -#include "Poco/Crypto/CipherFactory.h" -#include "Poco/Crypto/Cipher.h" -#include "Poco/Crypto/X509Certificate.h" -#include - - -using namespace Poco::Crypto; - - -static const std::string anyPem( - "-----BEGIN CERTIFICATE-----\r\n" - "MIICaDCCAdECCQCzfxSsk7yaLjANBgkqhkiG9w0BAQUFADBzMQswCQYDVQQGEwJB\r\n" - "VDESMBAGA1UECBMJQ2FyaW50aGlhMRIwEAYDVQQHEwlTdC4gSmFrb2IxDzANBgNV\r\n" - "BAoTBkFwcEluZjEPMA0GA1UEAxMGQXBwSW5mMRowGAYJKoZIhvcNAQkBFgthcHBA\r\n" - "aW5mLmNvbTAeFw0wNjAzMDExMzA3MzFaFw0wNjAzMzExMzA3MzFaMH4xCzAJBgNV\r\n" - "BAYTAkFUMRIwEAYDVQQIEwlDYXJpbnRoaWExETAPBgNVBAcTCFN0IEpha29iMRww\r\n" - "GgYDVQQKExNBcHBsaWVkIEluZm9ybWF0aWNzMQowCAYDVQQDFAEqMR4wHAYJKoZI\r\n" - "hvcNAQkBFg9pbmZvQGFwcGluZi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ\r\n" - "AoGBAJHGyXDHyCYoWz+65ltNwwZbhwOGnxr9P1WMATuFJh0bPBZxKbZRdbTm9KhZ\r\n" - "OlvsEIsfgiYdsxURYIqXfEgISYLZcZY0pQwGEOmB+0NeC/+ENSfOlNSthx6zSVlc\r\n" - "zhJ7+dJOGwepHAiLr1fRuc5jogYLraE+lKTnqAAFfzwvti77AgMBAAEwDQYJKoZI\r\n" - "hvcNAQEFBQADgYEAY/ZoeY1ukkEJX7259NeoVM0oahlulWV0rlCqyaeosOiDORPT\r\n" - "m6X1w/5MTCf9VyaD1zukoSZ4QqNVjHFXcXidbB7Tgt3yRuZ5PC5LIFCDPv9mgPne\r\n" - "mUA70yfctNfza2z3ZiQ6NDkW3mZX+1tmxYIrJQIrkVeYeqf1Gh2nyZrUMcE=\r\n" - "-----END CERTIFICATE-----\r\n" - "-----BEGIN RSA PRIVATE KEY-----\r\n" - "Proc-Type: 4,ENCRYPTED\r\n" - "DEK-Info: DES-EDE3-CBC,E7AE93C9E49184EA\r\n" - "\r\n" - "A2IqzNcWs+I5vzV+i+woDk56+yr58eU0Onw8eEvXkLjnSc58JU4327IF7yUbKWdW\r\n" - "Q7BYGGOkVFiZ7ANOwviDg5SUhxRDWCcW8dS6/p1vfdQ1C3qj2OwJjkpg0aDBIzJn\r\n" - "FzgguT3MF3ama77vxv0S3kOfmCj62MLqPGpj5pQ0/1hefRFbL8oAX8bXUN7/rmGM\r\n" - "Zc0QyzFZv2iQ04dY/6TNclwKPB4H0On4K+8BMs3PRkWA0clCaQaFO2+iwnk3XZfe\r\n" - "+MsKUEbLCpAQeYspYv1cw38dCdWq1KTP5aJk+oXgwjfX5cAaPTz74NTqTIsCcaTD\r\n" - "3vy7ukJYFlDR9Kyo7z8rMazYrKJslhnuRH0BhK9st9McwL957j5tZmrKyraCcmCx\r\n" - "dMAGcsis1va3ayYZpIpFqA4EhYrTM+6N8ZRfUap20+b5IQwHfTQDejUhL6rBwy7j\r\n" - "Ti5yD83/itoOMyXq2sV/XWfVD5zk/P5iv22O1EAQMhhnPB9K/I/JhuSGQJfn3cNh\r\n" - "ykOUYT0+vDeSeEVa+FVEP1W35G0alTbKbNs5Tb8KxJ3iDJUxokM//SvPXZy9hOVX\r\n" - "Y05imB04J15DaGbAHlNzunhuJi7121WV/JRXZRW9diE6hwpD8rwqi3FMuRUmy7U9\r\n" - "aFA5poKRAYlo9YtZ3YpFyjGKB6MfCQcB2opuSnQ/gbugV41m67uQ4CDwWLaNRkTb\r\n" - "GlsMBNcHnidg15Bsat5HaB7l250ukrI13Uw1MYdDUzaS3gPfw9aC4F2w0p3U+DPH\r\n" - "80/zePxtroR7T4/+rI136Rl+aMXDMOEGCX1TVP8rjuZzuRyUSUKC8Q==\r\n" - "-----END RSA PRIVATE KEY-----\r\n" - "-----BEGIN CERTIFICATE-----\r\n" - "MIICXTCCAcYCCQC1Vk/N8qR4AjANBgkqhkiG9w0BAQUFADBzMQswCQYDVQQGEwJB\r\n" - "VDESMBAGA1UECBMJQ2FyaW50aGlhMRIwEAYDVQQHEwlTdC4gSmFrb2IxDzANBgNV\r\n" - "BAoTBkFwcEluZjEPMA0GA1UEAxMGQXBwSW5mMRowGAYJKoZIhvcNAQkBFgthcHBA\r\n" - "aW5mLmNvbTAeFw0wNjAyMjcxMzI3MThaFw0wNjAzMjkxMzI3MThaMHMxCzAJBgNV\r\n" - "BAYTAkFUMRIwEAYDVQQIEwlDYXJpbnRoaWExEjAQBgNVBAcTCVN0LiBKYWtvYjEP\r\n" - "MA0GA1UEChMGQXBwSW5mMQ8wDQYDVQQDEwZBcHBJbmYxGjAYBgkqhkiG9w0BCQEW\r\n" - "C2FwcEBpbmYuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCsFXiPuicN\r\n" - "Im4oJwF8NuaFN+lgYwcZ6dAO3ILIR3kLA2PxF8HSQLfF8J8a4odZhLhctIMAKTxm\r\n" - "k0w8TW5qhL8QLdGzY9vzvkgdKOkan2t3sMeXJAfrM1AphTsmgntAQazGZjOj5p4W\r\n" - "jDnxQ+VXAylqwjHh49eSBxM3wgoscF4iLQIDAQABMA0GCSqGSIb3DQEBBQUAA4GB\r\n" - "AIpfLdXiKchPvFMhQS8xTtXvrw5dVL3yImUMYs4GQi8RrjGmfGB3yMAR7B/b8v4a\r\n" - "+ztfusgWAWiUKuSGTk4S8YB0fsFlmOv0WDr+PyZ4Lui/a8opbyzGE7rqpnF/s0GO\r\n" - "M7uLCNNwIN7WhmxcWV0KZU1wTppoSWPJda1yTbBzF9XP\r\n" - "-----END CERTIFICATE-----\r\n" -); - - -RSATest::RSATest(const std::string& name): CppUnit::TestCase(name) -{ -} - - -RSATest::~RSATest() -{ -} - - -void RSATest::testNewKeys() -{ - RSAKey key(RSAKey::KL_1024, RSAKey::EXP_SMALL); - std::ostringstream strPub; - std::ostringstream strPriv; - key.save(&strPub, &strPriv, "testpwd"); - std::string pubKey = strPub.str(); - std::string privKey = strPriv.str(); - - // now do the round trip - std::istringstream iPub(pubKey); - std::istringstream iPriv(privKey); - RSAKey key2(&iPub, &iPriv, "testpwd"); - - std::istringstream iPriv2(privKey); - RSAKey key3(0, &iPriv2, "testpwd"); - std::ostringstream strPub3; - key3.save(&strPub3); - std::string pubFromPrivate = strPub3.str(); - assert (pubFromPrivate == pubKey); -} - - -void RSATest::testSign() -{ - std::string msg("Test this sign message"); - RSAKey key(RSAKey::KL_2048, RSAKey::EXP_LARGE); - RSADigestEngine eng(key); - eng.update(msg.c_str(), static_cast(msg.length())); - const Poco::DigestEngine::Digest& sig = eng.signature(); - std::string hexDig = Poco::DigestEngine::digestToHex(sig); - - // verify - std::ostringstream strPub; - key.save(&strPub); - std::string pubKey = strPub.str(); - std::istringstream iPub(pubKey); - RSAKey keyPub(&iPub); - RSADigestEngine eng2(key); - eng2.update(msg.c_str(), static_cast(msg.length())); - assert (eng2.verify(sig)); -} - - -void RSATest::testSignManipulated() -{ - std::string msg("Test this sign message"); - std::string msgManip("Test that sign message"); - RSAKey key(RSAKey::KL_2048, RSAKey::EXP_LARGE); - RSADigestEngine eng(key); - eng.update(msg.c_str(), static_cast(msg.length())); - const Poco::DigestEngine::Digest& sig = eng.signature(); - std::string hexDig = Poco::DigestEngine::digestToHex(sig); - - // verify - std::ostringstream strPub; - key.save(&strPub); - std::string pubKey = strPub.str(); - std::istringstream iPub(pubKey); - RSAKey keyPub(&iPub); - RSADigestEngine eng2(key); - eng2.update(msgManip.c_str(), static_cast(msgManip.length())); - assert (!eng2.verify(sig)); -} - - -void RSATest::testRSACipher() -{ - Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(RSAKey(RSAKey::KL_1024, RSAKey::EXP_SMALL)); - for (std::size_t n = 1; n <= 1200; n++) - { - std::string val(n, 'x'); - std::string enc = pCipher->encryptString(val); - std::string dec = pCipher->decryptString(enc); - assert (dec == val); - } -} - - -void RSATest::testRSACipherLarge() -{ - std::vector sizes; - sizes.push_back (2047); - sizes.push_back (2048); - sizes.push_back (2049); - sizes.push_back (4095); - sizes.push_back (4096); - sizes.push_back (4097); - sizes.push_back (8191); - sizes.push_back (8192); - sizes.push_back (8193); - sizes.push_back (16383); - sizes.push_back (16384); - sizes.push_back (16385); - - Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(RSAKey(RSAKey::KL_1024, RSAKey::EXP_SMALL)); - for (std::vector::const_iterator it = sizes.begin(); it != sizes.end(); ++it) - { - std::string val(*it, 'x'); - std::string enc = pCipher->encryptString(val); - std::string dec = pCipher->decryptString(enc); - assert (dec == val); - } -} - - -void RSATest::testCertificate() -{ - std::istringstream str(anyPem); - Poco::Crypto::X509Certificate cert(str); - RSAKey publicKey(cert); - std::istringstream str2(anyPem); - RSAKey privateKey(0, &str2, "test"); - Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(publicKey); - Cipher::Ptr pCipher2 = CipherFactory::defaultFactory().createCipher(privateKey); - std::string val("lets do some encryption"); - - std::string enc = pCipher->encryptString(val); - std::string dec = pCipher2->decryptString(enc); - assert (dec == val); -} - - -void RSATest::setUp() -{ -} - - -void RSATest::tearDown() -{ -} - - -CppUnit::Test* RSATest::suite() -{ - CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("RSATest"); - - CppUnit_addTest(pSuite, RSATest, testNewKeys); - CppUnit_addTest(pSuite, RSATest, testSign); - CppUnit_addTest(pSuite, RSATest, testSignManipulated); - CppUnit_addTest(pSuite, RSATest, testRSACipher); - CppUnit_addTest(pSuite, RSATest, testRSACipherLarge); - CppUnit_addTest(pSuite, RSATest, testCertificate); - - return pSuite; -} diff --git a/Crypto_Win/testsuite/src/RSATest.h b/Crypto_Win/testsuite/src/RSATest.h deleted file mode 100644 index 53f345f99..000000000 --- a/Crypto_Win/testsuite/src/RSATest.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// RSATest.h -// -// $Id: //poco/1.4/Crypto/testsuite/src/RSATest.h#1 $ -// -// Definition of the RSATest class. -// -// Copyright (c) 2006-2014, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef RSATest_INCLUDED -#define RSATest_INCLUDED - - -#include "Poco/Crypto/Crypto.h" -#include "CppUnit/TestCase.h" - - -class RSATest: public CppUnit::TestCase -{ -public: - RSATest(const std::string& name); - ~RSATest(); - - void testNewKeys(); - void testSign(); - void testSignManipulated(); - void testRSACipher(); - void testRSACipherLarge(); - void testCertificate(); - - void setUp(); - void tearDown(); - - static CppUnit::Test* suite(); - -private: -}; - - -#endif // RSATest_INCLUDED diff --git a/Crypto_Win/testsuite/src/WinCEDriver.cpp b/Crypto_Win/testsuite/src/WinCEDriver.cpp deleted file mode 100644 index dc7dcc425..000000000 --- a/Crypto_Win/testsuite/src/WinCEDriver.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// -// WinCEDriver.cpp -// -// $Id: //poco/1.4/Crypto/testsuite/src/WinCEDriver.cpp#1 $ -// -// Console-based test driver for Windows CE. -// -// Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// Permission is hereby granted, free of charge, to any person or organization -// obtaining a copy of the software and accompanying documentation covered by -// this license (the "Software") to use, reproduce, display, distribute, -// execute, and transmit the Software, and to prepare derivative works of the -// Software, and to permit third-parties to whom the Software is furnished to -// do so, all subject to the following: -// -// The copyright notices in the Software and this entire statement, including -// the above license grant, this restriction and the following disclaimer, -// must be included in all copies of the Software, in whole or in part, and -// all derivative works of the Software, unless such copies or derivative -// works are solely in the form of machine-executable object code generated by -// a source language processor. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// - - -#include "CppUnit/TestRunner.h" -#include "CryptoTestSuite.h" -#include "Poco/Crypto/Crypto.h" -#include - - -class CryptoInitializer -{ -public: - CryptoInitializer() - { - Poco::Crypto::initializeCrypto(); - } - - ~CryptoInitializer() - { - Poco::Crypto::uninitializeCrypto(); - } -}; - - -int _tmain(int argc, wchar_t* argv[]) -{ - CryptoInitializer ci; - - std::vector args; - for (int i = 0; i < argc; ++i) - { - char buffer[1024]; - std::wcstombs(buffer, argv[i], sizeof(buffer)); - args.push_back(std::string(buffer)); - } - CppUnit::TestRunner runner; - runner.addTest("CryptoTestSuite", CryptoTestSuite::suite()); - return runner.run(args) ? 0 : 1; -} diff --git a/Crypto_Win/testsuite/src/WinDriver.cpp b/Crypto_Win/testsuite/src/WinDriver.cpp deleted file mode 100644 index ec55c3e83..000000000 --- a/Crypto_Win/testsuite/src/WinDriver.cpp +++ /dev/null @@ -1,68 +0,0 @@ -// -// WinDriver.cpp -// -// $Id: //poco/1.4/Crypto/testsuite/src/WinDriver.cpp#1 $ -// -// Windows test driver for Poco Crypto. -// -// Copyright (c) 2008, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// Permission is hereby granted, free of charge, to any person or organization -// obtaining a copy of the software and accompanying documentation covered by -// this license (the "Software") to use, reproduce, display, distribute, -// execute, and transmit the Software, and to prepare derivative works of the -// Software, and to permit third-parties to whom the Software is furnished to -// do so, all subject to the following: -// -// The copyright notices in the Software and this entire statement, including -// the above license grant, this restriction and the following disclaimer, -// must be included in all copies of the Software, in whole or in part, and -// all derivative works of the Software, unless such copies or derivative -// works are solely in the form of machine-executable object code generated by -// a source language processor. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -// DEALINGS IN THE SOFTWARE. -// - - -#include "WinTestRunner/WinTestRunner.h" -#include "CryptoTestSuite.h" -#include "Poco/Crypto/Crypto.h" - - -class CryptoInitializer -{ -public: - CryptoInitializer() - { - Poco::Crypto::initializeCrypto(); - } - - ~CryptoInitializer() - { - Poco::Crypto::uninitializeCrypto(); - } -}; - - -class TestDriver: public CppUnit::WinTestRunnerApp -{ - void TestMain() - { - CryptoInitializer ci; - - CppUnit::WinTestRunner runner; - runner.addTest(CryptoTestSuite::suite()); - runner.run(); - } -}; - - -TestDriver theDriver; From beb81b4f1684122f51f7083123093ff579e0996b Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Tue, 10 Feb 2015 00:21:53 -0600 Subject: [PATCH 27/34] add JSONFormatter --- Data/Data_x64_vs120.vcxproj | 216 +++++++++--------- Data/Data_x64_vs120.vcxproj.filters | 6 + Data/include/Poco/Data/JSONFormatter.h | 62 +++++ Data/src/JSONFormatter.cpp | 84 +++++++ Foundation/Foundation_x64_vs120.vcxproj | 2 + .../Foundation_x64_vs120.vcxproj.filters | 6 + Foundation/include/Poco/JSONString.h | 48 ++++ Foundation/src/JSONString.cpp | 66 ++++++ Foundation/src/VarHolder.cpp | 29 +-- Foundation/testsuite/src/HMACEngineTest.cpp | 4 +- Foundation/testsuite/src/StringTest.cpp | 54 +++++ Foundation/testsuite/src/StringTest.h | 2 + JSON/src/Stringifier.cpp | 20 +- 13 files changed, 445 insertions(+), 154 deletions(-) create mode 100644 Data/include/Poco/Data/JSONFormatter.h create mode 100644 Data/src/JSONFormatter.cpp create mode 100644 Foundation/include/Poco/JSONString.h create mode 100644 Foundation/src/JSONString.cpp diff --git a/Data/Data_x64_vs120.vcxproj b/Data/Data_x64_vs120.vcxproj index 7116bf5b2..e841d6760 100644 --- a/Data/Data_x64_vs120.vcxproj +++ b/Data/Data_x64_vs120.vcxproj @@ -1,4 +1,4 @@ - + @@ -32,7 +32,7 @@ Data Win32Proj - + StaticLibrary MultiByte @@ -63,27 +63,27 @@ MultiByte v120 - - + + - + - + - + - + - + - + - + <_ProjectFileVersion>12.0.30501.0 PocoData64d @@ -132,7 +132,7 @@ true true true - + Level3 ProgramDatabase Default @@ -164,9 +164,9 @@ true true true - + Level3 - + Default /bigobj %(AdditionalOptions) @@ -195,7 +195,7 @@ true true true - + ..\lib64\PocoDatamtd.pdb Level3 ProgramDatabase @@ -221,9 +221,9 @@ true true true - + Level3 - + Default /bigobj %(AdditionalOptions) @@ -244,7 +244,7 @@ true true true - + ..\lib64\PocoDatamdd.pdb Level3 ProgramDatabase @@ -270,9 +270,9 @@ true true true - + Level3 - + Default /bigobj %(AdditionalOptions) @@ -281,93 +281,95 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + \ No newline at end of file diff --git a/Data/Data_x64_vs120.vcxproj.filters b/Data/Data_x64_vs120.vcxproj.filters index 1d9a874c5..07ae67f45 100644 --- a/Data/Data_x64_vs120.vcxproj.filters +++ b/Data/Data_x64_vs120.vcxproj.filters @@ -177,6 +177,9 @@ Logging\Header Files + + DataCore\Header Files + @@ -284,5 +287,8 @@ Logging\Source Files + + DataCore\Source Files + \ No newline at end of file diff --git a/Data/include/Poco/Data/JSONFormatter.h b/Data/include/Poco/Data/JSONFormatter.h new file mode 100644 index 000000000..94df33835 --- /dev/null +++ b/Data/include/Poco/Data/JSONFormatter.h @@ -0,0 +1,62 @@ +// +// JSONFormatter.h +// +// $Id: //poco/Main/Data/include/Poco/Data/JSONFormatter.h#9 $ +// +// Library: Data +// Package: DataCore +// Module: JSONFormatter +// +// Definition of the JSONFormatter class. +// +// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#ifndef Data_JSONFormatter_INCLUDED +#define Data_JSONFormatter_INCLUDED + + +#include "Poco/Data/RowFormatter.h" + + +namespace Poco { +namespace Data { + + +class Data_API JSONFormatter: public Poco::Data::RowFormatter + /// Class for JSON formatting of data rows. +{ +public: + JSONFormatter(); + /// Creates a new JSONFormatter. + + ~JSONFormatter(); + /// Destroy the JSONFormatter. + + std::string& formatNames(const NameVecPtr pNames, std::string& formattedNames); + std::string& formatValues(const ValueVec& vals, std::string& formattedValues); + +private: + NameVecPtr _pNames; + int _rowCounter; +}; + + +// +// inlines +// +inline std::string& JSONFormatter::formatNames(const NameVecPtr pNames, std::string& formattedNames) +{ + // names are used in formatValues + if (pNames && !_pNames) _pNames = pNames; + return formattedNames = ""; +} + +} } // namespace Poco::Data + + +#endif // Data_JSONFormatter_INCLUDED diff --git a/Data/src/JSONFormatter.cpp b/Data/src/JSONFormatter.cpp new file mode 100644 index 000000000..a58bd6653 --- /dev/null +++ b/Data/src/JSONFormatter.cpp @@ -0,0 +1,84 @@ +// +// JSONFormatter.cpp +// +// $Id: //poco/Main/Data/src/JSONFormatter.cpp#1 $ +// +// Library: Data +// Package: DataCore +// Module: JSONFormatter +// +// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#include "Poco/Data/JSONFormatter.h" +#include "Poco/String.h" +#include "Poco/JSONString.h" +#include "Poco/Format.h" + + +using Poco::trimInPlace; +using Poco::format; +using Poco::toJSON; + + +namespace Poco { +namespace Data { + + + JSONFormatter::JSONFormatter() : _rowCounter(0) + { + } + + + JSONFormatter::~JSONFormatter() + { + } + + + std::string& JSONFormatter::formatValues(const ValueVec& vals, std::string& formattedValues) + { + std::ostringstream str; + + str << "{\"count\":" << getTotalRowCount() << ",\"rows\":[{"; + + std::string pref = str.str(); + if (prefix() != pref) setPrefix(pref); + else + { + str.str(""); + str << ",{"; + } + + if (postfix().empty()) setPostfix("]}"); + + ValueVec::const_iterator it = vals.begin(); + ValueVec::const_iterator end = vals.end(); + NameVec::iterator nIt = _pNames->begin(); + NameVec::iterator nEnd = _pNames->end(); + for (; it != end && nIt != nEnd; ++nIt) + { + if (!it->isEmpty()) + { + if (it->isString()) + str << '"' << *nIt << "\":" << + toJSON(trimInPlace(it->convert())); + else + str << '"' << *nIt << "\":" << it->convert(); + } + else + str << '"' << *nIt << "\":null"; + + if (++it != end) str << ','; + } + + str << '}'; + ++_rowCounter; + return formattedValues = str.str(); + } + + +} }// namespace Poco::Data diff --git a/Foundation/Foundation_x64_vs120.vcxproj b/Foundation/Foundation_x64_vs120.vcxproj index 0f156a27f..a5c679210 100644 --- a/Foundation/Foundation_x64_vs120.vcxproj +++ b/Foundation/Foundation_x64_vs120.vcxproj @@ -392,6 +392,7 @@ true true + @@ -1055,6 +1056,7 @@ + diff --git a/Foundation/Foundation_x64_vs120.vcxproj.filters b/Foundation/Foundation_x64_vs120.vcxproj.filters index ac61a22ca..de071f668 100644 --- a/Foundation/Foundation_x64_vs120.vcxproj.filters +++ b/Foundation/Foundation_x64_vs120.vcxproj.filters @@ -930,6 +930,9 @@ Text\Source Files + + Core\Source Files + @@ -1907,6 +1910,9 @@ Crypt\Header Files + + Core\Header Files + diff --git a/Foundation/include/Poco/JSONString.h b/Foundation/include/Poco/JSONString.h new file mode 100644 index 000000000..f762725f5 --- /dev/null +++ b/Foundation/include/Poco/JSONString.h @@ -0,0 +1,48 @@ +// +// JSONString.h +// +// $Id: //poco/1.4/Foundation/include/Poco/JSONString.h#1 $ +// +// Library: Foundation +// Package: Core +// Module: String +// +// JSONString utility functions. +// +// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#ifndef Foundation_JSONString_INCLUDED +#define Foundation_JSONString_INCLUDED + + +#include "Poco/Foundation.h" + + +namespace Poco { + + +std::string Foundation_API toJSON(char c); + /// Utility function for escaping JSON characters. + + +void Foundation_API toJSON(const std::string& value, std::ostream& out, bool wrap = true); + /// Formats string value into the suplied output stream by + /// escaping control characters. + /// If wrap is true, the resulting string is enclosed in double quotes + + +std::string Foundation_API toJSON(const std::string& value, bool wrap = true); + /// Formats string value by escaping control characters. + /// If wrap is true, the resulting string is enclosed in double quotes + /// Returns formatted string. + + +} // namespace Poco + + +#endif // Foundation_JSONString_INCLUDED diff --git a/Foundation/src/JSONString.cpp b/Foundation/src/JSONString.cpp new file mode 100644 index 000000000..5b118a5ae --- /dev/null +++ b/Foundation/src/JSONString.cpp @@ -0,0 +1,66 @@ +// +// String.h +// +// $Id: //poco/1.4/Foundation/src/String.cpp#1 $ +// +// Library: Foundation +// Package: Core +// Module: String +// +// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#include "Poco/JSONString.h" + + +namespace Poco { + + +std::string toJSON(char c) +{ + switch (c) + { + case '\\': return "\\\\"; + case '"': return "\\\""; + case '/': return "\\/"; + case '\b': return "\\b"; + case '\f': return "\\f"; + case '\n': return "\\n"; + case '\r': return "\\r"; + case '\t': return "\\t"; + default: return std::string(1, c); + } +} + + +void toJSON(const std::string& value, std::ostream& out, bool wrap) +{ + if (wrap) out << '"'; + for (std::string::const_iterator it = value.begin(), + end = value.end(); it != end; ++it) + { + out << toJSON(*it); + } + if (wrap) out << '"'; +} + + +std::string toJSON(const std::string& value, bool wrap) +{ + std::string ret; + if (wrap) ret.append(1, '"'); + for (std::string::const_iterator it = value.begin(), + end = value.end(); it != end; ++it) + { + ret.append(toJSON(*it)); + } + if (wrap) ret.append(1, '"'); + return ret; +} + + +} // namespace Poco diff --git a/Foundation/src/VarHolder.cpp b/Foundation/src/VarHolder.cpp index 8dde3e52e..e49511f4b 100644 --- a/Foundation/src/VarHolder.cpp +++ b/Foundation/src/VarHolder.cpp @@ -16,6 +16,7 @@ #include "Poco/Dynamic/VarHolder.h" #include "Poco/Dynamic/Var.h" +#include "Poco/JSONString.h" namespace Poco { @@ -41,33 +42,7 @@ void escape(std::string& target, const std::string& source) std::string::const_iterator end(source.end()); for (; it != end; ++it) { - switch (*it) - { - case '"': - target += "\\\""; - break; - case '\\': - target += "\\\\"; - break; - case '\b': - target += "\\b"; - break; - case '\f': - target += "\\f"; - break; - case '\n': - target += "\\n"; - break; - case '\r': - target += "\\r"; - break; - case '\t': - target += "\\t"; - break; - default: - target += *it; - break; - } + target.append(Poco::toJSON(*it)); } } diff --git a/Foundation/testsuite/src/HMACEngineTest.cpp b/Foundation/testsuite/src/HMACEngineTest.cpp index eb19286dd..2b21e1e6d 100644 --- a/Foundation/testsuite/src/HMACEngineTest.cpp +++ b/Foundation/testsuite/src/HMACEngineTest.cpp @@ -50,8 +50,8 @@ void HMACEngineTest::testHMAC() digest = DigestEngine::digestToHex(hmac2.digest()); assert (digest == "750c783e6ab0b503eaa86e310a5db738"); - key = std::string(16, 0xaa); - data = std::string(50, 0xdd); + key = std::string(16, char(0xaa)); + data = std::string(50, char(0xdd)); HMACEngine hmac3(key); hmac3.update(data); digest = DigestEngine::digestToHex(hmac3.digest()); diff --git a/Foundation/testsuite/src/StringTest.cpp b/Foundation/testsuite/src/StringTest.cpp index a317c5413..7e7cc5932 100644 --- a/Foundation/testsuite/src/StringTest.cpp +++ b/Foundation/testsuite/src/StringTest.cpp @@ -14,11 +14,13 @@ #include "CppUnit/TestCaller.h" #include "CppUnit/TestSuite.h" #include "Poco/String.h" +#include "Poco/JSONString.h" #include "Poco/Format.h" #include "Poco/MemoryStream.h" #include "Poco/Stopwatch.h" #include "Poco/Exception.h" #include +#include #include #include #include @@ -55,6 +57,7 @@ using Poco::doubleToStr; using Poco::thousandSeparator; using Poco::decimalSeparator; using Poco::format; +using Poco::toJSON; using Poco::CILess; using Poco::MemoryInputStream; using Poco::Stopwatch; @@ -1081,6 +1084,56 @@ void StringTest::benchmarkFloatToStr() } +void StringTest::testJSONString() +{ + assert (toJSON('\\') == "\\\\"); + assert (toJSON('"') == "\\\""); + assert (toJSON('/') == "\\/"); + assert (toJSON('\b') == "\\b"); + assert (toJSON('\f') == "\\f"); + assert (toJSON('\n') == "\\n"); + assert (toJSON('\r') == "\\r"); + assert (toJSON('\t') == "\\t"); + assert (toJSON('a') == "a"); + + // ??? on MSVC, the assert macro expansion + // fails to compile when this string is inline ??? + std::string str = "\"foo\\\\\""; + assert (toJSON("foo\\") == str); + + assert (toJSON("bar/") == "\"bar\\/\""); + assert (toJSON("baz") == "\"baz\""); + assert (toJSON("q\"uote\"d") == "\"q\\\"uote\\\"d\""); + assert (toJSON("bs\b") == "\"bs\\b\""); + assert (toJSON("nl\n") == "\"nl\\n\""); + assert (toJSON("tb\t") == "\"tb\\t\""); + + std::ostringstream ostr; + toJSON("foo\\", ostr); + assert(ostr.str() == str); + ostr.str(""); + + toJSON("foo\\", ostr); + assert(toJSON("bar/") == "\"bar\\/\""); + ostr.str(""); + toJSON("baz", ostr); + assert(ostr.str() == "\"baz\""); + ostr.str(""); + toJSON("q\"uote\"d", ostr); + assert(ostr.str() == "\"q\\\"uote\\\"d\""); + ostr.str(""); + toJSON("bs\b", ostr); + assert(ostr.str() == "\"bs\\b\""); + ostr.str(""); + toJSON("nl\n", ostr); + assert(ostr.str() == "\"nl\\n\""); + ostr.str(""); + toJSON("tb\t", ostr); + assert(ostr.str() == "\"tb\\t\""); + ostr.str(""); +} + + void StringTest::setUp() { } @@ -1121,6 +1174,7 @@ CppUnit::Test* StringTest::suite() CppUnit_addTest(pSuite, StringTest, testIntToString); CppUnit_addTest(pSuite, StringTest, testFloatToString); //CppUnit_addTest(pSuite, StringTest, benchmarkFloatToStr); + CppUnit_addTest(pSuite, StringTest, testJSONString); return pSuite; } diff --git a/Foundation/testsuite/src/StringTest.h b/Foundation/testsuite/src/StringTest.h index 58f4c9591..f24fea056 100644 --- a/Foundation/testsuite/src/StringTest.h +++ b/Foundation/testsuite/src/StringTest.h @@ -57,6 +57,8 @@ public: void testFloatToString(); void benchmarkFloatToStr(); + void testJSONString(); + void setUp(); void tearDown(); diff --git a/JSON/src/Stringifier.cpp b/JSON/src/Stringifier.cpp index 21be0a3fc..af240c395 100644 --- a/JSON/src/Stringifier.cpp +++ b/JSON/src/Stringifier.cpp @@ -17,6 +17,7 @@ #include "Poco/JSON/Stringifier.h" #include "Poco/JSON/Array.h" #include "Poco/JSON/Object.h" +#include "Poco/JSONString.h" #include @@ -69,24 +70,7 @@ void Stringifier::stringify(const Var& any, std::ostream& out, unsigned int inde void Stringifier::formatString(const std::string& value, std::ostream& out) { - out << '"'; - for (std::string::const_iterator it = value.begin(), - end = value.end(); it != end; ++it) - { - switch (*it) - { - case '\\': out << "\\\\"; break; - case '"': out << "\\\""; break; - case '/': out << "\\/"; break; - case '\b': out << "\\b"; break; - case '\f': out << "\\f"; break; - case '\n': out << "\\n"; break; - case '\r': out << "\\r"; break; - case '\t': out << "\\t"; break; - default: out << *it; break; - } - } - out << '"'; + Poco::toJSON(value, out); } From 432e123ff4a45fce028f90379a57da445fc42286 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Tue, 10 Feb 2015 09:23:10 -0600 Subject: [PATCH 28/34] add JSONFormatter to Makefile --- Data/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Data/Makefile b/Data/Makefile index 6ef50a199..308786ab0 100644 --- a/Data/Makefile +++ b/Data/Makefile @@ -10,8 +10,8 @@ include $(POCO_BASE)/build/rules/global objects = AbstractBinder AbstractBinding AbstractExtraction AbstractExtractor \ AbstractPreparation AbstractPreparator ArchiveStrategy Transaction \ - Bulk Connector DataException Date DynamicLOB Limit MetaColumn \ - PooledSessionHolder PooledSessionImpl Position \ + Bulk Connector DataException Date DynamicLOB Limit JSONFormatter \ + MetaColumn PooledSessionHolder PooledSessionImpl Position \ Range RecordSet Row RowFilter RowFormatter RowIterator \ SimpleRowFormatter Session SessionFactory SessionImpl \ SessionPool SessionPoolContainer SQLChannel \ From 838a7bbcae74714bd92b41c748e5e65adb51f996 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Tue, 10 Feb 2015 09:25:17 -0600 Subject: [PATCH 29/34] add JSONString to Makefile --- Foundation/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Foundation/Makefile b/Foundation/Makefile index 6c3245288..d2e829d02 100644 --- a/Foundation/Makefile +++ b/Foundation/Makefile @@ -15,8 +15,8 @@ objects = ArchiveStrategy Ascii ASCIIEncoding AsyncChannel \ Debugger DeflatingStream DigestEngine DigestStream DirectoryIterator DirectoryWatcher \ Environment Event Error EventArgs ErrorHandler Exception FIFOBufferStream FPEnvironment File \ FileChannel Formatter FormattingChannel Glob HexBinaryDecoder LineEndingConverter \ - HexBinaryEncoder InflatingStream Latin1Encoding Latin2Encoding Latin9Encoding LogFile \ - Logger LoggingFactory LoggingRegistry LogStream NamedEvent NamedMutex NullChannel \ + HexBinaryEncoder InflatingStream JSONString Latin1Encoding Latin2Encoding Latin9Encoding \ + LogFile Logger LoggingFactory LoggingRegistry LogStream NamedEvent NamedMutex NullChannel \ MemoryPool MD4Engine MD5Engine Manifest Message Mutex \ NestedDiagnosticContext Notification NotificationCenter \ NotificationQueue PriorityNotificationQueue TimedNotificationQueue \ From 1e0663563b8a1957b078d03c8db4d89bb4d3542c Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Tue, 10 Feb 2015 10:34:41 -0600 Subject: [PATCH 30/34] passify gcc --- Foundation/src/JSONString.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Foundation/src/JSONString.cpp b/Foundation/src/JSONString.cpp index 5b118a5ae..59331f49c 100644 --- a/Foundation/src/JSONString.cpp +++ b/Foundation/src/JSONString.cpp @@ -39,13 +39,13 @@ std::string toJSON(char c) void toJSON(const std::string& value, std::ostream& out, bool wrap) { - if (wrap) out << '"'; + if (wrap) out << std::string(1, '"'); for (std::string::const_iterator it = value.begin(), end = value.end(); it != end; ++it) { out << toJSON(*it); } - if (wrap) out << '"'; + if (wrap) out << std::string(1, '"'); } From 74e970d1a145c925724c95838ab84803af5aa410 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Tue, 10 Feb 2015 12:24:31 -0600 Subject: [PATCH 31/34] gcc error #711 --- Foundation/src/JSONString.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Foundation/src/JSONString.cpp b/Foundation/src/JSONString.cpp index 59331f49c..eaa639ef4 100644 --- a/Foundation/src/JSONString.cpp +++ b/Foundation/src/JSONString.cpp @@ -15,6 +15,7 @@ #include "Poco/JSONString.h" +#include namespace Poco { @@ -39,13 +40,13 @@ std::string toJSON(char c) void toJSON(const std::string& value, std::ostream& out, bool wrap) { - if (wrap) out << std::string(1, '"'); + if (wrap) out << '"'; for (std::string::const_iterator it = value.begin(), end = value.end(); it != end; ++it) { out << toJSON(*it); } - if (wrap) out << std::string(1, '"'); + if (wrap) out << '"'; } From 16260784dadeb27b770779ea14a5c84aeebc72a6 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Tue, 10 Feb 2015 13:42:08 -0600 Subject: [PATCH 32/34] fix gcc build --- Data/src/JSONFormatter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Data/src/JSONFormatter.cpp b/Data/src/JSONFormatter.cpp index a58bd6653..bb53a49d0 100644 --- a/Data/src/JSONFormatter.cpp +++ b/Data/src/JSONFormatter.cpp @@ -64,8 +64,11 @@ namespace Data { if (!it->isEmpty()) { if (it->isString()) - str << '"' << *nIt << "\":" << - toJSON(trimInPlace(it->convert())); + { + std::string val = it->convert(); + trimInPlace(val); + str << '"' << *nIt << "\":" << toJSON(val); + } else str << '"' << *nIt << "\":" << it->convert(); } From 07a2529d9d1c293db27b5589becc0954865f9260 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Thu, 12 Feb 2015 20:49:35 -0600 Subject: [PATCH 33/34] JSON Formatter modifications --- Data/Data_x64_vs120.vcxproj | 4 +- Data/Data_x64_vs120.vcxproj.filters | 4 +- Data/SQLite/testsuite/src/SQLiteTest.cpp | 82 +++++++++ Data/SQLite/testsuite/src/SQLiteTest.h | 3 + Data/include/Poco/Data/Date.h | 15 ++ Data/include/Poco/Data/JSONFormatter.h | 62 ------- Data/include/Poco/Data/JSONRowFormatter.h | 116 ++++++++++++ Data/include/Poco/Data/RowFormatter.h | 14 +- Data/include/Poco/Data/Time.h | 15 ++ Data/src/JSONFormatter.cpp | 87 --------- Data/src/JSONRowFormatter.cpp | 187 ++++++++++++++++++++ Data/src/RecordSet.cpp | 8 + Data/testsuite/src/DataTest.cpp | 42 ++++- Data/testsuite/src/DataTest.h | 3 +- Foundation/include/Poco/Dynamic/Var.h | 30 ++++ Foundation/include/Poco/Dynamic/VarHolder.h | 75 ++++++++ Foundation/testsuite/src/VarTest.cpp | 9 + 17 files changed, 599 insertions(+), 157 deletions(-) delete mode 100644 Data/include/Poco/Data/JSONFormatter.h create mode 100644 Data/include/Poco/Data/JSONRowFormatter.h delete mode 100644 Data/src/JSONFormatter.cpp create mode 100644 Data/src/JSONRowFormatter.cpp diff --git a/Data/Data_x64_vs120.vcxproj b/Data/Data_x64_vs120.vcxproj index e841d6760..9a95537a3 100644 --- a/Data/Data_x64_vs120.vcxproj +++ b/Data/Data_x64_vs120.vcxproj @@ -303,7 +303,7 @@ - + @@ -345,7 +345,7 @@ - + diff --git a/Data/Data_x64_vs120.vcxproj.filters b/Data/Data_x64_vs120.vcxproj.filters index 07ae67f45..23f6e42ad 100644 --- a/Data/Data_x64_vs120.vcxproj.filters +++ b/Data/Data_x64_vs120.vcxproj.filters @@ -177,7 +177,7 @@ Logging\Header Files - + DataCore\Header Files @@ -287,7 +287,7 @@ Logging\Source Files - + DataCore\Source Files diff --git a/Data/SQLite/testsuite/src/SQLiteTest.cpp b/Data/SQLite/testsuite/src/SQLiteTest.cpp index 25107f130..77da4beb3 100644 --- a/Data/SQLite/testsuite/src/SQLiteTest.cpp +++ b/Data/SQLite/testsuite/src/SQLiteTest.cpp @@ -18,6 +18,7 @@ #include "Poco/Data/LOB.h" #include "Poco/Data/Statement.h" #include "Poco/Data/RecordSet.h" +#include "Poco/Data/JSONRowFormatter.h" #include "Poco/Data/SQLChannel.h" #include "Poco/Data/SessionFactory.h" #include "Poco/Data/SQLite/Connector.h" @@ -49,6 +50,7 @@ using namespace Poco::Data::Keywords; using Poco::Data::Session; using Poco::Data::Statement; using Poco::Data::RecordSet; +using Poco::Data::JSONRowFormatter; using Poco::Data::Column; using Poco::Data::Row; using Poco::Data::SQLChannel; @@ -3356,6 +3358,85 @@ void SQLiteTest::testFTS3() } +void SQLiteTest::testJSONRowFormatter() +{ + Session tmp(Poco::Data::SQLite::Connector::KEY, "dummy.db"); + assert(tmp.isConnected()); + std::string lastName("Simpson"); + std::string firstName("Bart"); + std::string address("Springfield"); + int age = 12; + + tmp << "DROP TABLE IF EXISTS Simpsons", now; + tmp << "CREATE TABLE IF NOT EXISTS Simpsons (LastName VARCHAR(30), FirstName VARCHAR, Address VARCHAR, Age INTEGER(3))", now; + + checkJSON("SELECT * FROM Simpsons", ""); + + tmp << "INSERT INTO Simpsons VALUES(?, ?, ?, ?)", use(lastName), use(firstName), use(address), use(age), now; + + checkJSON("SELECT * FROM Simpsons", + "{" + "\"names\":[\"LastName\",\"FirstName\",\"Address\",\"Age\"]," + "\"values\":[[\"Simpson\",\"Bart\",\"Springfield\",12]]" + "}"); + + lastName = "Simpson"; + firstName ="Lisa"; + address ="Springfield"; + age = 10; + tmp << "INSERT INTO Simpsons VALUES(?, ?, ?, ?)", use(lastName), use(firstName), use(address), use(age), now; + + checkJSON("SELECT * FROM Simpsons", + "{" + "\"names\":[\"LastName\",\"FirstName\",\"Address\",\"Age\"]," + "\"values\":[[\"Simpson\",\"Bart\",\"Springfield\",12]," + "[\"Simpson\",\"Lisa\",\"Springfield\",10]]" + "}"); + + checkJSON("SELECT * FROM Simpsons", + "{" + "[[\"Simpson\",\"Bart\",\"Springfield\",12]," + "[\"Simpson\",\"Lisa\",\"Springfield\",10]]" + "}", JSONRowFormatter::JSON_FMT_MODE_SMALL); + + checkJSON("SELECT * FROM Simpsons", + "{\"count\":2," + "[[\"Simpson\",\"Bart\",\"Springfield\",12]," + "[\"Simpson\",\"Lisa\",\"Springfield\",10]]" + "}", JSONRowFormatter::JSON_FMT_MODE_ROW_COUNT); + + checkJSON("SELECT * FROM Simpsons", + "{" + "\"names\":[\"LastName\",\"FirstName\",\"Address\",\"Age\"]," + "\"values\":[[\"Simpson\",\"Bart\",\"Springfield\",12]," + "[\"Simpson\",\"Lisa\",\"Springfield\",10]]" + "}", JSONRowFormatter::JSON_FMT_MODE_COLUMN_NAMES); + + checkJSON("SELECT * FROM Simpsons", + "{\"count\":2," + "[{\"LastName\":\"Simpson\",\"FirstName\":\"Bart\",\"Address\":\"Springfield\",\"Age\":12}," + "{\"LastName\":\"Simpson\",\"FirstName\":\"Lisa\",\"Address\":\"Springfield\",\"Age\":10}]" + "}", JSONRowFormatter::JSON_FMT_MODE_FULL); + +} + + +void SQLiteTest::checkJSON(const std::string& sql, const std::string& json, int mode) +{ + Session tmp(Poco::Data::SQLite::Connector::KEY, "dummy.db"); + + JSONRowFormatter jf; + if (mode > 0) + jf.setJSONMode(mode); + + Statement stmt = (tmp << sql, format(jf), now); + RecordSet rs(stmt); + std::ostringstream ostr; + ostr << rs; + assert(ostr.str() == json); +} + + void SQLiteTest::setUp() { } @@ -3456,6 +3537,7 @@ CppUnit::Test* SQLiteTest::suite() CppUnit_addTest(pSuite, SQLiteTest, testTransaction); CppUnit_addTest(pSuite, SQLiteTest, testTransactor); CppUnit_addTest(pSuite, SQLiteTest, testFTS3); + CppUnit_addTest(pSuite, SQLiteTest, testJSONRowFormatter); return pSuite; } diff --git a/Data/SQLite/testsuite/src/SQLiteTest.h b/Data/SQLite/testsuite/src/SQLiteTest.h index cb7b273e0..614eb06fd 100644 --- a/Data/SQLite/testsuite/src/SQLiteTest.h +++ b/Data/SQLite/testsuite/src/SQLiteTest.h @@ -135,6 +135,8 @@ public: void testFTS3(); + void testJSONRowFormatter(); + void setUp(); void tearDown(); @@ -152,6 +154,7 @@ public: private: void setTransactionIsolation(Poco::Data::Session& session, Poco::UInt32 ti); + void checkJSON(const std::string& sql, const std::string& json, int mode = 0); static int _insertCounter; static int _updateCounter; diff --git a/Data/include/Poco/Data/Date.h b/Data/include/Poco/Data/Date.h index 289066848..bcc108d9d 100644 --- a/Data/include/Poco/Data/Date.h +++ b/Data/include/Poco/Data/Date.h @@ -215,6 +215,21 @@ public: return _val; } + bool isDate() const + { + return true; + } + + bool isTime() const + { + return false; + } + + bool isDateTime() const + { + return false; + } + private: VarHolderImpl(); Poco::Data::Date _val; diff --git a/Data/include/Poco/Data/JSONFormatter.h b/Data/include/Poco/Data/JSONFormatter.h deleted file mode 100644 index 94df33835..000000000 --- a/Data/include/Poco/Data/JSONFormatter.h +++ /dev/null @@ -1,62 +0,0 @@ -// -// JSONFormatter.h -// -// $Id: //poco/Main/Data/include/Poco/Data/JSONFormatter.h#9 $ -// -// Library: Data -// Package: DataCore -// Module: JSONFormatter -// -// Definition of the JSONFormatter class. -// -// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#ifndef Data_JSONFormatter_INCLUDED -#define Data_JSONFormatter_INCLUDED - - -#include "Poco/Data/RowFormatter.h" - - -namespace Poco { -namespace Data { - - -class Data_API JSONFormatter: public Poco::Data::RowFormatter - /// Class for JSON formatting of data rows. -{ -public: - JSONFormatter(); - /// Creates a new JSONFormatter. - - ~JSONFormatter(); - /// Destroy the JSONFormatter. - - std::string& formatNames(const NameVecPtr pNames, std::string& formattedNames); - std::string& formatValues(const ValueVec& vals, std::string& formattedValues); - -private: - NameVecPtr _pNames; - int _rowCounter; -}; - - -// -// inlines -// -inline std::string& JSONFormatter::formatNames(const NameVecPtr pNames, std::string& formattedNames) -{ - // names are used in formatValues - if (pNames && !_pNames) _pNames = pNames; - return formattedNames = ""; -} - -} } // namespace Poco::Data - - -#endif // Data_JSONFormatter_INCLUDED diff --git a/Data/include/Poco/Data/JSONRowFormatter.h b/Data/include/Poco/Data/JSONRowFormatter.h new file mode 100644 index 000000000..c25426498 --- /dev/null +++ b/Data/include/Poco/Data/JSONRowFormatter.h @@ -0,0 +1,116 @@ +// +// JSONRowFormatter.h +// +// $Id: //poco/Main/Data/include/Poco/Data/JSONRowFormatter.h#9 $ +// +// Library: Data +// Package: DataCore +// Module: JSONRowFormatter +// +// Definition of the JSONRowFormatter class. +// +// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#ifndef Data_JSONRowFormatter_INCLUDED +#define Data_JSONRowFormatter_INCLUDED + + +#include "Poco/Data/RowFormatter.h" + + +namespace Poco { +namespace Data { + + +class Data_API JSONRowFormatter: public Poco::Data::RowFormatter + /// Class for JSON formatting of data rows. +{ +public: + static const int JSON_FMT_MODE_SMALL = 1; + static const int JSON_FMT_MODE_ROW_COUNT = 2; + static const int JSON_FMT_MODE_COLUMN_NAMES = 4; + static const int JSON_FMT_MODE_FULL = 8; + + JSONRowFormatter(int mode = (JSON_FMT_MODE_COLUMN_NAMES | JSON_FMT_MODE_SMALL)); + /// Creates a new JSONRowFormatter. + + ~JSONRowFormatter(); + /// Destroys the JSONRowFormatter. + + std::string& formatNames(const NameVecPtr pNames, std::string& formattedNames); + /// Formats names. + + std::string& formatValues(const ValueVec& vals, std::string& formattedValues); + // Formats values. + + void setJSONMode(int mode); + /// Sets the mode. Valid mode values are: + /// JSON_FMT_MODE_SMALL + /// JSON_FMT_MODE_ROW_COUNT + /// JSON_FMT_MODE_COLUMN_NAMES + /// JSON_FMT_MODE_FULL + + bool printRowCount(); + /// Returns true if row count printing is enabled, + /// false otherwise. + + bool printColumnNames(); + /// Returns true if column names printing is enabled, + /// false otherwise. + + bool isSmall(); + /// Returns true if compact mode formatting is enabled, + /// false otherwise. + + bool isFull(); + /// Returns true if full mode formatting is enabled, + /// false otherwise. + + +private: + void adjustPrefix(); + + NameVecPtr _pNames; + int _mode; + bool _firstTime; +}; + + +// +// inlines +// + + +inline bool JSONRowFormatter::printRowCount() +{ + return (_mode & JSON_FMT_MODE_ROW_COUNT) != 0; +} + + +inline bool JSONRowFormatter::printColumnNames() +{ + return (_mode & JSON_FMT_MODE_COLUMN_NAMES) != 0; +} + + +inline bool JSONRowFormatter::isSmall() +{ + return (_mode & JSON_FMT_MODE_SMALL) != 0; +} + + +inline bool JSONRowFormatter::isFull() +{ + return (_mode & JSON_FMT_MODE_FULL) != 0; +} + + +} } // namespace Poco::Data + + +#endif // Data_JSONRowFormatter_INCLUDED diff --git a/Data/include/Poco/Data/RowFormatter.h b/Data/include/Poco/Data/RowFormatter.h index 90e144aba..b80fa41de 100644 --- a/Data/include/Poco/Data/RowFormatter.h +++ b/Data/include/Poco/Data/RowFormatter.h @@ -40,7 +40,7 @@ class Data_API RowFormatter /// Row formatter can be either passed to the RecordSet at construction time, /// like in the following example: /// - /// RecordSet rs(session. "SELECT * FROM Table", new MyRowFormater); + /// RecordSet rs(session, "SELECT * FROM Table", new MyRowFormater); /// /// or it can be supplied to the statement as in the following example: /// @@ -147,6 +147,12 @@ protected: void setPostfix(const std::string& postfix); /// Sets the postfix for the formatter + virtual void adjustPrefix(); + /// Adjusts prefix after it has been set. + /// No-op here, called by setTotalRowCount and + /// should be implemented by inheriting classes, + /// if needed. + private: mutable std::string _prefix; @@ -174,6 +180,7 @@ inline int RowFormatter::getTotalRowCount() const inline void RowFormatter::setTotalRowCount(int count) { _totalRowCount = count; + adjustPrefix(); } @@ -213,6 +220,11 @@ inline void RowFormatter::setMode(Mode mode) } +inline void RowFormatter::adjustPrefix() +{ +} + + namespace Keywords { diff --git a/Data/include/Poco/Data/Time.h b/Data/include/Poco/Data/Time.h index f62ef9537..796099153 100644 --- a/Data/include/Poco/Data/Time.h +++ b/Data/include/Poco/Data/Time.h @@ -219,6 +219,21 @@ public: return _val; } + bool isDate() const + { + return false; + } + + bool isTime() const + { + return true; + } + + bool isDateTime() const + { + return false; + } + private: VarHolderImpl(); Poco::Data::Time _val; diff --git a/Data/src/JSONFormatter.cpp b/Data/src/JSONFormatter.cpp deleted file mode 100644 index bb53a49d0..000000000 --- a/Data/src/JSONFormatter.cpp +++ /dev/null @@ -1,87 +0,0 @@ -// -// JSONFormatter.cpp -// -// $Id: //poco/Main/Data/src/JSONFormatter.cpp#1 $ -// -// Library: Data -// Package: DataCore -// Module: JSONFormatter -// -// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. -// and Contributors. -// -// SPDX-License-Identifier: BSL-1.0 -// - - -#include "Poco/Data/JSONFormatter.h" -#include "Poco/String.h" -#include "Poco/JSONString.h" -#include "Poco/Format.h" - - -using Poco::trimInPlace; -using Poco::format; -using Poco::toJSON; - - -namespace Poco { -namespace Data { - - - JSONFormatter::JSONFormatter() : _rowCounter(0) - { - } - - - JSONFormatter::~JSONFormatter() - { - } - - - std::string& JSONFormatter::formatValues(const ValueVec& vals, std::string& formattedValues) - { - std::ostringstream str; - - str << "{\"count\":" << getTotalRowCount() << ",\"rows\":[{"; - - std::string pref = str.str(); - if (prefix() != pref) setPrefix(pref); - else - { - str.str(""); - str << ",{"; - } - - if (postfix().empty()) setPostfix("]}"); - - ValueVec::const_iterator it = vals.begin(); - ValueVec::const_iterator end = vals.end(); - NameVec::iterator nIt = _pNames->begin(); - NameVec::iterator nEnd = _pNames->end(); - for (; it != end && nIt != nEnd; ++nIt) - { - if (!it->isEmpty()) - { - if (it->isString()) - { - std::string val = it->convert(); - trimInPlace(val); - str << '"' << *nIt << "\":" << toJSON(val); - } - else - str << '"' << *nIt << "\":" << it->convert(); - } - else - str << '"' << *nIt << "\":null"; - - if (++it != end) str << ','; - } - - str << '}'; - ++_rowCounter; - return formattedValues = str.str(); - } - - -} }// namespace Poco::Data diff --git a/Data/src/JSONRowFormatter.cpp b/Data/src/JSONRowFormatter.cpp new file mode 100644 index 000000000..edf826833 --- /dev/null +++ b/Data/src/JSONRowFormatter.cpp @@ -0,0 +1,187 @@ +// +// JSONRowFormatter.cpp +// +// $Id: //poco/Main/Data/src/JSONRowFormatter.cpp#1 $ +// +// Library: Data +// Package: DataCore +// Module: JSONRowFormatter +// +// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// SPDX-License-Identifier: BSL-1.0 +// + + +#include "Poco/Data/JSONRowFormatter.h" +#include "Poco/String.h" +#include "Poco/JSONString.h" +#include "Poco/Format.h" + + +using Poco::trimInPlace; +using Poco::format; +using Poco::toJSON; + + +namespace Poco { +namespace Data { + + +JSONRowFormatter::JSONRowFormatter(int mode) : RowFormatter("{", "]}"), + _firstTime(true) +{ + if (mode == JSON_FMT_MODE_FULL) + { + mode |= JSON_FMT_MODE_ROW_COUNT; + mode |= JSON_FMT_MODE_COLUMN_NAMES; + //setPostfix("]}"); + } + + setJSONMode(mode); +} + + +JSONRowFormatter::~JSONRowFormatter() +{ +} + + +void JSONRowFormatter::adjustPrefix() +{ + if (printRowCount()) + { + std::ostringstream ostr; + ostr << "{\"count\":" << getTotalRowCount() << ","; + if (_mode & JSON_FMT_MODE_FULL) + ostr << '['; + setPrefix(ostr.str()); + } +} + + +void JSONRowFormatter::setJSONMode(int mode) +{ + if (mode < JSON_FMT_MODE_SMALL || + mode > (JSON_FMT_MODE_SMALL | JSON_FMT_MODE_ROW_COUNT | JSON_FMT_MODE_COLUMN_NAMES | JSON_FMT_MODE_FULL)) + { + throw Poco::InvalidArgumentException( + Poco::format("JSONRowFormatter mode must be between " + "%d (JSON_FMT_MODE_SMALL) and %d (JSON_FMT_MODE_FULL)", + JSON_FMT_MODE_SMALL, + JSON_FMT_MODE_FULL)); + } + + _mode = mode; + if (!(_mode & JSON_FMT_MODE_SMALL) && !(_mode & JSON_FMT_MODE_FULL)) + _mode |= JSON_FMT_MODE_SMALL; + else if (_mode & JSON_FMT_MODE_FULL) + { + _mode |= JSON_FMT_MODE_ROW_COUNT; + } + + adjustPrefix(); +} + + +std::string& JSONRowFormatter::formatValues(const ValueVec& vals, std::string& formattedValues) +{ + std::ostringstream str; + if (!_firstTime) str << ','; + if (isSmall()) + { + if (_firstTime) + { + if (printColumnNames()) + str << ",\"values\":"; + + str << '['; + } + + str << '['; + ValueVec::const_iterator it = vals.begin(); + ValueVec::const_iterator end = vals.end(); + for (; it != end;) + { + if (!it->isEmpty()) + { + if (it->isString() || it->isDate() || it->isTime()) + { + std::string val = it->convert(); + trimInPlace(val); + str << toJSON(val); + } + else + str << it->convert(); + } + else + str << "null"; + + if (++it == end) break; + + str << ','; + } + str << ']'; + } + else if (isFull()) + { + str << '{'; + ValueVec::const_iterator it = vals.begin(); + ValueVec::const_iterator end = vals.end(); + NameVec::iterator nIt = _pNames->begin(); + NameVec::iterator nEnd = _pNames->end(); + for (; it != end && nIt != nEnd; ++nIt) + { + if (!it->isEmpty()) + { + if (it->isString() || it->isDate() || it->isTime()) + { + std::string val = it->convert(); + trimInPlace(val); + str << '"' << *nIt << "\":" << toJSON(val); + } + else + str << '"' << *nIt << "\":" << it->convert(); + } + else + str << '"' << *nIt << "\":null"; + + if (++it != end) str << ','; + } + str << '}'; + } + + _firstTime = false; + return formattedValues = str.str(); +} + + +std::string& JSONRowFormatter::formatNames(const NameVecPtr pNames, std::string& formattedNames) +{ + if (isFull()) + { + // names are used in formatValues + if (pNames && !_pNames) _pNames = pNames; + return formattedNames = ""; + } + else if (printColumnNames()) + { + std::ostringstream ostr; + ostr << "\"names\":["; + for (NameVec::const_iterator it = pNames->begin(), + end = pNames->end();;) + { + ostr << '"' << *it << '"'; + if (++it == end) break; + ostr << ','; + } + ostr << "]"; + return formattedNames = ostr.str(); + } + + return formattedNames = ""; +} + + +} }// namespace Poco::Data diff --git a/Data/src/RecordSet.cpp b/Data/src/RecordSet.cpp index d43c5e9e7..c9bf671a5 100644 --- a/Data/src/RecordSet.cpp +++ b/Data/src/RecordSet.cpp @@ -311,6 +311,8 @@ void RecordSet::setRowFormatter(RowFormatter::Ptr pRowFormatter) std::ostream& RecordSet::copyNames(std::ostream& os) const { + if (begin() == end()) return os; + std::string names = (*_pBegin)->namesToString(); if (!names.empty()) os << names; return os; @@ -319,6 +321,8 @@ std::ostream& RecordSet::copyNames(std::ostream& os) const std::ostream& RecordSet::copyValues(std::ostream& os, std::size_t offset, std::size_t length) const { + if (begin() == end()) return os; + RowIterator it = *_pBegin + offset; RowIterator end = (RowIterator::POSITION_END != length) ? it + length : *_pEnd; std::copy(it, end, std::ostream_iterator(os)); @@ -328,6 +332,8 @@ std::ostream& RecordSet::copyValues(std::ostream& os, std::size_t offset, std::s void RecordSet::formatValues(std::size_t offset, std::size_t length) const { + if (begin() == end()) return; + RowIterator it = *_pBegin + offset; RowIterator end = (RowIterator::POSITION_END != length) ? it + length : *_pEnd; std::string val; @@ -337,6 +343,8 @@ void RecordSet::formatValues(std::size_t offset, std::size_t length) const std::ostream& RecordSet::copy(std::ostream& os, std::size_t offset, std::size_t length) const { + if (begin() == end()) return os; + RowFormatter& rf = const_cast((*_pBegin)->getFormatter()); rf.setTotalRowCount(static_cast(getTotalRowCount())); if (RowFormatter::FORMAT_PROGRESSIVE == rf.getMode()) diff --git a/Data/testsuite/src/DataTest.cpp b/Data/testsuite/src/DataTest.cpp index 999711316..ed68c4c2a 100644 --- a/Data/testsuite/src/DataTest.cpp +++ b/Data/testsuite/src/DataTest.cpp @@ -22,6 +22,7 @@ #include "Poco/Data/Date.h" #include "Poco/Data/Time.h" #include "Poco/Data/SimpleRowFormatter.h" +#include "Poco/Data/JSONRowFormatter.h" #include "Poco/Data/DataException.h" #include "Connector.h" #include "Poco/BinaryReader.h" @@ -64,7 +65,9 @@ using Poco::Data::CLOBOutputStream; using Poco::Data::MetaColumn; using Poco::Data::Column; using Poco::Data::Row; +using Poco::Data::RowFormatter; using Poco::Data::SimpleRowFormatter; +using Poco::Data::JSONRowFormatter; using Poco::Data::Date; using Poco::Data::Time; using Poco::Data::AbstractExtraction; @@ -1166,7 +1169,7 @@ void DataTest::testRowStrictWeak(const Row& row1, const Row& row2, const Row& ro } -void DataTest::testRowFormat() +void DataTest::testSimpleRowFormatter() { Row row1; row1.append("field0", 0); @@ -1210,6 +1213,40 @@ void DataTest::testRowFormat() } +void DataTest::testJSONRowFormatter() +{ + Row row1; + row1.append("field0", 0); + row1.append("field1", "1"); + row1.append("field2", DateTime(2007, 3, 13, 8, 12, 15)); + row1.append("field3", Var()); + row1.append("field4", 4); + row1.setFormatter(new JSONRowFormatter); + + assert(row1.getFormatter().prefix() == "{"); + assert(row1.getFormatter().postfix() == "]}"); + assert(row1.getFormatter().getMode() == RowFormatter::FORMAT_PROGRESSIVE); + assert(row1.namesToString() == "\"names\":[\"field0\",\"field1\",\"field2\",\"field3\",\"field4\"]"); + assert(row1.valuesToString() == ",\"values\":[[0,\"1\",\"2007-03-13T08:12:15Z\",null,4]"); + + row1.setFormatter(new JSONRowFormatter(JSONRowFormatter::JSON_FMT_MODE_SMALL)); + assert(row1.getFormatter().getMode() == RowFormatter::FORMAT_PROGRESSIVE); + assert(row1.namesToString() == ""); + //std::cout << row1.valuesToString() << std::endl; + assert(row1.valuesToString() == "[[0,\"1\",\"2007-03-13T08:12:15Z\",null,4]"); + assert(row1.valuesToString() == ",[0,\"1\",\"2007-03-13T08:12:15Z\",null,4]"); + + row1.setFormatter(new JSONRowFormatter(JSONRowFormatter::JSON_FMT_MODE_FULL)); + assert(row1.getFormatter().prefix() == "{\"count\":0,["); + assert(row1.getFormatter().postfix() == "]}"); + assert(row1.getFormatter().getMode() == RowFormatter::FORMAT_PROGRESSIVE); + std::cout << row1.namesToString() << std::endl; + assert(row1.namesToString() == ""); + assert(row1.valuesToString() == "{\"field0\":0,\"field1\":\"1\",\"field2\":\"2007-03-13T08:12:15Z\",\"field3\":null,\"field4\":4}"); + assert(row1.valuesToString() == ",{\"field0\":0,\"field1\":\"1\",\"field2\":\"2007-03-13T08:12:15Z\",\"field3\":null,\"field4\":4}"); +} + + void DataTest::testDateAndTime() { DateTime dt; @@ -1399,7 +1436,8 @@ CppUnit::Test* DataTest::suite() CppUnit_addTest(pSuite, DataTest, testColumnList); CppUnit_addTest(pSuite, DataTest, testRow); CppUnit_addTest(pSuite, DataTest, testRowSort); - CppUnit_addTest(pSuite, DataTest, testRowFormat); + CppUnit_addTest(pSuite, DataTest, testSimpleRowFormatter); + CppUnit_addTest(pSuite, DataTest, testJSONRowFormatter); CppUnit_addTest(pSuite, DataTest, testDateAndTime); CppUnit_addTest(pSuite, DataTest, testExternalBindingAndExtraction); diff --git a/Data/testsuite/src/DataTest.h b/Data/testsuite/src/DataTest.h index 7f1c42757..98e83d8e9 100644 --- a/Data/testsuite/src/DataTest.h +++ b/Data/testsuite/src/DataTest.h @@ -42,7 +42,8 @@ public: void testColumnList(); void testRow(); void testRowSort(); - void testRowFormat(); + void testSimpleRowFormatter(); + void testJSONRowFormatter(); void testDateAndTime(); void testExternalBindingAndExtraction(); diff --git a/Foundation/include/Poco/Dynamic/Var.h b/Foundation/include/Poco/Dynamic/Var.h index 6076e6f38..12d776b8d 100644 --- a/Foundation/include/Poco/Dynamic/Var.h +++ b/Foundation/include/Poco/Dynamic/Var.h @@ -502,6 +502,15 @@ public: bool isString() const; /// Returns true if stored value is std::string. + bool isDate() const; + /// Returns true if stored value represents a date. + + bool isTime() const; + /// Returns true if stored value represents time or date/time. + + bool isDateTime() const; + /// Returns true if stored value represents a date/time. + std::size_t size() const; /// Returns the size of this Var. /// This function returns 0 when Var is empty, 1 for POD or the size (i.e. length) @@ -844,6 +853,27 @@ inline bool Var::isString() const } +inline bool Var::isDate() const +{ + VarHolder* pHolder = content(); + return pHolder ? pHolder->isDate() : false; +} + + +inline bool Var::isTime() const +{ + VarHolder* pHolder = content(); + return pHolder ? pHolder->isTime() : false; +} + + +inline bool Var::isDateTime() const +{ + VarHolder* pHolder = content(); + return pHolder ? pHolder->isDateTime() : false; +} + + inline std::size_t Var::size() const { VarHolder* pHolder = content(); diff --git a/Foundation/include/Poco/Dynamic/VarHolder.h b/Foundation/include/Poco/Dynamic/VarHolder.h index a42fbf61a..1a743e798 100644 --- a/Foundation/include/Poco/Dynamic/VarHolder.h +++ b/Foundation/include/Poco/Dynamic/VarHolder.h @@ -254,6 +254,18 @@ public: /// Returns false. Must be properly overriden in a type /// specialization in order to suport the diagnostic. + virtual bool isDate() const; + /// Returns false. Must be properly overriden in a type + /// specialization in order to suport the diagnostic. + + virtual bool isTime() const; + /// Returns false. Must be properly overriden in a type + /// specialization in order to suport the diagnostic. + + virtual bool isDateTime() const; + /// Returns false. Must be properly overriden in a type + /// specialization in order to suport the diagnostic. + virtual std::size_t size() const; /// Returns 1 iff Var is not empty or this function overriden. @@ -609,6 +621,24 @@ inline bool VarHolder::isString() const return false; } + +inline bool VarHolder::isDate() const +{ + return false; +} + + +inline bool VarHolder::isTime() const +{ + return false; +} + + +inline bool VarHolder::isDateTime() const +{ + return false; +} + inline std::size_t VarHolder::size() const { return 1u; @@ -3331,6 +3361,21 @@ public: return false; } + bool isDate() const + { + return true; + } + + bool isTime() const + { + return true; + } + + bool isDateTime() const + { + return true; + } + private: VarHolderImpl(); VarHolderImpl(const VarHolderImpl&); @@ -3432,6 +3477,21 @@ public: return false; } + bool isDate() const + { + return true; + } + + bool isTime() const + { + return true; + } + + bool isDateTime() const + { + return true; + } + private: VarHolderImpl(); VarHolderImpl(const VarHolderImpl&); @@ -3533,6 +3593,21 @@ public: return false; } + bool isDate() const + { + return true; + } + + bool isTime() const + { + return true; + } + + bool isDateTime() const + { + return true; + } + private: VarHolderImpl(); VarHolderImpl(const VarHolderImpl&); diff --git a/Foundation/testsuite/src/VarTest.cpp b/Foundation/testsuite/src/VarTest.cpp index 871792b57..c5aba9a79 100644 --- a/Foundation/testsuite/src/VarTest.cpp +++ b/Foundation/testsuite/src/VarTest.cpp @@ -2392,8 +2392,17 @@ void VarTest::testDate() Poco::Timestamp tsNow = dtNow.timestamp(); Poco::LocalDateTime ldtNow(dtNow.timestamp()); Var dt(dtNow); + assert(dt.isDate()); + assert(dt.isTime()); + assert(dt.isDateTime()); Var ts(tsNow); + assert(ts.isDate()); + assert(ts.isTime()); + assert(ts.isDateTime()); Var ldt(ldtNow); + assert(ldt.isDate()); + assert(ldt.isTime()); + assert(ldt.isDateTime()); Var dtStr(dt.convert()); Var tsStr(ts.convert()); Var ldtStr(ldt.convert()); From edafbf9c088e3fdb53c1e25f1d2ccbdb6bc49ebf Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Thu, 12 Feb 2015 21:58:41 -0600 Subject: [PATCH 34/34] clang build --- Data/Makefile | 2 +- Data/include/Poco/Data/JSONRowFormatter.h | 45 +++++++++++++++++++++ Data/include/Poco/Data/SimpleRowFormatter.h | 3 -- Data/src/JSONRowFormatter.cpp | 6 +++ Data/src/RecordSet.cpp | 17 +++++--- Data/testsuite/src/DataTest.cpp | 2 - 6 files changed, 64 insertions(+), 11 deletions(-) diff --git a/Data/Makefile b/Data/Makefile index 308786ab0..f61d2111a 100644 --- a/Data/Makefile +++ b/Data/Makefile @@ -10,7 +10,7 @@ include $(POCO_BASE)/build/rules/global objects = AbstractBinder AbstractBinding AbstractExtraction AbstractExtractor \ AbstractPreparation AbstractPreparator ArchiveStrategy Transaction \ - Bulk Connector DataException Date DynamicLOB Limit JSONFormatter \ + Bulk Connector DataException Date DynamicLOB Limit JSONRowFormatter \ MetaColumn PooledSessionHolder PooledSessionImpl Position \ Range RecordSet Row RowFilter RowFormatter RowIterator \ SimpleRowFormatter Session SessionFactory SessionImpl \ diff --git a/Data/include/Poco/Data/JSONRowFormatter.h b/Data/include/Poco/Data/JSONRowFormatter.h index c25426498..fb0df9d3b 100644 --- a/Data/include/Poco/Data/JSONRowFormatter.h +++ b/Data/include/Poco/Data/JSONRowFormatter.h @@ -29,6 +29,51 @@ namespace Data { class Data_API JSONRowFormatter: public Poco::Data::RowFormatter /// Class for JSON formatting of data rows. + /// + /// Formatter can be configured to operate in four modes (and + /// certain combinations thereof) : + /// + /// - small (condensed mode, only array of values) + /// + /// Example: + /// { + /// [["Simpson", "Bart", "Springfield", 12], + /// ["Simpson", "Lisa", "Springfield", 10]] + /// } + /// + /// - row count (total row count provided) + /// + /// Example: + /// { + /// "count":2, + /// [["Simpson", "Bart", "Springfield", 12], + /// ["Simpson", "Lisa", "Springfield", 10]] + /// } + /// + /// - column names (column names provided as a string array) + /// + /// Example: + /// { + /// "names":["LastName", "FirstName", "Address", "Age"], + /// [["Simpson", "Bart", "Springfield", 12], + /// ["Simpson", "Lisa", "Springfield", 10]] + /// } + /// + /// - full (total row count, column names provided in every row of data) + /// + /// Example: + /// { + /// "count":2, + /// [ + /// {"LastName": "Simpson", "FirstName": "Bart", "Address": "Springfield", "Age": 12}, + /// {"LastName": "Simpson", "FirstName": "Lisa", "Address": "Springfield", "Age": 10} + /// ] + /// } + /// + /// Total row count will be specified by the Poco::DataRecordSet. Note, however, that this is + /// not possible to do accurately in case of result set paging. For those cases, there is + /// setTotalRowCount() member function, which allows to explicitly set the total row count. + /// If the total row count is preset on the formatter, the Data framework shall not interfere. { public: static const int JSON_FMT_MODE_SMALL = 1; diff --git a/Data/include/Poco/Data/SimpleRowFormatter.h b/Data/include/Poco/Data/SimpleRowFormatter.h index 9b9d10715..aa928f6e0 100644 --- a/Data/include/Poco/Data/SimpleRowFormatter.h +++ b/Data/include/Poco/Data/SimpleRowFormatter.h @@ -32,9 +32,6 @@ class Data_API SimpleRowFormatter: public RowFormatter /// A simple row formatting class. { public: - //typedef RowFormatter::NameVec NameVec; - //typedef RowFormatter::NameVecPtr NameVecPtr; - //typedef RowFormatter::ValueVec ValueVec; static const int DEFAULT_COLUMN_WIDTH = 16; static const int DEFAULT_SPACING = 1; diff --git a/Data/src/JSONRowFormatter.cpp b/Data/src/JSONRowFormatter.cpp index edf826833..ab90cc513 100644 --- a/Data/src/JSONRowFormatter.cpp +++ b/Data/src/JSONRowFormatter.cpp @@ -29,6 +29,12 @@ namespace Poco { namespace Data { +const int JSONRowFormatter::JSON_FMT_MODE_SMALL; +const int JSONRowFormatter::JSON_FMT_MODE_ROW_COUNT; +const int JSONRowFormatter::JSON_FMT_MODE_COLUMN_NAMES; +const int JSONRowFormatter::JSON_FMT_MODE_FULL; + + JSONRowFormatter::JSONRowFormatter(int mode) : RowFormatter("{", "]}"), _firstTime(true) { diff --git a/Data/src/RecordSet.cpp b/Data/src/RecordSet.cpp index c9bf671a5..503595698 100644 --- a/Data/src/RecordSet.cpp +++ b/Data/src/RecordSet.cpp @@ -301,11 +301,18 @@ bool RecordSet::moveLast() void RecordSet::setRowFormatter(RowFormatter::Ptr pRowFormatter) { - pRowFormatter->setTotalRowCount(static_cast(getTotalRowCount())); - Statement::setRowFormatter(pRowFormatter); - RowMap::iterator it = _rowMap.begin(); - RowMap::iterator end = _rowMap.end(); - for (; it != end; ++it) it->second->setFormatter(getRowFormatter()); + if (pRowFormatter) + { + if (pRowFormatter->getTotalRowCount() == RowFormatter::INVALID_ROW_COUNT) + pRowFormatter->setTotalRowCount(static_cast(getTotalRowCount())); + + Statement::setRowFormatter(pRowFormatter); + RowMap::iterator it = _rowMap.begin(); + RowMap::iterator end = _rowMap.end(); + for (; it != end; ++it) it->second->setFormatter(getRowFormatter()); + } + else + throw NullPointerException("Null RowFormatter in RecordSet."); } diff --git a/Data/testsuite/src/DataTest.cpp b/Data/testsuite/src/DataTest.cpp index ed68c4c2a..bec8145fc 100644 --- a/Data/testsuite/src/DataTest.cpp +++ b/Data/testsuite/src/DataTest.cpp @@ -1232,7 +1232,6 @@ void DataTest::testJSONRowFormatter() row1.setFormatter(new JSONRowFormatter(JSONRowFormatter::JSON_FMT_MODE_SMALL)); assert(row1.getFormatter().getMode() == RowFormatter::FORMAT_PROGRESSIVE); assert(row1.namesToString() == ""); - //std::cout << row1.valuesToString() << std::endl; assert(row1.valuesToString() == "[[0,\"1\",\"2007-03-13T08:12:15Z\",null,4]"); assert(row1.valuesToString() == ",[0,\"1\",\"2007-03-13T08:12:15Z\",null,4]"); @@ -1240,7 +1239,6 @@ void DataTest::testJSONRowFormatter() assert(row1.getFormatter().prefix() == "{\"count\":0,["); assert(row1.getFormatter().postfix() == "]}"); assert(row1.getFormatter().getMode() == RowFormatter::FORMAT_PROGRESSIVE); - std::cout << row1.namesToString() << std::endl; assert(row1.namesToString() == ""); assert(row1.valuesToString() == "{\"field0\":0,\"field1\":\"1\",\"field2\":\"2007-03-13T08:12:15Z\",\"field3\":null,\"field4\":4}"); assert(row1.valuesToString() == ",{\"field0\":0,\"field1\":\"1\",\"field2\":\"2007-03-13T08:12:15Z\",\"field3\":null,\"field4\":4}");