[cpp-ecp] 01/01: Initial commit.
Scott Cantor
cantor.2 at osu.edu
Mon Apr 29 20:27:09 EDT 2019
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-ecp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-ecp.git;a=commit;h=5df32f43938f287b672b7f159e28145d7ac3d471
commit 5df32f43938f287b672b7f159e28145d7ac3d471
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Apr 29 20:20:57 2019 -0400
Initial commit.
---
.gitignore | 63 +++++++++
ecp.sln | 31 +++++
ecp/ecp.cpp | 333 ++++++++++++++++++++++++++++++++++++++++++++++++
ecp/ecp.vcxproj | 147 +++++++++++++++++++++
ecp/ecp.vcxproj.filters | 22 ++++
5 files changed, 596 insertions(+)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6f06799
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,63 @@
+*.o
+*.lo
+*.la
+*.al
+*.libs
+*.so
+*.so.[0-9]*
+*.a
+*.pc
+*.pc.in
+*.pyc
+*.pyo
+*.rej
+*.aps
+*.suo
+*.ncb
+*.opensdf
+*.sdf
+*~
+*.#*
+.*.swp
+*.vcxproj.user
+.DS_store
+Makefile
+Makefile.in
+stamp-h1
+stamp-h2
+.deps
+.dirstamp
+Debug
+Release
+x64
+.vs
+/aclocal.m4
+/autom4te.cache
+/config.guess
+/config.h
+/config.h.in
+/config.log
+/config.status
+/config.sub
+/configure
+/depcomp
+/install-sh
+/libtool
+/missing
+/pkginfo
+/.settings
+/doxyfile
+/Portfile
+/*.gz
+/*.zip
+/*.bz2
+/ipch
+/build-aux
+/build
+/Build
+/m4/lt~obsolete.m4
+/m4/ltsugar.m4
+/m4/ltoptions.m4
+/m4/libtool.m4
+/m4/ltversion.m4
+
diff --git a/ecp.sln b/ecp.sln
new file mode 100644
index 0000000..081f576
--- /dev/null
+++ b/ecp.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.168
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ecp", "ecp\ecp.vcxproj", "{4C7B6BCD-F531-4B1F-94E8-3DCAF6C44C49}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4C7B6BCD-F531-4B1F-94E8-3DCAF6C44C49}.Debug|x64.ActiveCfg = Debug|x64
+ {4C7B6BCD-F531-4B1F-94E8-3DCAF6C44C49}.Debug|x64.Build.0 = Debug|x64
+ {4C7B6BCD-F531-4B1F-94E8-3DCAF6C44C49}.Debug|x86.ActiveCfg = Debug|Win32
+ {4C7B6BCD-F531-4B1F-94E8-3DCAF6C44C49}.Debug|x86.Build.0 = Debug|Win32
+ {4C7B6BCD-F531-4B1F-94E8-3DCAF6C44C49}.Release|x64.ActiveCfg = Release|x64
+ {4C7B6BCD-F531-4B1F-94E8-3DCAF6C44C49}.Release|x64.Build.0 = Release|x64
+ {4C7B6BCD-F531-4B1F-94E8-3DCAF6C44C49}.Release|x86.ActiveCfg = Release|Win32
+ {4C7B6BCD-F531-4B1F-94E8-3DCAF6C44C49}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {41FAA60F-2256-4173-86CB-8ED5BA451513}
+ EndGlobalSection
+EndGlobal
diff --git a/ecp/ecp.cpp b/ecp/ecp.cpp
new file mode 100644
index 0000000..53a254e
--- /dev/null
+++ b/ecp/ecp.cpp
@@ -0,0 +1,333 @@
+
+#define _CRT_RAND_S
+
+#include <map>
+#include <regex>
+#include <cstdio>
+#include <iostream>
+#include <fstream>
+#include <sstream>
+
+#include <windows.h>
+
+using namespace std;
+
+#define BUFSIZE 4096
+
+namespace {
+
+ static const char DEFAULT_AUTHNREQUEST_TEMPLATE[] = \
+ "<S:Envelope xmlns:S='http://schemas.xmlsoap.org/soap/envelope/' xmlns:samlp='urn:oasis:names:tc:SAML:2.0:protocol'>" \
+ "<S:Body><samlp:AuthnRequest xmlns:samlp='urn:oasis:names:tc:SAML:2.0:protocol' ID='${ID}' IssueInstant='${IssueInstant}' Version='2.0'>" \
+ "<saml:Issuer xmlns:saml='urn:oasis:names:tc:SAML:2.0:assertion'>${Issuer}</saml:Issuer>" \
+ "<samlp:NameIDPolicy AllowCreate='1'/>" \
+ "</samlp:AuthnRequest></S:Body></S:Envelope>";
+
+ static const char DEFAULT_COMMAND_TEMPLATE[] = \
+ "${ecp_curl} -s -S ${ecp_cacert} -H \"Content-Type: text/xml\" -d \"${template}\" -u \"${user}:${password}\" \"https://${idp_host}${idp_port}${ecp_path}\"";
+
+ static const char DEFAULT_IDP_PATH[] = "/idp/profile/SAML2/SOAP/ECP";
+ static const char DEFAULT_START_TAG[] = "<saml2p:Response ";
+ static const char DEFAULT_END_TAG[] = "</saml2p:Response>";
+ static const char DEFAULT_ECP_CURL[] = "curl.exe";
+
+ static const char KEY_SAML_ASSERTION[] = "saml_assertion";
+ static const char KEY_IDP_HOST[] = "idp_host";
+ static const char KEY_IDP_PORT[] = "idp_port";
+ static const char KEY_USER[] = "user";
+ static const char KEY_PASSWORD[] = "password";
+
+ static const char KEY_ECP_CACERT[] = "ecp_cacert";
+ static const char KEY_ECP_ISSUER[] = "ecp_issuer";
+ static const char KEY_ECP_CURL[] = "ecp_curl";
+ static const char KEY_ECP_COMMAND[] = "ecp_command";
+ static const char KEY_ECP_PATH[] = "ecp_path";
+ static const char KEY_ECP_TAG[] = "ecp_tag";
+ static const char KEY_ECP_SOAP[] = "ecp_soap";
+ static const char KEY_ECP_NOBASE64[] = "ecp_nobase64";
+ static const char KEY_ECP_HIDDEN[] = "ecp_hidden";
+
+ class ECPClient {
+ public:
+ ECPClient(const map<string, string>& arguments) : m_arguments(arguments) {}
+ ~ECPClient() {
+ if (m_stdout_Rd)
+ CloseHandle(m_stdout_Rd);
+ if (m_stdout_Wr)
+ CloseHandle(m_stdout_Wr);
+ }
+
+ string getAssertion() const;
+
+ private:
+ void CreateChildProcess(const char* cmd) const;
+ string ReadFromPipe() const;
+ void FindAndReplace(string& source, const string& oldValue, const string& newValue) const;
+
+ const map<string,string>& m_arguments;
+
+ mutable HANDLE m_stdout_Rd;
+ mutable HANDLE m_stdout_Wr;
+ };
+
+}
+
+string ECPClient::getAssertion() const
+{
+ map<string,string>::const_iterator argend = m_arguments.end();
+
+ if (m_arguments.find(KEY_SAML_ASSERTION) != argend) {
+ return m_arguments.at(KEY_SAML_ASSERTION);
+ }
+
+ if (m_arguments.find(KEY_USER) == argend || m_arguments.find(KEY_PASSWORD) == argend) {
+ throw exception("ERROR: user/password not supplied");
+ }
+ else if (m_arguments.find(KEY_ECP_ISSUER) == argend) {
+ throw exception("ERROR: ecp_issuer not supplied");
+ }
+
+ string cmd = m_arguments.find(KEY_ECP_COMMAND) != argend ?
+ m_arguments.at(KEY_ECP_COMMAND) : DEFAULT_COMMAND_TEMPLATE;
+
+ if (m_arguments.find(KEY_ECP_CURL) != argend) {
+ FindAndReplace(cmd, "${ecp_curl}", m_arguments.at(KEY_ECP_CURL));
+ }
+ else {
+ FindAndReplace(cmd, "${ecp_curl}", DEFAULT_ECP_CURL);
+ }
+
+ FindAndReplace(cmd, "${user}", m_arguments.at(KEY_USER));
+ FindAndReplace(cmd, "${password}", m_arguments.at(KEY_PASSWORD));
+
+ string msg = DEFAULT_AUTHNREQUEST_TEMPLATE;
+
+ unsigned int randkey = 0, randkey2 = 0;
+ if (rand_s(&randkey) == 0 && rand_s(&randkey2) == 0) {
+ ostringstream id;
+ id << '_' << randkey << randkey2;
+ FindAndReplace(msg, "${ID}", id.str());
+ }
+
+ time_t epoch = time(nullptr);
+ struct tm ptime;
+ gmtime_s(&ptime, &epoch);
+ char timebuf[32];
+ strftime(timebuf,32,"%Y-%m-%dT%H:%M:%SZ", &ptime);
+ FindAndReplace(msg, "${IssueInstant}", timebuf);
+
+ FindAndReplace(msg, "${Issuer}", m_arguments.at(KEY_ECP_ISSUER));
+
+ FindAndReplace(cmd, "${template}", msg);
+
+ if (m_arguments.find(KEY_IDP_HOST) != argend) {
+ FindAndReplace(cmd, "${idp_host}", m_arguments.at(KEY_IDP_HOST));
+ }
+
+ if (m_arguments.find(KEY_ECP_CACERT) != argend) {
+ FindAndReplace(cmd, "${ecp_cacert}", "--cacert " + m_arguments.at(KEY_ECP_CACERT));
+ }
+ else {
+ FindAndReplace(cmd, "${ecp_cacert}", "");
+ }
+
+ if (m_arguments.find(KEY_IDP_PORT) != argend) {
+ string portstr(":");
+ portstr += m_arguments.at(KEY_IDP_PORT);
+ FindAndReplace(cmd, "${idp_port}", portstr);
+ }
+ else {
+ FindAndReplace(cmd, "${idp_port}", "");
+ }
+
+ if (m_arguments.find(KEY_ECP_PATH) != argend) {
+ FindAndReplace(cmd, "${ecp_path}", m_arguments.at(KEY_ECP_PATH));
+ }
+ else {
+ FindAndReplace(cmd, "${ecp_path}", DEFAULT_IDP_PATH);
+ }
+
+ SECURITY_ATTRIBUTES saAttr;
+
+ // Set the bInheritHandle flag so pipe handles are inherited.
+
+ saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
+ saAttr.bInheritHandle = TRUE;
+ saAttr.lpSecurityDescriptor = nullptr;
+
+ m_stdout_Rd = nullptr;
+ m_stdout_Wr = nullptr;
+
+ if (!CreatePipe(&m_stdout_Rd, &m_stdout_Wr, &saAttr, 0))
+ throw exception("ERROR: creation of child process pipe failed");
+
+ // Ensure the read handle to the pipe for STDOUT is not inherited.
+
+ if (!SetHandleInformation(m_stdout_Rd, HANDLE_FLAG_INHERIT, 0))
+ throw exception("ERROR: SetHandle on child process pipe failed");
+
+ CreateChildProcess(cmd.c_str());
+
+ if (m_arguments.find(KEY_ECP_HIDDEN) != argend) {
+ ShowWindow(GetConsoleWindow(), SW_HIDE);
+ }
+
+ string xml(ReadFromPipe());
+
+ if (xml.empty()) {
+ throw exception("ERROR: no response from command's stdout");
+ }
+
+ if (xml.find("urn:oasis:names:tc:SAML:2.0:status:Success") == string::npos) {
+ throw exception("ERROR: SAML Response was unsuccessful");
+ }
+
+ if (m_arguments.find(KEY_ECP_SOAP) == argend) {
+ string start_tag = DEFAULT_START_TAG;
+ string end_tag = DEFAULT_END_TAG;
+
+ if (m_arguments.find(KEY_ECP_TAG) != argend) {
+ start_tag = "<" + m_arguments.at(KEY_ECP_TAG) + " ";
+ end_tag = "</" + m_arguments.at(KEY_ECP_TAG) + ">";
+ }
+
+ string::size_type start_pos = xml.find(start_tag);
+ string::size_type end_pos = xml.find(end_tag);
+ if (start_pos == string::npos || end_pos == string::npos || end_pos <= start_pos) {
+ throw exception("ERROR: Unable to locate start/end tags in SOAP response");
+ }
+
+ xml = xml.substr(start_pos, end_pos + end_tag.length() - start_pos);
+ }
+
+ if (m_arguments.find(KEY_ECP_NOBASE64) == argend) {
+ DWORD len = xml.length() * 4;
+ char* encoded = new char[len];
+
+ if (!CryptBinaryToString(reinterpret_cast<const BYTE*>(xml.c_str()), xml.length(), CRYPT_STRING_BASE64, encoded, &len)) {
+ throw exception("ERROR: Base64-encode failed");
+ }
+
+ xml = encoded;
+ delete[] encoded;
+
+ FindAndReplace(xml, "\r\n", "");
+ }
+
+ return xml;
+}
+
+void ECPClient::CreateChildProcess(const char* cmd) const
+{
+ PROCESS_INFORMATION piProcInfo;
+ STARTUPINFO siStartInfo;
+
+ // Set up members of the PROCESS_INFORMATION structure.
+
+ ZeroMemory(&piProcInfo, sizeof(PROCESS_INFORMATION));
+
+ // Set up members of the STARTUPINFO structure.
+ // This structure specifies the STDOUT handle for redirection.
+
+ ZeroMemory(&siStartInfo, sizeof(STARTUPINFO));
+ siStartInfo.cb = sizeof(STARTUPINFO);
+ siStartInfo.hStdOutput = m_stdout_Wr;
+ siStartInfo.dwFlags |= STARTF_USESTDHANDLES;
+
+ // Create the child process.
+
+ char* dupcmd = _strdup(cmd);
+
+ BOOL bSuccess = CreateProcess(NULL,
+ dupcmd, // command line
+ NULL, // process security attributes
+ NULL, // primary thread security attributes
+ TRUE, // handles are inherited
+ CREATE_NO_WINDOW, // creation flags
+ NULL, // use parent's environment
+ NULL, // use parent's current directory
+ &siStartInfo, // STARTUPINFO pointer
+ &piProcInfo); // receives PROCESS_INFORMATION
+ free(dupcmd);
+
+ if (!bSuccess)
+ throw exception("ERROR: CreateProcess failed");
+
+ // Close handles to the child process and its primary thread.
+
+ CloseHandle(piProcInfo.hProcess);
+ CloseHandle(piProcInfo.hThread);
+}
+
+string ECPClient::ReadFromPipe() const
+{
+ // Read output from the child process's pipe for STDOUT
+ // and write to the parent process's pipe for STDOUT.
+ // Stop when there is no more data.
+ DWORD dwRead;
+ CHAR chBuf[BUFSIZE];
+ BOOL bSuccess = FALSE;
+
+ string result;
+
+ CloseHandle(m_stdout_Wr);
+ m_stdout_Wr = nullptr;
+
+ while (true) {
+ bSuccess = ReadFile(m_stdout_Rd, chBuf, BUFSIZE, &dwRead, NULL);
+ if (!bSuccess || dwRead == 0 )
+ break;
+
+ result.append(chBuf, dwRead);
+ }
+
+ CloseHandle(m_stdout_Rd);
+ m_stdout_Rd = nullptr;
+
+ return result;
+}
+
+void ECPClient::FindAndReplace(string& source, const string& oldValue, const string& newValue) const
+{
+ size_t pos = source.find(oldValue);
+ while (pos != string::npos) {
+ source.replace(pos, oldValue.length(), newValue);
+ pos = source.find(oldValue, (pos + newValue.length()));
+ }
+ return;
+}
+
+static map<string,string> parseArgs(int argc, char* argv[])
+{
+ map<string,string> result;
+ const char DELIMITER = '=';
+
+ for (int i = 0; i < argc; ++i)
+ {
+ string arg(argv[i]);
+ size_t pos = arg.find(DELIMITER);
+ if (string::npos != pos)
+ {
+ string key = arg.substr(0, pos);
+ string value = arg.substr(pos + 1);
+ result[key] = value;
+ }
+ }
+ return result;
+}
+
+int main(int argc, char* argv[])
+{
+ try {
+ map<string,string> argMap = parseArgs(argc, argv);
+ ECPClient client(argMap);
+ string xml = client.getAssertion();
+
+ cout << xml;
+ return 0;
+ }
+ catch (const exception& e) {
+ cout << e.what();
+ return -1;
+ }
+}
diff --git a/ecp/ecp.vcxproj b/ecp/ecp.vcxproj
new file mode 100644
index 0000000..3841ad9
--- /dev/null
+++ b/ecp/ecp.vcxproj
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>15.0</VCProjectVersion>
+ <ProjectGuid>{4C7B6BCD-F531-4B1F-94E8-3DCAF6C44C49}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>ecp</RootNamespace>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>crypt32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>crypt32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>crypt32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <SDLCheck>true</SDLCheck>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>crypt32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="ecp.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/ecp/ecp.vcxproj.filters b/ecp/ecp.vcxproj.filters
new file mode 100644
index 0000000..0dd8f50
--- /dev/null
+++ b/ecp/ecp.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="ecp.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list