diff options
-rw-r--r-- | src/anytun.sln | 24 | ||||
-rw-r--r-- | src/anytun.suo | bin | 68608 -> 0 bytes | |||
-rw-r--r-- | src/anytun.vcproj | 662 | ||||
-rw-r--r-- | src/cryptinit.hpp | 6 | ||||
-rw-r--r-- | src/keyDerivation.cpp | 4 |
5 files changed, 688 insertions, 8 deletions
diff --git a/src/anytun.sln b/src/anytun.sln index 0e5c04c..99da3b0 100644 --- a/src/anytun.sln +++ b/src/anytun.sln @@ -5,28 +5,52 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "anytun", "anytun.vcproj", " EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug with gcrypt|Win32 = Debug with gcrypt|Win32
+ Debug with gcrypt|x64 = Debug with gcrypt|x64
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
+ Release with gcrypt|Win32 = Release with gcrypt|Win32
+ Release with gcrypt|x64 = Release with gcrypt|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
+ Service Debug with gcrypt|Win32 = Service Debug with gcrypt|Win32
+ Service Debug with gcrypt|x64 = Service Debug with gcrypt|x64
Service Debug|Win32 = Service Debug|Win32
Service Debug|x64 = Service Debug|x64
+ Service Release with gcrypt|Win32 = Service Release with gcrypt|Win32
+ Service Release with gcrypt|x64 = Service Release with gcrypt|x64
Service Release|Win32 = Service Release|Win32
Service Release|x64 = Service Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Debug with gcrypt|Win32.ActiveCfg = Debug with gcrypt|Win32
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Debug with gcrypt|Win32.Build.0 = Debug with gcrypt|Win32
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Debug with gcrypt|x64.ActiveCfg = Debug with gcrypt|x64
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Debug with gcrypt|x64.Build.0 = Debug with gcrypt|x64
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Debug|Win32.ActiveCfg = Debug|Win32
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Debug|Win32.Build.0 = Debug|Win32
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Debug|x64.ActiveCfg = Debug|x64
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Debug|x64.Build.0 = Debug|x64
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Release with gcrypt|Win32.ActiveCfg = Release with gcrypt|Win32
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Release with gcrypt|Win32.Build.0 = Release with gcrypt|Win32
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Release with gcrypt|x64.ActiveCfg = Release with gcrypt|x64
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Release with gcrypt|x64.Build.0 = Release with gcrypt|x64
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Release|Win32.ActiveCfg = Release|Win32
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Release|Win32.Build.0 = Release|Win32
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Release|x64.ActiveCfg = Release|x64
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Release|x64.Build.0 = Release|x64
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Debug with gcrypt|Win32.ActiveCfg = Service Debug with gcrypt|Win32
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Debug with gcrypt|Win32.Build.0 = Service Debug with gcrypt|Win32
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Debug with gcrypt|x64.ActiveCfg = Service Debug with gcrypt|x64
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Debug with gcrypt|x64.Build.0 = Service Debug with gcrypt|x64
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Debug|Win32.ActiveCfg = Service Debug|Win32
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Debug|Win32.Build.0 = Service Debug|Win32
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Debug|x64.ActiveCfg = Service Debug|x64
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Debug|x64.Build.0 = Service Debug|x64
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Release with gcrypt|Win32.ActiveCfg = Service Release with gcrypt|Win32
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Release with gcrypt|Win32.Build.0 = Service Release with gcrypt|Win32
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Release with gcrypt|x64.ActiveCfg = Service Release with gcrypt|x64
+ {12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Release with gcrypt|x64.Build.0 = Service Release with gcrypt|x64
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Release|Win32.ActiveCfg = Service Release|Win32
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Release|Win32.Build.0 = Service Release|Win32
{12460D00-D78A-4C68-BDE2-9E3B2F9CD0F3}.Service Release|x64.ActiveCfg = Service Release|x64
diff --git a/src/anytun.suo b/src/anytun.suo Binary files differdeleted file mode 100644 index 436969a..0000000 --- a/src/anytun.suo +++ /dev/null diff --git a/src/anytun.vcproj b/src/anytun.vcproj index c64c5da..519c5cf 100644 --- a/src/anytun.vcproj +++ b/src/anytun.vcproj @@ -318,6 +318,303 @@ />
</Configuration>
<Configuration
+ Name="Debug with gcrypt|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/I "C:\Program Files\boost\boost_1_35_0\""
+ Optimization="0"
+ PreprocessorDefinitions="LOG_FILE;LOG_STDOUT;LOG_WINEVENTLOG;NO_DAEMON;NO_EXEC;WIN32_LEAN_AND_MEAN;BOOST_ALL_DYN_LINK;ssize_t=long"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libgcrypt.lib libgpg-error.lib"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release with gcrypt|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="LOG_FILE;LOG_STDOUT;LOG_WINEVENTLOG;NO_DAEMON;NO_EXEC;WIN32_LEAN_AND_MEAN;BOOST_ALL_DYN_LINK;ssize_t=long"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libgcrypt.lib libgpg-error.lib"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Service Debug with gcrypt|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/I "C:\Program Files\boost\boost_1_35_0\""
+ Optimization="0"
+ PreprocessorDefinitions="LOG_FILE;LOG_STDOUT;LOG_WINEVENTLOG;WIN_SERVICE;NO_DAEMON;NO_EXEC;WIN32_LEAN_AND_MEAN;BOOST_ALL_DYN_LINK;ssize_t=long"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libgcrypt.lib libgpg-error.lib"
+ OutputFile="$(OutDir)\$(ProjectName)svc.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Service Release with gcrypt|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="LOG_FILE;LOG_STDOUT;LOG_WINEVENTLOG;WIN_SERVICE;NO_DAEMON;NO_EXEC;WIN32_LEAN_AND_MEAN;BOOST_ALL_DYN_LINK;ssize_t=long"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libgcrypt.lib libgpg-error.lib"
+ OutputFile="$(OutDir)\$(ProjectName)svc.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
@@ -618,6 +915,307 @@ Name="VCPostBuildEventTool"
/>
</Configuration>
+ <Configuration
+ Name="Debug with gcrypt|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/I "C:\Program Files\boost\boost_1_35_0\""
+ Optimization="0"
+ PreprocessorDefinitions="LOG_FILE;LOG_STDOUT;LOG_WINEVENTLOG;NO_DAEMON;NO_EXEC;WIN32_LEAN_AND_MEAN;BOOST_ALL_DYN_LINK;ssize_t=long"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libgcrypt.lib libgpg-error.lib"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release with gcrypt|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="LOG_FILE;LOG_STDOUT;LOG_WINEVENTLOG;NO_DAEMON;NO_EXEC;WIN32_LEAN_AND_MEAN;BOOST_ALL_DYN_LINK;ssize_t=long"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libgcrypt.lib libgpg-error.lib"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Service Debug with gcrypt|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/I "C:\Program Files\boost\boost_1_35_0\""
+ Optimization="0"
+ PreprocessorDefinitions="LOG_FILE;LOG_STDOUT;LOG_WINEVENTLOG;WIN_SERVICE;NO_DAEMON;NO_EXEC;WIN32_LEAN_AND_MEAN;BOOST_ALL_DYN_LINK;ssize_t=long"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ ForcedIncludeFiles=""
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libgcrypt.lib libgpg-error.lib"
+ OutputFile="$(OutDir)\$(ProjectName)svc.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Service Release with gcrypt|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="LOG_FILE;LOG_STDOUT;LOG_WINEVENTLOG;WIN_SERVICE;NO_DAEMON;NO_EXEC;WIN32_LEAN_AND_MEAN;BOOST_ALL_DYN_LINK;ssize_t=long"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="libgcrypt.lib libgpg-error.lib"
+ OutputFile="$(OutDir)\$(ProjectName)svc.exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories=""
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
@@ -907,6 +1505,38 @@ />
</FileConfiguration>
<FileConfiguration
+ Name="Debug with gcrypt|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="ANYTUN_OPTIONS"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release with gcrypt|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="ANYTUN_OPTIONS"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Service Debug with gcrypt|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="ANYTUN_OPTIONS"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Service Release with gcrypt|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="ANYTUN_OPTIONS"
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Debug|x64"
>
<Tool
@@ -938,6 +1568,38 @@ PreprocessorDefinitions="ANYTUN_OPTIONS"
/>
</FileConfiguration>
+ <FileConfiguration
+ Name="Debug with gcrypt|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="ANYTUN_OPTIONS"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release with gcrypt|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="ANYTUN_OPTIONS"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Service Debug with gcrypt|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="ANYTUN_OPTIONS"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Service Release with gcrypt|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="ANYTUN_OPTIONS"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath=".\packetSource.cpp"
diff --git a/src/cryptinit.hpp b/src/cryptinit.hpp index c171c15..f165c65 100644 --- a/src/cryptinit.hpp +++ b/src/cryptinit.hpp @@ -38,8 +38,6 @@ #include <gcrypt.h> // boost thread callbacks for libgcrypt -#if defined(BOOST_HAS_PTHREADS) - static int boost_mutex_init(void **priv) { boost::mutex *lock = new boost::mutex(); @@ -71,10 +69,6 @@ static struct gcry_thread_cbs gcry_threads_boost = { GCRY_THREAD_OPTION_USER, NULL, boost_mutex_init, boost_mutex_destroy, boost_mutex_lock, boost_mutex_unlock }; -#else -#error this libgcrypt thread callbacks only work with pthreads -#endif - #define MIN_GCRYPT_VERSION "1.2.0" diff --git a/src/keyDerivation.cpp b/src/keyDerivation.cpp index 6b102b9..25b7cf0 100644 --- a/src/keyDerivation.cpp +++ b/src/keyDerivation.cpp @@ -79,7 +79,7 @@ void KeyDerivation::calcMasterKey(std::string passphrase, u_int16_t length) } #ifndef USE_SSL_CRYPTO - Buffer digest(gcry_md_get_algo_dlen(GCRY_MD_SHA256)); + Buffer digest(static_cast<u_int32_t>(gcry_md_get_algo_dlen(GCRY_MD_SHA256))); gcry_md_hash_buffer(GCRY_MD_SHA256, digest.getBuf(), passphrase.c_str(), passphrase.length()); #else Buffer digest(u_int32_t(SHA256_DIGEST_LENGTH)); @@ -108,7 +108,7 @@ void KeyDerivation::calcMasterSalt(std::string passphrase, u_int16_t length) } #ifndef USE_SSL_CRYPTO - Buffer digest(gcry_md_get_algo_dlen(GCRY_MD_SHA1)); + Buffer digest(static_cast<u_int32_t>(gcry_md_get_algo_dlen(GCRY_MD_SHA1))); gcry_md_hash_buffer(GCRY_MD_SHA1, digest.getBuf(), passphrase.c_str(), passphrase.length()); #else Buffer digest(u_int32_t(SHA_DIGEST_LENGTH)); |