Merge branch 'Clang'

dependabot/npm_and_yarn/Src/WebController/UI/websocket-extensions-0.1.4
Grzegorz Rychlik 2020-03-10 14:47:17 +01:00
commit 6953a6e9e0
141 changed files with 2985 additions and 603 deletions

View File

@ -47,6 +47,12 @@ Global
Common\Common.vcxitems*{f2ec73d1-d533-4ee4-955a-a62e306472cc}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
ClangDebug|x64 = ClangDebug|x64
ClangDebug|x86 = ClangDebug|x86
ClangRelease|x64 = ClangRelease|x64
ClangRelease|x86 = ClangRelease|x86
ClangRwdi|x64 = ClangRwdi|x64
ClangRwdi|x86 = ClangRwdi|x86
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
@ -55,6 +61,18 @@ Global
ReleaseWithDebInfo|x86 = ReleaseWithDebInfo|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangDebug|x64.ActiveCfg = ClangDebug|x64
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangDebug|x64.Build.0 = ClangDebug|x64
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangDebug|x86.ActiveCfg = ClangDebug|Win32
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangDebug|x86.Build.0 = ClangDebug|Win32
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangRelease|x64.ActiveCfg = ClangRelease|x64
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangRelease|x64.Build.0 = ClangRelease|x64
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangRelease|x86.ActiveCfg = ClangRelease|Win32
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangRelease|x86.Build.0 = ClangRelease|Win32
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangRwdi|x64.ActiveCfg = ClangRwdi|x64
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangRwdi|x64.Build.0 = ClangRwdi|x64
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangRwdi|x86.ActiveCfg = ClangRwdi|Win32
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ClangRwdi|x86.Build.0 = ClangRwdi|Win32
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.Debug|x64.ActiveCfg = Debug|x64
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.Debug|x64.Build.0 = Debug|x64
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.Debug|x86.ActiveCfg = Debug|Win32
@ -67,6 +85,18 @@ Global
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ReleaseWithDebInfo|x64.Build.0 = ReleaseWithDebInfo|x64
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ReleaseWithDebInfo|x86.ActiveCfg = ReleaseWithDebInfo|Win32
{D00C849B-4FA5-4E84-B9EF-B1C8C338647A}.ReleaseWithDebInfo|x86.Build.0 = ReleaseWithDebInfo|Win32
{B7C64002-5002-410F-868C-826073AFA924}.ClangDebug|x64.ActiveCfg = ClangDebug|x64
{B7C64002-5002-410F-868C-826073AFA924}.ClangDebug|x64.Build.0 = ClangDebug|x64
{B7C64002-5002-410F-868C-826073AFA924}.ClangDebug|x86.ActiveCfg = ClangDebug|Win32
{B7C64002-5002-410F-868C-826073AFA924}.ClangDebug|x86.Build.0 = ClangDebug|Win32
{B7C64002-5002-410F-868C-826073AFA924}.ClangRelease|x64.ActiveCfg = ClangRelease|x64
{B7C64002-5002-410F-868C-826073AFA924}.ClangRelease|x64.Build.0 = ClangRelease|x64
{B7C64002-5002-410F-868C-826073AFA924}.ClangRelease|x86.ActiveCfg = ClangRelease|Win32
{B7C64002-5002-410F-868C-826073AFA924}.ClangRelease|x86.Build.0 = ClangRelease|Win32
{B7C64002-5002-410F-868C-826073AFA924}.ClangRwdi|x64.ActiveCfg = ClangRwdi|x64
{B7C64002-5002-410F-868C-826073AFA924}.ClangRwdi|x64.Build.0 = ClangRwdi|x64
{B7C64002-5002-410F-868C-826073AFA924}.ClangRwdi|x86.ActiveCfg = ClangRwdi|Win32
{B7C64002-5002-410F-868C-826073AFA924}.ClangRwdi|x86.Build.0 = ClangRwdi|Win32
{B7C64002-5002-410F-868C-826073AFA924}.Debug|x64.ActiveCfg = Debug|x64
{B7C64002-5002-410F-868C-826073AFA924}.Debug|x64.Build.0 = Debug|x64
{B7C64002-5002-410F-868C-826073AFA924}.Debug|x86.ActiveCfg = Debug|Win32
@ -79,6 +109,18 @@ Global
{B7C64002-5002-410F-868C-826073AFA924}.ReleaseWithDebInfo|x64.Build.0 = ReleaseWithDebInfo|x64
{B7C64002-5002-410F-868C-826073AFA924}.ReleaseWithDebInfo|x86.ActiveCfg = ReleaseWithDebInfo|Win32
{B7C64002-5002-410F-868C-826073AFA924}.ReleaseWithDebInfo|x86.Build.0 = ReleaseWithDebInfo|Win32
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangDebug|x64.ActiveCfg = ClangDebug|x64
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangDebug|x64.Build.0 = ClangDebug|x64
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangDebug|x86.ActiveCfg = ClangDebug|Win32
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangDebug|x86.Build.0 = ClangDebug|Win32
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangRelease|x64.ActiveCfg = ClangRelease|x64
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangRelease|x64.Build.0 = ClangRelease|x64
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangRelease|x86.ActiveCfg = ClangRelease|Win32
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangRelease|x86.Build.0 = ClangRelease|Win32
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangRwdi|x64.ActiveCfg = ClangRwdi|x64
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangRwdi|x64.Build.0 = ClangRwdi|x64
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangRwdi|x86.ActiveCfg = ClangRwdi|Win32
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ClangRwdi|x86.Build.0 = ClangRwdi|Win32
{946619C2-5959-4C0C-BC7C-1C27D825B042}.Debug|x64.ActiveCfg = Debug|x64
{946619C2-5959-4C0C-BC7C-1C27D825B042}.Debug|x64.Build.0 = Debug|x64
{946619C2-5959-4C0C-BC7C-1C27D825B042}.Debug|x86.ActiveCfg = Debug|Win32
@ -91,6 +133,18 @@ Global
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ReleaseWithDebInfo|x64.Build.0 = ReleaseWithDebInfo|x64
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ReleaseWithDebInfo|x86.ActiveCfg = ReleaseWithDebInfo|Win32
{946619C2-5959-4C0C-BC7C-1C27D825B042}.ReleaseWithDebInfo|x86.Build.0 = ReleaseWithDebInfo|Win32
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangDebug|x64.ActiveCfg = ClangDebug|x64
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangDebug|x64.Build.0 = ClangDebug|x64
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangDebug|x86.ActiveCfg = ClangDebug|Win32
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangDebug|x86.Build.0 = ClangDebug|Win32
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangRelease|x64.ActiveCfg = ClangRelease|x64
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangRelease|x64.Build.0 = ClangRelease|x64
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangRelease|x86.ActiveCfg = ClangRelease|Win32
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangRelease|x86.Build.0 = ClangRelease|Win32
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangRwdi|x64.ActiveCfg = ClangRwdi|x64
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangRwdi|x64.Build.0 = ClangRwdi|x64
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangRwdi|x86.ActiveCfg = ClangRwdi|Win32
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ClangRwdi|x86.Build.0 = ClangRwdi|Win32
{9341205B-AEE0-483B-9A80-975C2084C3AE}.Debug|x64.ActiveCfg = Debug|x64
{9341205B-AEE0-483B-9A80-975C2084C3AE}.Debug|x64.Build.0 = Debug|x64
{9341205B-AEE0-483B-9A80-975C2084C3AE}.Debug|x86.ActiveCfg = Debug|Win32
@ -103,6 +157,18 @@ Global
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ReleaseWithDebInfo|x64.Build.0 = ReleaseWithDebInfo|x64
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ReleaseWithDebInfo|x86.ActiveCfg = ReleaseWithDebInfo|Win32
{9341205B-AEE0-483B-9A80-975C2084C3AE}.ReleaseWithDebInfo|x86.Build.0 = ReleaseWithDebInfo|Win32
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangDebug|x64.ActiveCfg = Debug|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangDebug|x64.Build.0 = Debug|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangDebug|x86.ActiveCfg = Debug|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangDebug|x86.Build.0 = Debug|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangRelease|x64.ActiveCfg = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangRelease|x64.Build.0 = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangRelease|x86.ActiveCfg = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangRelease|x86.Build.0 = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangRwdi|x64.ActiveCfg = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangRwdi|x64.Build.0 = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangRwdi|x86.ActiveCfg = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ClangRwdi|x86.Build.0 = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.Debug|x64.ActiveCfg = Debug|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.Debug|x64.Build.0 = Debug|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.Debug|x86.ActiveCfg = Debug|Any CPU
@ -111,10 +177,22 @@ Global
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.Release|x64.Build.0 = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.Release|x86.ActiveCfg = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.Release|x86.Build.0 = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ReleaseWithDebInfo|x64.ActiveCfg = ReleaseWithDebInfo|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ReleaseWithDebInfo|x64.Build.0 = ReleaseWithDebInfo|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ReleaseWithDebInfo|x86.ActiveCfg = ReleaseWithDebInfo|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ReleaseWithDebInfo|x86.Build.0 = ReleaseWithDebInfo|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ReleaseWithDebInfo|x64.ActiveCfg = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ReleaseWithDebInfo|x64.Build.0 = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ReleaseWithDebInfo|x86.ActiveCfg = Release|Any CPU
{023B2DB0-6DA4-4F0D-988B-4D9BF522DA37}.ReleaseWithDebInfo|x86.Build.0 = Release|Any CPU
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangDebug|x64.ActiveCfg = ClangDebug|x64
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangDebug|x64.Build.0 = ClangDebug|x64
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangDebug|x86.ActiveCfg = ClangDebug|Win32
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangDebug|x86.Build.0 = ClangDebug|Win32
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangRelease|x64.ActiveCfg = ClangRelease|x64
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangRelease|x64.Build.0 = ClangRelease|x64
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangRelease|x86.ActiveCfg = ClangRelease|Win32
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangRelease|x86.Build.0 = ClangRelease|Win32
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangRwdi|x64.ActiveCfg = ClangRwdi|x64
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangRwdi|x64.Build.0 = ClangRwdi|x64
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangRwdi|x86.ActiveCfg = ClangRwdi|Win32
{53182258-F40E-4104-AFC6-1F327E556E77}.ClangRwdi|x86.Build.0 = ClangRwdi|Win32
{53182258-F40E-4104-AFC6-1F327E556E77}.Debug|x64.ActiveCfg = Debug|x64
{53182258-F40E-4104-AFC6-1F327E556E77}.Debug|x64.Build.0 = Debug|x64
{53182258-F40E-4104-AFC6-1F327E556E77}.Debug|x64.Deploy.0 = Debug|x64
@ -132,6 +210,18 @@ Global
{53182258-F40E-4104-AFC6-1F327E556E77}.ReleaseWithDebInfo|x86.ActiveCfg = ReleaseWithDebInfo|Win32
{53182258-F40E-4104-AFC6-1F327E556E77}.ReleaseWithDebInfo|x86.Build.0 = ReleaseWithDebInfo|Win32
{53182258-F40E-4104-AFC6-1F327E556E77}.ReleaseWithDebInfo|x86.Deploy.0 = ReleaseWithDebInfo|Win32
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangDebug|x64.ActiveCfg = Debug|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangDebug|x64.Build.0 = Debug|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangDebug|x86.ActiveCfg = Debug|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangDebug|x86.Build.0 = Debug|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangRelease|x64.ActiveCfg = Release|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangRelease|x64.Build.0 = Release|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangRelease|x86.ActiveCfg = Release|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangRelease|x86.Build.0 = Release|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangRwdi|x64.ActiveCfg = Release|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangRwdi|x64.Build.0 = Release|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangRwdi|x86.ActiveCfg = Release|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ClangRwdi|x86.Build.0 = Release|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.Debug|x64.ActiveCfg = Debug|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.Debug|x64.Build.0 = Debug|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.Debug|x86.ActiveCfg = Debug|Any CPU
@ -144,6 +234,18 @@ Global
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ReleaseWithDebInfo|x64.Build.0 = Release|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ReleaseWithDebInfo|x86.ActiveCfg = Release|Any CPU
{BC9BC3C3-4FBC-4F36-866C-AC2B4758BEBE}.ReleaseWithDebInfo|x86.Build.0 = Release|Any CPU
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangDebug|x64.ActiveCfg = ClangDebug|x64
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangDebug|x64.Build.0 = ClangDebug|x64
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangDebug|x86.ActiveCfg = ClangDebug|Win32
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangDebug|x86.Build.0 = ClangDebug|Win32
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangRelease|x64.ActiveCfg = ClangRelease|x64
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangRelease|x64.Build.0 = ClangRelease|x64
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangRelease|x86.ActiveCfg = ClangRelease|Win32
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangRelease|x86.Build.0 = ClangRelease|Win32
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangRwdi|x64.ActiveCfg = ClangRwdi|x64
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangRwdi|x64.Build.0 = ClangRwdi|x64
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangRwdi|x86.ActiveCfg = ClangRwdi|Win32
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.ClangRwdi|x86.Build.0 = ClangRwdi|Win32
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.Debug|x64.ActiveCfg = Debug|x64
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.Debug|x64.Build.0 = Debug|x64
{F2EC73D1-D533-4EE4-955A-A62E306472CC}.Debug|x86.ActiveCfg = Debug|Win32

View File

@ -1,5 +1,5 @@
#pragma once
#include "gen/EmbeddedResource.h"
#include "EmbeddedResource.h"
#ifndef EMBEDDED_DLL_PAYLOAD
#error Unknown resource guid.
#endif // !EMBEDDED_DLL_PAYLOAD

View File

@ -49,8 +49,7 @@ END
//
// DATA
//
IDR_DATA_! RCDATA "gen\EmbeddedResource.dat"
IDR_DATA_! RCDATA "EmbeddedResource.dat"
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////

View File

@ -1,6 +1,30 @@
<?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="ClangDebug|Win32">
<Configuration>ClangDebug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ClangDebug|x64">
<Configuration>ClangDebug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ClangRelease|Win32">
<Configuration>ClangRelease</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ClangRelease|x64">
<Configuration>ClangRelease</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ClangRwdi|Win32">
<Configuration>ClangRwdi</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ClangRwdi|x64">
<Configuration>ClangRwdi</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
@ -40,6 +64,12 @@
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -47,6 +77,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -54,12 +91,25 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -67,6 +117,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -74,6 +131,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@ -81,21 +145,39 @@
<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 Condition="'$(Configuration)|$(Platform)'=='ClangDebug|Win32'" Label="PropertySheets">
<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 Condition="'$(Configuration)|$(Platform)'=='ClangRelease|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|Win32'" Label="PropertySheets">
<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 Condition="'$(Configuration)|$(Platform)'=='ClangDebug|x64'" Label="PropertySheets">
<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>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|x64'" Label="PropertySheets">
<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>
@ -103,36 +185,72 @@
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_d86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_d86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_d64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|x64'">
<LinkIncremental>true</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_d64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_r86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|Win32'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_r86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|Win32'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_rwdi86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|Win32'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_rwdi86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_r64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|x64'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_r64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|x64'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_rwdi64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|x64'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_rwdi64</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
@ -142,7 +260,7 @@
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
@ -156,8 +274,42 @@
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(SolutionDir)..\Bin\NodeRelayDll_d86.dll" "$(ProjectDir)\" "StartNodeRelay"</Command>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_d86.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_d86.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
@ -168,7 +320,7 @@
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
@ -183,8 +335,43 @@
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(SolutionDir)..\Bin\NodeRelayDll_d64.dll" "$(ProjectDir)\" "StartNodeRelay"</Command>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_d64.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_d64.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
@ -195,7 +382,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@ -220,8 +407,53 @@
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(SolutionDir)..\Bin\NodeRelayDll_r86.dll" "$(ProjectDir)\" "StartNodeRelay"</Command>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_r86.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>None</DebugInformationFormat>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<SupportJustMyCode>false</SupportJustMyCode>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_r86.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|Win32'">
<ClCompile>
@ -232,7 +464,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>C3_RWDI;WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@ -256,8 +488,52 @@
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(SolutionDir)..\Bin\NodeRelayDll_rwdi86.dll" "$(ProjectDir)\" "StartNodeRelay"</Command>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_rwdi86.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>C3_RWDI;WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<SupportJustMyCode>false</SupportJustMyCode>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_rwdi86.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
@ -268,7 +544,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@ -291,8 +567,51 @@
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(SolutionDir)..\Bin\NodeRelayDll_r64.dll" "$(ProjectDir)\" "StartNodeRelay"</Command>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_r64.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>None</DebugInformationFormat>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<SupportJustMyCode>false</SupportJustMyCode>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<OmitFramePointers>true</OmitFramePointers>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_r64.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|x64'">
<ClCompile>
@ -303,7 +622,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>C3_RWDI;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@ -325,8 +644,50 @@
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(SolutionDir)..\Bin\NodeRelayDll_rwdi64.dll" "$(ProjectDir)\" "StartNodeRelay"</Command>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_rwdi64.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>C3_RWDI;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(IntDir)/gen;$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<SupportJustMyCode>false</SupportJustMyCode>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<ExceptionHandling>false</ExceptionHandling>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>dotnet "$(SolutionDir)..\Bin\Tools\netcoreapp2.1\ResourceGenerator.dll" "$(OutDir)NodeRelayDll_rwdi64.dll" "$(IntDir)\gen" "StartNodeRelay"</Command>
</PreBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir)gen</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CebuLoaderMain.cpp" />
@ -334,17 +695,29 @@
<ClCompile Include="QuietAbort.cpp" />
<ClCompile Include="Stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangDebug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">StdAfx.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='ClangDebug|Win32'">StdAfx.h</PrecompiledHeaderFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangRelease|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|Win32'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StdAfx.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='ClangRelease|Win32'">StdAfx.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|Win32'">StdAfx.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|Win32'">StdAfx.h</PrecompiledHeaderFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangDebug|x64'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">StdAfx.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='ClangDebug|x64'">StdAfx.h</PrecompiledHeaderFile>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangRelease|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|x64'">Create</PrecompiledHeader>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Release|x64'">StdAfx.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='ClangRelease|x64'">StdAfx.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|x64'">StdAfx.h</PrecompiledHeaderFile>
<PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|x64'">StdAfx.h</PrecompiledHeaderFile>
</ClCompile>
<ClCompile Include="UnexportedWinApi.cpp" />
<ClCompile Include="PeUtils.cpp" />

View File

@ -16,14 +16,7 @@
#include "UnexportedWinApi.h"
#include "LoadPe.h"
// C3 includes
//#include "Common/FSecure/CppTools/ByteConverter.h"
// Windows includes
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <Ehdata.h> //< For VEH constants: EH_MAGIC_NUMBER1, EH_PURE_MAGIC_NUMBER1, EH_EXCEPTION_NUMBER.
#include <intrin.h> //< For _ReturnAddress().
#include <winnt.h>

View File

@ -1,6 +1,30 @@
<?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="ClangDebug|Win32">
<Configuration>ClangDebug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ClangDebug|x64">
<Configuration>ClangDebug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ClangRelease|Win32">
<Configuration>ClangRelease</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ClangRelease|x64">
<Configuration>ClangRelease</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ClangRwdi|Win32">
<Configuration>ClangRwdi</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ClangRwdi|x64">
<Configuration>ClangRwdi</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
@ -40,6 +64,12 @@
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -47,6 +77,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -54,12 +91,25 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -67,6 +117,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@ -74,6 +131,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@ -83,21 +147,39 @@
<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 Condition="'$(Configuration)|$(Platform)'=='ClangDebug|Win32'" Label="PropertySheets">
<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 Condition="'$(Configuration)|$(Platform)'=='ClangRelease|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|Win32'" Label="PropertySheets">
<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 Condition="'$(Configuration)|$(Platform)'=='ClangDebug|x64'" Label="PropertySheets">
<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>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|x64'" Label="PropertySheets">
<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>
@ -105,42 +187,100 @@
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_d86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_d86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_d64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|x64'">
<LinkIncremental>true</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_d64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_r86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|Win32'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_r86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|Win32'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_rwdi86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|Win32'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_rwdi86</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_r64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|x64'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_r64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|x64'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\</OutDir>
<TargetName>$(ProjectName)_rwdi64</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|x64'">
<LinkIncremental>false</LinkIncremental>
<IntDir>$(SolutionDir)..\Tmp\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
<OutDir>$(SolutionDir)..\Bin\Clang\</OutDir>
<TargetName>$(ProjectName)_rwdi64</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
@ -162,7 +302,29 @@
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";_DEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangDebug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";_DEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
@ -186,7 +348,36 @@
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<SupportJustMyCode>true</SupportJustMyCode>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
@ -215,7 +406,36 @@
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>C3_RWDI;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";C3_RWDI;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<SupportJustMyCode>false</SupportJustMyCode>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";C3_RWDI;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
@ -244,7 +464,36 @@
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";NDEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<SupportJustMyCode>true</SupportJustMyCode>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangRelease|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";NDEBUG;_CONSOLE;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
@ -273,7 +522,36 @@
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>C3_RWDI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";C3_RWDI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<SupportJustMyCode>false</SupportJustMyCode>
<AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);$(SolutionDir)/Common</AdditionalIncludeDirectories>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir);$(ProjectDir)</AdditionalLibraryDirectories>
<AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Netapi32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>C3_BIN_DIR=R"($(OutDir))";C3_SOLUTION_DIR=R"($(SolutionDir))";C3_RWDI;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<AdditionalOptions>
</AdditionalOptions>
@ -314,11 +592,17 @@
<ClCompile Include="MockDeviceBridge.cpp" />
<ClCompile Include="StdAfx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangDebug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangDebug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangRelease|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangRelease|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseWithDebInfo|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ClangRwdi|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>

View File

@ -3,7 +3,7 @@
/// Entry point of the application.
/// @param argc number of program arguments.
/// @param argv vector of program arguments.
int main(DWORD argc, char* argv[])
int main(int argc, char* argv[])
try
{
std::cout << "Custom Command and Control - Channel linter. BUILD: " << C3_BUILD_VERSION << std::endl;

View File

@ -40,6 +40,9 @@ namespace FSecure::C3::Linter
{
}
/// Destructor
virtual ~BooleanFormElement() = default;
/// Set boolean value from input accepted values interpreted as true are "true", "yes", "y", "1"
/// @param input to validate
void ValidateAndSet(std::string_view input) override
@ -59,6 +62,10 @@ namespace FSecure::C3::Linter
{
}
/// Destructor
virtual ~StringFormElement() = default;
/// Validate and set string value from input
/// @param input to validate
/// @throws std::invalid_argument if validation fails
@ -77,6 +84,9 @@ namespace FSecure::C3::Linter
{
}
/// Destructor
virtual ~IpFormElement() = default;
/// Validate and set IP value from input
/// @param input to validate
/// @throws std::invalid_argument if validation fails
@ -112,6 +122,9 @@ namespace FSecure::C3::Linter
{
}
/// Destructor
virtual ~BinaryFormElement() = default;
/// Validate and set binary value from input (in base64 string)
/// @param input to validate
/// @throws std::invalid_argument if validation fails
@ -142,6 +155,9 @@ namespace FSecure::C3::Linter
{
}
/// Destructor
virtual ~NumericFormElement() = default;
/// Validate and set numeric value from input
/// @param input to validate
/// @throws std::invalid_argument if validation fails

View File

@ -25,6 +25,9 @@ namespace FSecure::C3::Linter
Binary,
};
/// Destructor
virtual ~FormElement() = default;
/// Validate input against argument and set as value
virtual void ValidateAndSet(std::string_view input) = 0;

View File

@ -62,7 +62,7 @@ namespace FSecure::C3::Linter
{
static std::mutex mutex;
std::lock_guard lock(mutex);
std::cout << FSecure::C3::Utils::ConvertLogMessageToConsoleText("", message, nullptr) << std::endl;
std::cout << FSecure::C3::Utils::ConvertLogMessageToConsoleText("", message, "") << std::endl;
}
void MockDeviceBridge::SetUpdateDelay(std::chrono::milliseconds minUpdateDelay, std::chrono::milliseconds maxUpdateDelay)

View File

@ -3,7 +3,7 @@
namespace FSecure::C3::Linter
{
/// Device bridge used to mock its functionality
class MockDeviceBridge : public FSecure::C3::AbstractDeviceBridge, public std::enable_shared_from_this<MockDeviceBridge>
class MockDeviceBridge final : public FSecure::C3::AbstractDeviceBridge, public std::enable_shared_from_this<MockDeviceBridge>
{
public:
/// Create Mock device bridge to device

View File

@ -46,7 +46,7 @@ namespace andrivet::ADVobfuscator
struct ObfString<CharT, Encryptor, std::index_sequence<I...>>
{
constexpr ALWAYS_INLINE ObfString(const CharT* str) noexcept
: m_Encryptor{}, m_Buffer{ m_Encryptor.Encrypt<I>(str[I])... } { }
: m_Encryptor{}, m_Buffer{ m_Encryptor.template Encrypt<I>(str[I])... } { }
~ObfString() noexcept
{

View File

@ -90,11 +90,7 @@ struct enc {
if (num_symbols == NumSymbols) {
data::put(encoded, state, CodecVariant::symbol(Codec::template index_last<SymbolIndex>(src)));
padder<CodecVariant::generates_padding()> pad;
#ifdef _MSC_VER
pad.operator()<CodecVariant>(encoded, state, Codec::encoded_block_size() - NumSymbols);
#else
pad.template operator()<CodecVariant>(encoded, state, Codec::encoded_block_size() - NumSymbols);
#endif
return;
}
data::put(encoded, state, CodecVariant::symbol(Codec::template index<SymbolIndex>(src)));

View File

@ -30,7 +30,7 @@
#define CPPRESTSDK_BUILD_TYPE "release/"
#endif
#pragma comment(lib, "Common/CppRestSdk/lib/" CPPRESTSDK_BUILD_TYPE CPPRESTSDK_ARCH "cpprest142_2_10.lib")
#pragma comment(lib, C3_SOLUTION_DIR "Common/CppRestSdk/lib/" CPPRESTSDK_BUILD_TYPE CPPRESTSDK_ARCH "cpprest142_2_10.lib")
#undef CPPRESTSDK_ARCH
#undef CPPRESTSDK_BUILD_TYPE

View File

@ -66,7 +66,7 @@ void FSecure::C3::Interfaces::Channels::Slack::DeleteReplies(std::vector<std::st
m_slackObj.DeleteMessage(ts);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FSecure::ByteView FSecure::C3::Interfaces::Channels::Slack::GetCapability()
const char* FSecure::C3::Interfaces::Channels::Slack::GetCapability()
{
return R"_(
{

View File

@ -10,6 +10,9 @@ namespace FSecure::C3::Interfaces::Channels
/// @param arguments factory arguments.
Slack(ByteView arguments);
/// Destructor
virtual ~Slack() = default;
/// OnSend callback implementation.
/// @param packet data to send to Channel.
/// @returns size_t number of bytes successfully written.
@ -20,8 +23,8 @@ namespace FSecure::C3::Interfaces::Channels
ByteVector OnReceiveFromChannel();
/// Get channel capability.
/// @returns ByteView view of channel capability.
static ByteView GetCapability();
/// @returns Channel capability in JSON format
static const char* GetCapability();
/// Values used as default for channel jitter. 30 ms if unset. Current jitter value can be changed at runtime.
/// Set long delay otherwise slack rate limit will heavily impact channel.

View File

@ -14,12 +14,12 @@ namespace
pSA->nLength = sizeof(SECURITY_ATTRIBUTES);
pSA->bInheritHandle = true;
TCHAR* szSD = TEXT("D:(A;ID;FA;;;S-1-1-0)");
const wchar_t* szSD = OBF(L"D:(A;ID;FA;;;S-1-1-0)");
if (NULL == pSA)
return FALSE;
return ConvertStringSecurityDescriptorToSecurityDescriptor(
return ConvertStringSecurityDescriptorToSecurityDescriptorW(
szSD,
SDDL_REVISION_1,
&(pSA->lpSecurityDescriptor),
@ -194,7 +194,7 @@ FSecure::ByteVector FSecure::C3::Interfaces::Channels::UncShareFile::OnRunComman
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FSecure::ByteView FSecure::C3::Interfaces::Channels::UncShareFile::GetCapability()
const char* FSecure::C3::Interfaces::Channels::UncShareFile::GetCapability()
{
return R"(
{

View File

@ -10,6 +10,9 @@ namespace FSecure::C3::Interfaces::Channels
/// @param arguments factory arguments.
UncShareFile(ByteView arguments);
/// Destructor
virtual ~UncShareFile() = default;
/// OnSend callback implementation.
/// @param blob data to send to Channel.
/// @returns size_t number of bytes successfully written.
@ -20,8 +23,8 @@ namespace FSecure::C3::Interfaces::Channels
std::vector<ByteVector> OnReceiveFromChannel();
/// Get channel capability.
/// @returns ByteView view of channel capability.
static ByteView GetCapability();
/// @returns Channel capability in JSON format
static const char* GetCapability();
/// Processes internal (C3 API) Command.
/// @param command a buffer containing whole command and it's parameters.

View File

@ -37,8 +37,8 @@ namespace FSecure::C3::Interfaces::Connectors
ByteVector PeripheralCreationCommand(ByteView connectionId, ByteView data, bool isX64) override;
/// Return json with commands.
/// @return ByteView Commands description in JSON format.
static ByteView GetCapability();
/// @return Capability description in JSON format.
static const char* GetCapability();
private:
/// Represents a single C3 <-> Covenant connection, as well as each Grunt in network.
@ -400,7 +400,7 @@ FSecure::ByteVector FSecure::C3::Interfaces::Connectors::Covenant::OnRunCommand(
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FSecure::ByteView FSecure::C3::Interfaces::Connectors::Covenant::GetCapability()
const char* FSecure::C3::Interfaces::Connectors::Covenant::GetCapability()
{
return R"(
{
@ -538,7 +538,7 @@ FSecure::ByteVector FSecure::C3::Interfaces::Connectors::Covenant::Connection::R
case 0:
return {}; //< The connection has been gracefully closed.
case SOCKET_ERROR:
case static_cast<DWORD>(SOCKET_ERROR):
throw FSecure::SocketsException(OBF("Error receiving from Socket : ") + std::to_string(WSAGetLastError()) + OBF("."), WSAGetLastError());
}

View File

@ -12,14 +12,17 @@ namespace FSecure::C3::Interfaces::Connectors
/// @param arguments factory arguments.
MockServer(ByteView);
/// Destructor
virtual ~MockServer() = default;
/// OnCommandFromBinder callback implementation.
/// @param binderId Identifier of Peripheral who sends the Command.
/// @param command full Command with arguments.
void OnCommandFromBinder(ByteView binderId, ByteView command) override;
/// Returns json with Commands.
/// @return Commands description in JSON format.
static ByteView GetCapability();
/// @return Capability in JSON format
static const char* GetCapability();
/// Processes internal (C3 API) Command.
/// @param command a buffer containing whole command and it's parameters.
@ -161,7 +164,7 @@ FSecure::ByteVector FSecure::C3::Interfaces::Connectors::MockServer::PeripheralC
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FSecure::ByteView FSecure::C3::Interfaces::Connectors::MockServer::GetCapability()
const char* FSecure::C3::Interfaces::Connectors::MockServer::GetCapability()
{
return R"(
{

View File

@ -11,7 +11,7 @@ namespace FSecure::C3::Interfaces::Connectors
TeamServer(ByteView arguments);
/// A public destructor.
~TeamServer();
virtual ~TeamServer();
/// OnCommandFromConnector callback implementation.
/// @param binderId Identifier of Peripheral who sends the Command.
@ -31,8 +31,8 @@ namespace FSecure::C3::Interfaces::Connectors
ByteVector PeripheralCreationCommand(ByteView connectionId, ByteView data, bool isX64) override;
/// Return json with commands.
/// @return ByteView Commands description in JSON format.
static ByteView GetCapability();
/// @return Capability in JSON format
static const char* GetCapability();
private:
/// Represents a single C3 <-> Team Server connection, as well as each beacon in network.
@ -208,7 +208,7 @@ FSecure::ByteVector FSecure::C3::Interfaces::Connectors::TeamServer::OnRunComman
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FSecure::ByteView FSecure::C3::Interfaces::Connectors::TeamServer::GetCapability()
const char* FSecure::C3::Interfaces::Connectors::TeamServer::GetCapability()
{
return R"(
{
@ -312,7 +312,7 @@ void FSecure::C3::Interfaces::Connectors::TeamServer::Connection::Send(ByteView
std::unique_lock<std::mutex> lock{ owner->m_SendMutex };
// Write four bytes indicating the length of the next chunk of data.
DWORD chunkLength = static_cast<DWORD>(data.size()), bytesWritten = 0;
DWORD chunkLength = static_cast<DWORD>(data.size());
if (SOCKET_ERROR == send(m_Socket, reinterpret_cast<char*>(&chunkLength), 4, 0))
throw FSecure::SocketsException(OBF("Error sending to Socket : ") + std::to_string(WSAGetLastError()) + OBF("."), WSAGetLastError());
@ -340,7 +340,7 @@ FSecure::ByteVector FSecure::C3::Interfaces::Connectors::TeamServer::Connection:
case 0:
return {}; //< The connection has been gracefully closed.
case SOCKET_ERROR:
case static_cast<DWORD>(SOCKET_ERROR):
throw FSecure::SocketsException(OBF("Error receiving from Socket : ") + std::to_string(WSAGetLastError()) + OBF("."), WSAGetLastError());
}

View File

@ -105,7 +105,7 @@ bool FSecure::C3::Interfaces::Peripherals::Beacon::IsNoOp(ByteView data)
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FSecure::ByteView FSecure::C3::Interfaces::Peripherals::Beacon::GetCapability()
const char* FSecure::C3::Interfaces::Peripherals::Beacon::GetCapability()
{
return R"(
{

View File

@ -19,7 +19,7 @@ namespace FSecure::C3::Interfaces::Peripherals
Beacon(ByteView arguments);
/// Destructor
~Beacon();
virtual ~Beacon();
/// Sending callback implementation.
/// @param packet to send to the Implant.
@ -30,8 +30,8 @@ namespace FSecure::C3::Interfaces::Peripherals
ByteVector OnReceiveFromPeripheral() override;
/// Return json with commands.
/// @return ByteView Commands description in JSON format.
static ByteView GetCapability();
/// @return Capability description in JSON format.
static const char* GetCapability();
/// Close Peripheral Beacon
/// Calls superclass Close and prepares to exit without deadlocking

View File

@ -1,5 +1,15 @@
#include "StdAfx.h"
#if defined (__clang__)
#warning("Compilation of Grunt peripheral is only supported with MSVC")
#elif defined (_MSC_VER)
#include "Grunt.h"
//For loading of CLR
#pragma comment(lib, "mscoree.lib")
#import "mscorlib.tlb" raw_interfaces_only high_property_prefixes("_get", "_put", "_putref") rename("ReportEvent", "InteropServices_ReportEvent") auto_rename
using namespace mscorlib;
//This function will run the .NET assembly
@ -285,4 +295,4 @@ FSecure::ByteView FSecure::C3::Interfaces::Peripherals::Grunt::GetCapability()
)";
}
#endif

View File

@ -1,13 +1,12 @@
#pragma once
#if defined (__clang__)
+#warning("Compilation of Grunt peripheral is only supported with MSVC")
#elif defined (_MSC_VER)
#include <optional>
#include <metahost.h>
//For loading of CLR
#pragma comment(lib, "mscoree.lib")
#import "mscorlib.tlb" raw_interfaces_only high_property_prefixes("_get", "_put", "_putref") rename("ReportEvent", "InteropServices_ReportEvent") auto_rename
using namespace mscorlib;
#include "Common/FSecure/WinTools/Pipe.h"
/// Forward declaration of Connector associated with implant.
@ -36,7 +35,7 @@ namespace FSecure::C3::Interfaces::Peripherals
/// Return json with commands.
/// @return ByteView Commands description in JSON format.
static ByteView GetCapability();
/// Close peripheral Grunt
/// Calls superclass CLose and prepares to exit without deadlocking
void Close() override;
@ -60,3 +59,4 @@ namespace FSecure::C3::Interfaces::Peripherals
bool m_Close = false;
};
}
#endif

View File

@ -47,7 +47,7 @@ FSecure::ByteVector FSecure::C3::Interfaces::Peripherals::Mock::TestErrorCommand
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FSecure::ByteView FSecure::C3::Interfaces::Peripherals::Mock::GetCapability()
const char* FSecure::C3::Interfaces::Peripherals::Mock::GetCapability()
{
return R"(
{

View File

@ -17,6 +17,9 @@ namespace FSecure::C3::Interfaces::Peripherals
/// @param ByteView unused.
Mock(ByteView);
/// Destructor
virtual ~Mock() = default;
/// Sending callback implementation.
/// @param packet to send to the Implant.
void OnCommandFromConnector(ByteView packet) override;
@ -26,8 +29,8 @@ namespace FSecure::C3::Interfaces::Peripherals
ByteVector OnReceiveFromPeripheral() override;
/// Return json with commands.
/// @return ByteView Commands description in JSON format.
static ByteView GetCapability();
/// @return Capability description in JSON format.
static const char* GetCapability();
/// Processes internal (C3 API) Command.
/// @param command a buffer containing whole command and it's parameters.

View File

@ -63,7 +63,7 @@ namespace FSecure::C3
ret.m_StartupJitter = std::pair(Iface::s_MinUpdateDelay, Iface::s_MaxUpdateDelay);
#ifdef C3_IS_GATEWAY
ret.m_Name = GetInterfaceName<Iface>();
ret.m_Capability = EnsureDefaultCapability<Iface>::GetCapability<EnsureDefaultCapability<Iface>::HasCustomCapability>(); // Simpler syntax should be available, but I've encountered MSVC bug with SFINAE.
ret.m_Capability = EnsureDefaultCapability<Iface>::template GetCapability<EnsureDefaultCapability<Iface>::HasCustomCapability>(); // Simpler syntax should be available, but I've encountered MSVC bug with SFINAE.
#endif //C3_IS_GATEWAY
return ret;
@ -105,8 +105,8 @@ namespace FSecure::C3
Channel()
{
static_assert(Iface::s_MinUpdateDelay >= 30ms && Iface::s_MinUpdateDelay <= Iface::s_MaxUpdateDelay, "The frequency is set incorrectly");
m_MinUpdateDelay = Iface::s_MinUpdateDelay;
m_MaxUpdateDelay = Iface::s_MaxUpdateDelay;
this->m_MinUpdateDelay = Iface::s_MinUpdateDelay;
this->m_MaxUpdateDelay = Iface::s_MaxUpdateDelay;
}
/// Callback that is periodically called for every Device to update itself.
@ -197,7 +197,7 @@ namespace FSecure::C3
class Connector : public AbstractConnector
{
};
#endif C3_IS_GATEWAY
#endif // C3_IS_GATEWAY
#pragma warning( push )
#pragma warning( disable : 4307)
@ -212,8 +212,8 @@ namespace FSecure::C3
Peripheral()
{
static_assert(Iface::s_MinUpdateDelay >= 30ms && Iface::s_MinUpdateDelay <= Iface::s_MaxUpdateDelay, "The frequency is set incorrectly");
m_MinUpdateDelay = Iface::s_MinUpdateDelay;
m_MaxUpdateDelay = Iface::s_MaxUpdateDelay;
this->m_MinUpdateDelay = Iface::s_MinUpdateDelay;
this->m_MaxUpdateDelay = Iface::s_MaxUpdateDelay;
}
};
#pragma warning( pop )

View File

@ -15,6 +15,9 @@ namespace FSecure::C3
/// Abstract Relay.
struct Relay
{
/// Destructor
virtual ~Relay() = default;
/// Waits for Relay to be terminated internally by a C3 API Command (e.g. from WebController).
virtual void Join() = 0;
};
@ -50,7 +53,7 @@ namespace FSecure::C3
namespace Utils
{
/// Gate/Node Relay starters logger callback prototype.
using LoggerCallback = void(*)(LogMessage const&, std::string_view*);
using LoggerCallback = void(*)(LogMessage const&, std::string_view);
/// Creates a Gateway.
/// @param callbackOnLog callback fired whenever a new Log entry is being added.
@ -70,12 +73,15 @@ namespace FSecure::C3
/// @param message information to log.
/// @param sender ID of the Interface reporting the message. If sender.empty() then the message comes from internal Relay mechanisms. If sender is null then it comes from outside the Relay.
/// @return Constructed string.
std::string ConvertLogMessageToConsoleText(std::string_view relayName, FSecure::C3::LogMessage const& message, std::string_view* sender);
std::string ConvertLogMessageToConsoleText(std::string_view relayName, FSecure::C3::LogMessage const& message, std::string_view sender);
}
/// Device bridge between C3 Core and C3 Mantle.
struct AbstractDeviceBridge
{
/// Destructor
virtual ~AbstractDeviceBridge() = default;
/// Called by Relay just after the Device creation.
virtual void OnAttach() = 0;
@ -133,6 +139,9 @@ namespace FSecure::C3
/// Connector bridge between C3 Core and C3 Mantle.
struct AbstractConnectorBridge
{
/// Destructor
virtual ~AbstractConnectorBridge() = default;
/// Called by Relay just after creation of the Connector.
virtual void OnAttach() = 0;

View File

@ -76,7 +76,7 @@ namespace FSecure::C3
}
/// Get proper map member for type T.
template <typename T> auto& GetMap() { static_assert(false, "Template type not supported."); }
template <typename T> auto& GetMap() = delete;
template <> auto& GetMap<AbstractChannel>() { return m_Channels; }
template <> auto& GetMap<AbstractPeripheral>() { return m_Peripherals; }
template <> auto& GetMap<AbstractConnector>() { return m_Connectors; }
@ -101,7 +101,7 @@ namespace FSecure::C3
std::string GetInterfaceName()
{
# ifndef _MSC_VER
static_assert(false, "Current implementation supports only MSVC.");
static_assert(false, "Current implementation supports only MSVC and clang-cl.");
# endif
std::string_view fullName = __FUNCSIG__;
@ -119,7 +119,13 @@ namespace FSecure::C3
auto retVal = std::string{ fullName.substr(offset + "::"sv.size()) };
if ((offset = retVal.rfind('>')) == std::string::npos)
# if defined (_MSC_VER) && !defined(__clang__) // MSVC
char afterName = '>';
# elif defined (_MSC_VER) && defined(__clang__) // Clang-cl
char afterName = ']';
# endif
if ((offset = retVal.rfind(afterName)) == std::string::npos)
throw std::logic_error{ OBF("Cannot generate interface name.") };
retVal = retVal.substr(0, offset);

View File

@ -7,18 +7,18 @@
// C3 Core static library.
#ifdef _WIN64
# ifdef _DEBUG
# pragma comment(lib, "../Bin/Core_d64.lib")
# pragma comment(lib, C3_BIN_DIR "Core_d64.lib")
# elif defined(C3_RWDI)
# pragma comment(lib, "../Bin/Core_rwdi64.lib")
# pragma comment(lib, C3_BIN_DIR "Core_rwdi64.lib")
# else
# pragma comment(lib, "../Bin/Core_r64.lib")
# pragma comment(lib, C3_BIN_DIR "Core_r64.lib")
# endif
#else
# ifdef _DEBUG
# pragma comment(lib, "../Bin/Core_d86.lib")
# pragma comment(lib, C3_BIN_DIR "Core_d86.lib")
# elif defined(C3_RWDI)
# pragma comment(lib, "../Bin/Core_rwdi86.lib")
# pragma comment(lib, C3_BIN_DIR "Core_rwdi86.lib")
# else
# pragma comment(lib, "../Bin/Core_r86.lib")
# pragma comment(lib, C3_BIN_DIR "Core_r86.lib")
# endif
#endif

View File

@ -1,8 +1,10 @@
#pragma once
#include "ByteArray.h"
#include "Utils.h"
#include <string>
#include <string_view>
#include <vector>
namespace FSecure
{
/// Forward declaration
@ -23,8 +25,8 @@ namespace FSecure
template <typename T>
class ByteSizeFunctionType
{
template <typename C> static uint32_t test(decltype(FSecure::ByteConverter<T>::Size(std::declval<C>())));
template <typename C> static uint16_t test(decltype(FSecure::ByteConverter<T>::Size(std::void_t<C>)));
template <typename C> static uint32_t test(decltype(FSecure::ByteConverter<C>::Size(std::declval<C>())));
template <typename C> static uint16_t test(decltype(FSecure::ByteConverter<C>::Size()));
template <typename C> static uint8_t test(...);
public:
@ -162,30 +164,25 @@ namespace FSecure
template <typename T, typename ...Ts, typename = std::enable_if_t<Utils::IsOneOf<T, ByteView, ByteVector>::value>>
ByteVector& Concat(T const& arg, Ts const& ...args)
{
if constexpr (!sizeof...(Ts))
{
auto oldSize = size();
resize(oldSize + arg.size());
memcpy(data() + oldSize, arg.data(), arg.size());
}
else
{
Concat(arg);
auto oldSize = size();
resize(oldSize + arg.size());
memcpy(data() + oldSize, arg.data(), arg.size());
if constexpr (sizeof...(Ts) != 0)
Concat(args...);
}
return *this;
}
// msvc can handle fold expression in debug mode, but fails with internal compiler error in release.
// Some versions of msvc can handle fold expression in debug mode, but fails with internal compiler error in release.
// For this reason recursive version is used as deafult.
//template <typename ...T, typename = std::enable_if_t<((Utils::IsOneOf<T, ByteView, ByteVector>::value && ...))>>
//ByteVector& Concat(T const& ...arg)
//ByteVector& Concat(T const& ...args)
//{
// auto oldSize = size();
// auto foldSize = (arg.size() + ...);
// auto foldSize = (args.size() + ...);
// resize(oldSize + foldSize);
// auto ptr = data() + oldSize;
// ((memcpy(ptr, arg.data(), arg.size()), (ptr += arg.size())), ...);
// ((memcpy(ptr, args.data(), args.size()), (ptr += args.size())), ...);
// return *this;
//}
@ -200,13 +197,6 @@ namespace FSecure
return ByteVector{}.Write(arg, args...);
}
/// Proxy function to ByteView::Read.
/// This function is added for convenience, but it does not change the state of ByteVector in a way ByteView::Read moves to next stored element after each Read.
template<typename ...T, typename = std::void_t<decltype(std::declval<ByteView>().Read<T...>())>>
auto Read() const
{
return ByteView{ *this }.Read<T...>();
}
/// Calculate the size that the argument will take in memory
/// @param arg. Argument to be stored.
@ -215,20 +205,14 @@ namespace FSecure
template<typename T, typename ...Ts>
static size_t Size(T const& arg, Ts const& ...args)
{
if constexpr (!sizeof...(Ts))
{
// There is only one type to calculate size for. Find implementation of Size for that type.
if constexpr (ByteSizeFunctionType<T>::value == ByteSizeFunctionType<T>::compileTime)
return FSecure::ByteConverter<T>::Size();
else if constexpr (ByteSizeFunctionType<T>::value == ByteSizeFunctionType<T>::runTime)
return FSecure::ByteConverter<T>::Size(arg);
else if constexpr (ByteSizeFunctionType<T>::value == ByteSizeFunctionType<T>::absent)
return FSecure::ByteConverter<T>::To(arg).size();
}
else
{
if constexpr (sizeof...(Ts) != 0)
return Size(arg) + Size(args...);
}
else if constexpr (ByteSizeFunctionType<T>::value == ByteSizeFunctionType<T>::compileTime)
return FSecure::ByteConverter<T>::Size();
else if constexpr (ByteSizeFunctionType<T>::value == ByteSizeFunctionType<T>::runTime)
return FSecure::ByteConverter<T>::Size(arg);
else if constexpr (ByteSizeFunctionType<T>::value == ByteSizeFunctionType<T>::absent)
return FSecure::ByteConverter<T>::To(arg).size();
}
private:
@ -237,17 +221,12 @@ namespace FSecure
/// @param args. Rest of objects that will be handled with recursion.
/// @return itself to allow chaining.
template<typename T, typename ...Ts, typename std::enable_if_t<std::is_same_v<decltype(FSecure::ByteConverter<T>::To(std::declval<T>())), FSecure::ByteVector >, int> = 0>
ByteVector & Store(T const& arg, Ts const& ...args)
ByteVector& Store(T const& arg, Ts const& ...args)
{
if constexpr (!sizeof...(Ts))
{
Concat(FSecure::ByteConverter<T>::To(arg));
}
else
{
Store(arg);
Concat(FSecure::ByteConverter<T>::To(arg));
if constexpr (sizeof...(Ts) != 0)
Store(args...);
}
return *this;
}
@ -264,13 +243,13 @@ namespace FSecure
auto elementSize = static_cast<uint32_t>(obj.size());
ret.resize(Size(obj));
memcpy(ret.data(), &elementSize, sizeof(elementSize));
memcpy(ret.data() + sizeof(elementSize), obj.data(), elementSize * sizeof(T::value_type));
memcpy(ret.data() + sizeof(elementSize), obj.data(), elementSize * sizeof(typename T::value_type));
return ret;
}
static size_t Size(T const& obj)
{
return sizeof(uint32_t) + (obj.size() * sizeof(T::value_type));
return sizeof(uint32_t) + (obj.size() * sizeof(typename T::value_type));
}
// Reading functions are part of ByteView implementation. To deserialize data include ByteView.h

View File

@ -1,6 +1,7 @@
#pragma once
#include "ByteVector.h"
#include "ByteArray.h"
namespace FSecure
{
@ -163,21 +164,17 @@ namespace FSecure
/// @code auto [a, b, c] = someByteView.Read<int, float, std::string>(); @endcode
/// @note Returned types does not have to match exactly with Read template parameters list.
/// It is possible to create tags that will be used to retrieve different type.
template<typename T, typename ...Ts, typename = decltype(FSecure::ByteConverter<std::remove_const_t<T>>::From(std::declval<ByteView>()))>
template<typename T, typename ...Ts, typename = decltype(FSecure::ByteConverter<Utils::RemoveCVR<T>>::From(std::declval<ByteView&>()))>
auto Read()
{
if constexpr (!sizeof...(Ts))
{
return ByteConverter<std::remove_const_t<T>>::From(*this);
}
auto current = ByteConverter<Utils::RemoveCVR<T>>::From(*this);
if constexpr (sizeof...(Ts) == 0)
return current;
else if constexpr (sizeof...(Ts) == 1)
return std::make_tuple(std::move(current), Read<Ts...>());
else
{
auto current = std::make_tuple(Read<T>());
if constexpr (sizeof...(Ts) > 1)
return std::tuple_cat(std::move(current), Read<Ts...>());
else
return std::tuple_cat(std::move(current), std::make_tuple(Read<Ts...>()));
}
return std::tuple_cat(std::make_tuple(std::move(current)), Read<Ts...>());
}
};
@ -190,19 +187,14 @@ namespace FSecure
throw std::out_of_range{ OBF(": Cannot read size from ByteView ") };
auto elementCount = *reinterpret_cast<const uint32_t*>(bv.data());
auto byteCount = elementCount * sizeof(T::value_type);
auto byteCount = elementCount * sizeof(typename T::value_type);
bv.remove_prefix(sizeof(uint32_t));
T retVal;
if constexpr (Utils::IsOneOf<T, ByteVector, std::string, std::wstring>::value)
{
retVal.resize(elementCount);
std::memcpy(retVal.data(), bv.data(), byteCount);
}
retVal.resize(elementCount), std::memcpy(retVal.data(), bv.data(), byteCount);
else
{
retVal = T{ reinterpret_cast<typename T::value_type const*>(bv.data()), elementCount };
}
bv.remove_prefix(byteCount);
return retVal;

View File

@ -14,7 +14,7 @@
#define Z_DEBUG ""
#endif
#pragma comment(lib, "Common/zlib/lib/" Z_PLATFORM "zlib" Z_DEBUG ".lib")
#pragma comment(lib, C3_SOLUTION_DIR "Common/zlib/lib/" Z_PLATFORM "zlib" Z_DEBUG ".lib")
namespace FSecure::Compression
{

View File

@ -8,30 +8,27 @@ namespace FSecure
/// @warning Never use this class directly. Always use the SCOPE_GUARD macro.
struct ScopeGuard
{
/// Class design.
typedef ScopeGuard Type; ///< Can't use automatic LIGHT_CLASS_FILLER because of deleted constructors and operators.
/// Cleanup function signature.
typedef std::function<void()> CleanupFunction_t;
using CleanupFunction_t = std::function<void()>;
/// The only valid to call manual constructor.
/// @param function cleanup function to call on scope leave.
Type(const CleanupFunction_t& function) : m_CleanupFunction(function) { }
ScopeGuard(const CleanupFunction_t& function) : m_CleanupFunction(function) { }
/// Deleted l-value constructor, to reject l-value references.
Type(CleanupFunction_t&) = delete;
ScopeGuard(CleanupFunction_t&) = delete;
/// R-value constructor, to accept r-value references.
Type(CleanupFunction_t&& function) : m_CleanupFunction(function) { }
ScopeGuard(CleanupFunction_t&& function) : m_CleanupFunction(function) { }
/// Destructor.
~ScopeGuard() { m_CleanupFunction(); }
/// Operators.
const Type& operator=(const Type&) = delete; ///< No copying between ScopeGuards is allowed.
const ScopeGuard& operator=(const ScopeGuard&) = delete; ///< No copying between ScopeGuards is allowed.
/// Conversion operators.
Type(const Type&) = delete; ///< Same as above - no copying between ScopeGuard objects.
ScopeGuard(const ScopeGuard&) = delete; ///< Same as above - no copying between ScopeGuard objects.
/// Heap operators are rejected.
void *operator new(size_t) = delete;
@ -49,5 +46,5 @@ namespace FSecure
/// SCOPE_GUARD macro definition. You should always use this macro instead of direct manipulations on ScopeGuard structure and it's objects.<br>
/// Usage: SCOPE_GUARD { expressions; that; will; be; processed; on; scope; leave; }
# define SCOPE_GUARD FSecure::ScopeGuard SCOPE_GUARD_CAT(scope_guard_, __COUNTER__) = [&]
# define SCOPE_GUARD(cleanupExpression) auto SCOPE_GUARD_CAT(scope_guard_, __COUNTER__) = FSecure::ScopeGuard{[&]{cleanupExpression}}
}

View File

@ -29,6 +29,10 @@ namespace FSecure::Utils
constexpr static bool value = [](bool ret) { return ret; }((std::is_same_v<T, Ts> || ...));
};
/// Template to strip type out of const, volatile and reference.
template <typename T>
using RemoveCVR = std::remove_cv_t<std::remove_reference_t<T>>;
/// Changes value to default if it is out of provided range.
/// @param value to be clamped.
/// @param minValue lowest accepted value.
@ -67,7 +71,7 @@ namespace FSecure::Utils
T randomString;
randomString.resize(size);
for (auto& e : randomString)
e = static_cast<T::value_type>(charset[uni(gen)]);
e = static_cast<typename T::value_type>(charset[uni(gen)]);
return randomString;
}

View File

@ -100,15 +100,15 @@ namespace FSecure::CppCommons::CppTools
{
/// Public ctor.
/// @param value object value
XErrorImpl(UnderlyingType value) : XErrorBase(value) { }
XErrorImpl(UnderlyingType value) : XErrorBase<UnderlyingType>(value) { }
/// Success translator.
/// @return true if current state of the object indicates success.
bool IsSuccess() const { return m_Value.IsSuccess(); }
bool IsSuccess() const { return this->m_Value.IsSuccess(); }
/// Failure translator.
/// @return true if current state of the object indicates failure.
bool IsFailure() const { return m_Value.IsFailure(); }
bool IsFailure() const { return this->m_Value.IsFailure(); }
};
/// XError specialization for HRESULT - let's provide IsSuccess and IsFailure. @note You shouldn't use XErrorImpl templates directly. They have internal purposes. Use XError template instead.

View File

@ -21,14 +21,14 @@
// Static libraries.
#ifdef _WIN64
# ifdef _DEBUG
# pragma comment(lib, "Common/libSodium/libsodium-x64-v141-debug.lib")
# pragma comment(lib, C3_SOLUTION_DIR "Common/libSodium/libsodium-x64-v141-debug.lib")
# else
# pragma comment(lib, "Common/libSodium/libsodium-x64-v141-release.lib")
# pragma comment(lib, C3_SOLUTION_DIR "Common/libSodium/libsodium-x64-v141-release.lib")
# endif
#else
# ifdef _DEBUG
# pragma comment(lib, "Common/libSodium/libsodium-x86-v141-debug.lib")
# pragma comment(lib, C3_SOLUTION_DIR "Common/libSodium/libsodium-x86-v141-debug.lib")
# else
# pragma comment(lib, "Common/libSodium/libsodium-x86-v141-release.lib")
# pragma comment(lib, C3_SOLUTION_DIR "Common/libSodium/libsodium-x86-v141-release.lib")
# endif
#endif

View File

@ -85,7 +85,7 @@ namespace std
/// Specialized SecureString destructor.
/// Overwrites internal buffer (if SSO is in effect)
template<>
basic_string<char, std::char_traits<char>, FSecure::SecureAllocator<char>>::~basic_string()
inline basic_string<char, std::char_traits<char>, FSecure::SecureAllocator<char>>::~basic_string() noexcept
{
// Clear internal buffer if SSO is in effect
#if _MSC_VER >= 1920 // v142 toolset
@ -105,7 +105,7 @@ namespace std
/// Specialized SecureWString destructor.
/// Overwrites internal buffer (if SSO is in effect)
template<>
basic_string<wchar_t, std::char_traits<wchar_t>, FSecure::SecureAllocator<wchar_t>>::~basic_string()
inline basic_string<wchar_t, std::char_traits<wchar_t>, FSecure::SecureAllocator<wchar_t>>::~basic_string() noexcept
{
// Clear internal buffer if SSO is in effect
#if _MSC_VER >= 1920 // v142 toolset

View File

@ -49,8 +49,6 @@ std::map<std::string, std::string> FSecure::Slack::ListChannels()
json response = SendHttpRequest(url, OBF("application/json"), NULL);
size_t size = response[OBF("channels")].size();
for (auto &channel : response[OBF("channels")])
{
std::string cName = channel[OBF("name")];
@ -206,8 +204,6 @@ void FSecure::Slack::WriteReply(std::string const &text, std::string const &time
return this->WriteReplyLarge(text, timestamp);
}
int totalSent = 0;
json j;
j[OBF("channel")] = this->m_Channel;
j[OBF("text")] = text;
@ -235,7 +231,6 @@ void FSecure::Slack::WriteReplyLarge(std::string const &data, std::string const
std::string ret;
int start = 0;
int size = static_cast<int>(data.length());
int end = size;
//Write 40k character messages at a time
while (size > 40000)

View File

@ -5,15 +5,15 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FSecure::CppCommons::CppTools::XError<FSecure::CppCommons::CppTools::SystemErrorCode> FSecure::CppCommons::WinTools::AbstractService::OnServiceInit(DWORD, LPTSTR*)
{
return NO_ERROR;
return { NO_ERROR };
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
FSecure::CppCommons::CppTools::XError<FSecure::CppCommons::CppTools::SystemErrorCode> FSecure::CppCommons::WinTools::AbstractService::OnServiceStop()
{
SetServiceStatus(SERVICE_STOP_PENDING, 100);
return NO_ERROR;
return { NO_ERROR };
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -26,7 +26,7 @@ namespace FSecure
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken))
return false;
SCOPE_GUARD{ CloseHandle(hToken); };
SCOPE_GUARD( CloseHandle(hToken); );
TOKEN_ELEVATION Elevation;
DWORD cbSize = sizeof(TOKEN_ELEVATION);
if (!GetTokenInformation(hToken, TokenElevation, &Elevation, sizeof(Elevation), &cbSize))
@ -69,7 +69,7 @@ namespace FSecure
LPWSTR buf = nullptr;
if (NETSETUP_JOIN_STATUS status; NERR_Success == ::NetGetJoinInformation(nullptr, &buf, &status))
{
SCOPE_GUARD{ ::NetApiBufferFree(buf); };
SCOPE_GUARD( ::NetApiBufferFree(buf); );
if(status == NetSetupDomainName)
m_Domain = WidestringToString(buf);
}

View File

@ -12,22 +12,23 @@ namespace
pSA->nLength = sizeof(SECURITY_ATTRIBUTES);
pSA->bInheritHandle = FALSE;
TCHAR* szSD = TEXT("D:") // Discretionary ACL
TEXT("(D;OICI;GA;;;BG)") // Deny access to
// built-in guests
TEXT("(D;OICI;GA;;;AN)") // Deny access to
// anonymous logon
TEXT("(A;OICI;GRGW;;;AU)") // Allow
// read/write
// to authenticated
// users
TEXT("(A;OICI;GA;;;BA)"); // Allow full control
// to administrators
const wchar_t* szSD = OBF(
L"D:" // Discretionary ACL
"(D;OICI;GA;;;BG)" // Deny access to
// built-in guests
"(D;OICI;GA;;;AN)" // Deny access to
// anonymous logon
"(A;OICI;GRGW;;;AU)" // Allow
// read/write
// to authenticated
// users
"(A;OICI;GA;;;BA)"); // Allow full control
// to administrators
if (NULL == pSA)
return FALSE;
return ConvertStringSecurityDescriptorToSecurityDescriptor(
return ConvertStringSecurityDescriptorToSecurityDescriptorW(
szSD,
SDDL_REVISION_1,
&(pSA->lpSecurityDescriptor),
@ -72,7 +73,7 @@ size_t FSecure::WinTools::WritePipe::Write(ByteView data)
throw std::runtime_error{ OBF("Write error, too much data.") };
ConnectNamedPipe(m_Pipe.get(), nullptr);
SCOPE_GUARD{ DisconnectNamedPipe(m_Pipe.get()); };
SCOPE_GUARD( DisconnectNamedPipe(m_Pipe.get()); );
DWORD written;
uint32_t len = static_cast<uint32_t>(data.size());
WriteFile(m_Pipe.get(), &len, sizeof(len), nullptr, nullptr);
@ -99,7 +100,7 @@ FSecure::ByteVector FSecure::WinTools::ReadPipe::Read()
if (pipe == INVALID_HANDLE_VALUE)
return {};
SCOPE_GUARD{ CloseHandle(pipe); };
SCOPE_GUARD( CloseHandle(pipe); );
DWORD chunkSize;
uint32_t pipeBufferSize = 512u;
@ -204,7 +205,6 @@ FSecure::ByteVector FSecure::WinTools::AlternatingPipe::Read()
// Read four bytes and find the length of the next chunk of data.
DWORD chunkLength = 0, bytesReadCurrent = 0;
DWORD bytesAvailable = 0;
if (!ReadFile(m_Pipe.get(), &chunkLength, 4, &bytesReadCurrent, nullptr))
throw std::runtime_error{ OBF("Couldn't read from Pipe: ") + std::to_string(GetLastError()) + OBF(".") };

View File

@ -16,7 +16,7 @@ std::pair<FSecure::CppCommons::WinTools::Services::ReturnEnum, HRESULT> FSecure:
// Try to open the service
if (SC_HANDLE service = ::OpenService(manager, serviceName.c_str(), SERVICE_QUERY_CONFIG))
return std::make_pair(ReturnEnum::ClosingHandles, (::CloseServiceHandle(service) && ::CloseServiceHandle(manager) ? S_OK : XERROR_GETLASTERROR));
return std::make_pair(ReturnEnum::ClosingHandles, (::CloseServiceHandle(service) && ::CloseServiceHandle(manager) ? S_OK : HRESULT_FROM_WIN32(GetLastError())));
// Failed to open the Service. Make sure to return the right error.
auto retVal = XERROR_GETLASTERROR;
@ -35,7 +35,7 @@ std::pair<FSecure::CppCommons::WinTools::Services::ReturnEnum, HRESULT> FSecure:
// Create the service
if (SC_HANDLE service = ::CreateServiceW(manager, serviceName.c_str(), serviceName.c_str(), SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL,
binaryPath.c_str(), nullptr, nullptr, nullptr, nullptr, nullptr))
return std::make_pair(ReturnEnum::ClosingHandles, (::CloseServiceHandle(service) && ::CloseServiceHandle(manager) ? S_OK : XERROR_GETLASTERROR));
return std::make_pair(ReturnEnum::ClosingHandles, (::CloseServiceHandle(service) && ::CloseServiceHandle(manager) ? S_OK : HRESULT_FROM_WIN32(GetLastError())));
// Failed to open the Service. Make sure to return right error.
auto retVal = XERROR_GETLASTERROR;
@ -55,7 +55,7 @@ std::pair<FSecure::CppCommons::WinTools::Services::ReturnEnum, HRESULT> FSecure:
if (SC_HANDLE service = ::OpenService(manager, serviceName.c_str(), STANDARD_RIGHTS_REQUIRED))
{
if (::DeleteService(service))
return std::make_pair(ReturnEnum::ClosingHandles, (::CloseServiceHandle(service) && ::CloseServiceHandle(manager) ? S_OK : XERROR_GETLASTERROR));
return std::make_pair(ReturnEnum::ClosingHandles, (::CloseServiceHandle(service) && ::CloseServiceHandle(manager) ? S_OK : HRESULT_FROM_WIN32(GetLastError())));
// Failed to open the Service. Make sure to return right error.
auto retVal = XERROR_GETLASTERROR;
@ -80,7 +80,7 @@ FSecure::CppCommons::CppTools::XError<HRESULT> FSecure::CppCommons::WinTools::Se
// Copy Service object and start the Service.
s_Service = &theOnlyService;
SERVICE_TABLE_ENTRY table[] = { { const_cast<LPTSTR>(serviceName.c_str()), ServiceMain }, { nullptr, nullptr } };
return ::StartServiceCtrlDispatcher(table) ? S_OK : XERROR_GETLASTERROR;
return ::StartServiceCtrlDispatcher(table) ? S_OK : HRESULT_FROM_WIN32(GetLastError());
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -196,5 +196,5 @@ FSecure::CppCommons::CppTools::XError<FSecure::CppCommons::CppTools::SystemError
s_ServiceStatus.dwCheckPoint = (state == SERVICE_RUNNING || state == SERVICE_STOPPED ? 0 : checkPoint++);
// Report the status of the service to the SCM.
return ::SetServiceStatus(s_ServiceStatusHandle, &s_ServiceStatus) ? NO_ERROR : GetLastError();
return { ::SetServiceStatus(s_ServiceStatusHandle, &s_ServiceStatus) ? NO_ERROR : GetLastError() };
}

View File

@ -48,10 +48,7 @@
#include "sodium/crypto_verify_32.h"
#include "sodium/crypto_verify_64.h"
#include "sodium/randombytes.h"
#ifdef __native_client__
# include "sodium/randombytes_nativeclient.h"
#endif
#include "sodium/randombytes_salsa20_random.h"
#include "sodium/randombytes_internal_random.h"
#include "sodium/randombytes_sysrandom.h"
#include "sodium/runtime.h"
#include "sodium/utils.h"
@ -59,7 +56,9 @@
#ifndef SODIUM_LIBRARY_MINIMAL
# include "sodium/crypto_box_curve25519xchacha20poly1305.h"
# include "sodium/crypto_core_ed25519.h"
# include "sodium/crypto_core_ristretto255.h"
# include "sodium/crypto_scalarmult_ed25519.h"
# include "sodium/crypto_scalarmult_ristretto255.h"
# include "sodium/crypto_secretbox_xchacha20poly1305.h"
# include "sodium/crypto_pwhash_scryptsalsa208sha256.h"
# include "sodium/crypto_stream_salsa2012.h"

View File

@ -52,11 +52,13 @@ size_t crypto_aead_aes256gcm_abytes(void);
#define crypto_aead_aes256gcm_MESSAGEBYTES_MAX \
SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_aes256gcm_ABYTES, \
(16ULL * ((1ULL << 32) - 2ULL)) - crypto_aead_aes256gcm_ABYTES)
(16ULL * ((1ULL << 32) - 2ULL)))
SODIUM_EXPORT
size_t crypto_aead_aes256gcm_messagebytes_max(void);
typedef CRYPTO_ALIGN(16) unsigned char crypto_aead_aes256gcm_state[512];
typedef struct CRYPTO_ALIGN(16) crypto_aead_aes256gcm_state_ {
unsigned char opaque[512];
} crypto_aead_aes256gcm_state;
SODIUM_EXPORT
size_t crypto_aead_aes256gcm_statebytes(void);
@ -70,7 +72,8 @@ int crypto_aead_aes256gcm_encrypt(unsigned char *c,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 8, 9)));
SODIUM_EXPORT
int crypto_aead_aes256gcm_decrypt(unsigned char *m,
@ -82,7 +85,7 @@ int crypto_aead_aes256gcm_decrypt(unsigned char *m,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(4, 8, 9)));
SODIUM_EXPORT
int crypto_aead_aes256gcm_encrypt_detached(unsigned char *c,
@ -94,7 +97,8 @@ int crypto_aead_aes256gcm_encrypt_detached(unsigned char *c,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 2, 9, 10)));
SODIUM_EXPORT
int crypto_aead_aes256gcm_decrypt_detached(unsigned char *m,
@ -106,13 +110,14 @@ int crypto_aead_aes256gcm_decrypt_detached(unsigned char *m,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 5, 8, 9)));
/* -- Precomputation interface -- */
SODIUM_EXPORT
int crypto_aead_aes256gcm_beforenm(crypto_aead_aes256gcm_state *ctx_,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c,
@ -123,7 +128,8 @@ int crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const crypto_aead_aes256gcm_state *ctx_);
const crypto_aead_aes256gcm_state *ctx_)
__attribute__ ((nonnull(1, 8, 9)));
SODIUM_EXPORT
int crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m,
@ -135,7 +141,7 @@ int crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m,
unsigned long long adlen,
const unsigned char *npub,
const crypto_aead_aes256gcm_state *ctx_)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(4, 8, 9)));
SODIUM_EXPORT
int crypto_aead_aes256gcm_encrypt_detached_afternm(unsigned char *c,
@ -147,7 +153,8 @@ int crypto_aead_aes256gcm_encrypt_detached_afternm(unsigned char *c,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const crypto_aead_aes256gcm_state *ctx_);
const crypto_aead_aes256gcm_state *ctx_)
__attribute__ ((nonnull(1, 2, 9, 10)));
SODIUM_EXPORT
int crypto_aead_aes256gcm_decrypt_detached_afternm(unsigned char *m,
@ -159,10 +166,11 @@ int crypto_aead_aes256gcm_decrypt_detached_afternm(unsigned char *m,
unsigned long long adlen,
const unsigned char *npub,
const crypto_aead_aes256gcm_state *ctx_)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 5, 8, 9)));
SODIUM_EXPORT
void crypto_aead_aes256gcm_keygen(unsigned char k[crypto_aead_aes256gcm_KEYBYTES]);
void crypto_aead_aes256gcm_keygen(unsigned char k[crypto_aead_aes256gcm_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -32,7 +32,7 @@ size_t crypto_aead_chacha20poly1305_ietf_abytes(void);
#define crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX \
SODIUM_MIN(SODIUM_SIZE_MAX - crypto_aead_chacha20poly1305_ietf_ABYTES, \
(64ULL * (1ULL << 32) - 64ULL) - crypto_aead_chacha20poly1305_ietf_ABYTES)
(64ULL * ((1ULL << 32) - 1ULL)))
SODIUM_EXPORT
size_t crypto_aead_chacha20poly1305_ietf_messagebytes_max(void);
@ -45,7 +45,8 @@ int crypto_aead_chacha20poly1305_ietf_encrypt(unsigned char *c,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 8, 9)));
SODIUM_EXPORT
int crypto_aead_chacha20poly1305_ietf_decrypt(unsigned char *m,
@ -57,7 +58,7 @@ int crypto_aead_chacha20poly1305_ietf_decrypt(unsigned char *m,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(4, 8, 9)));
SODIUM_EXPORT
int crypto_aead_chacha20poly1305_ietf_encrypt_detached(unsigned char *c,
@ -69,7 +70,8 @@ int crypto_aead_chacha20poly1305_ietf_encrypt_detached(unsigned char *c,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 2, 9, 10)));
SODIUM_EXPORT
int crypto_aead_chacha20poly1305_ietf_decrypt_detached(unsigned char *m,
@ -81,10 +83,11 @@ int crypto_aead_chacha20poly1305_ietf_decrypt_detached(unsigned char *m,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 5, 8, 9)));
SODIUM_EXPORT
void crypto_aead_chacha20poly1305_ietf_keygen(unsigned char k[crypto_aead_chacha20poly1305_ietf_KEYBYTES]);
void crypto_aead_chacha20poly1305_ietf_keygen(unsigned char k[crypto_aead_chacha20poly1305_ietf_KEYBYTES])
__attribute__ ((nonnull));
/* -- Original ChaCha20-Poly1305 construction with a 64-bit nonce and a 64-bit internal counter -- */
@ -118,7 +121,8 @@ int crypto_aead_chacha20poly1305_encrypt(unsigned char *c,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 8, 9)));
SODIUM_EXPORT
int crypto_aead_chacha20poly1305_decrypt(unsigned char *m,
@ -130,7 +134,7 @@ int crypto_aead_chacha20poly1305_decrypt(unsigned char *m,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(4, 8, 9)));
SODIUM_EXPORT
int crypto_aead_chacha20poly1305_encrypt_detached(unsigned char *c,
@ -142,7 +146,8 @@ int crypto_aead_chacha20poly1305_encrypt_detached(unsigned char *c,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 2, 9, 10)));
SODIUM_EXPORT
int crypto_aead_chacha20poly1305_decrypt_detached(unsigned char *m,
@ -154,10 +159,11 @@ int crypto_aead_chacha20poly1305_decrypt_detached(unsigned char *m,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 5, 8, 9)));
SODIUM_EXPORT
void crypto_aead_chacha20poly1305_keygen(unsigned char k[crypto_aead_chacha20poly1305_KEYBYTES]);
void crypto_aead_chacha20poly1305_keygen(unsigned char k[crypto_aead_chacha20poly1305_KEYBYTES])
__attribute__ ((nonnull));
/* Aliases */

View File

@ -41,7 +41,8 @@ int crypto_aead_xchacha20poly1305_ietf_encrypt(unsigned char *c,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 8, 9)));
SODIUM_EXPORT
int crypto_aead_xchacha20poly1305_ietf_decrypt(unsigned char *m,
@ -53,7 +54,7 @@ int crypto_aead_xchacha20poly1305_ietf_decrypt(unsigned char *m,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(4, 8, 9)));
SODIUM_EXPORT
int crypto_aead_xchacha20poly1305_ietf_encrypt_detached(unsigned char *c,
@ -65,7 +66,8 @@ int crypto_aead_xchacha20poly1305_ietf_encrypt_detached(unsigned char *c,
unsigned long long adlen,
const unsigned char *nsec,
const unsigned char *npub,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 2, 9, 10)));
SODIUM_EXPORT
int crypto_aead_xchacha20poly1305_ietf_decrypt_detached(unsigned char *m,
@ -77,10 +79,11 @@ int crypto_aead_xchacha20poly1305_ietf_decrypt_detached(unsigned char *m,
unsigned long long adlen,
const unsigned char *npub,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 5, 8, 9)));
SODIUM_EXPORT
void crypto_aead_xchacha20poly1305_ietf_keygen(unsigned char k[crypto_aead_xchacha20poly1305_ietf_KEYBYTES]);
void crypto_aead_xchacha20poly1305_ietf_keygen(unsigned char k[crypto_aead_xchacha20poly1305_ietf_KEYBYTES])
__attribute__ ((nonnull));
/* Aliases */

View File

@ -27,15 +27,17 @@ const char *crypto_auth_primitive(void);
SODIUM_EXPORT
int crypto_auth(unsigned char *out, const unsigned char *in,
unsigned long long inlen, const unsigned char *k);
unsigned long long inlen, const unsigned char *k)
__attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_auth_verify(const unsigned char *h, const unsigned char *in,
unsigned long long inlen, const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
void crypto_auth_keygen(unsigned char k[crypto_auth_KEYBYTES]);
void crypto_auth_keygen(unsigned char k[crypto_auth_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -24,14 +24,14 @@ SODIUM_EXPORT
int crypto_auth_hmacsha256(unsigned char *out,
const unsigned char *in,
unsigned long long inlen,
const unsigned char *k);
const unsigned char *k) __attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_auth_hmacsha256_verify(const unsigned char *h,
const unsigned char *in,
unsigned long long inlen,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
/* ------------------------------------------------------------------------- */
@ -46,20 +46,22 @@ size_t crypto_auth_hmacsha256_statebytes(void);
SODIUM_EXPORT
int crypto_auth_hmacsha256_init(crypto_auth_hmacsha256_state *state,
const unsigned char *key,
size_t keylen);
size_t keylen) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_auth_hmacsha256_update(crypto_auth_hmacsha256_state *state,
const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_auth_hmacsha256_final(crypto_auth_hmacsha256_state *state,
unsigned char *out);
unsigned char *out) __attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_auth_hmacsha256_keygen(unsigned char k[crypto_auth_hmacsha256_KEYBYTES]);
void crypto_auth_hmacsha256_keygen(unsigned char k[crypto_auth_hmacsha256_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -24,14 +24,14 @@ SODIUM_EXPORT
int crypto_auth_hmacsha512(unsigned char *out,
const unsigned char *in,
unsigned long long inlen,
const unsigned char *k);
const unsigned char *k) __attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_auth_hmacsha512_verify(const unsigned char *h,
const unsigned char *in,
unsigned long long inlen,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
/* ------------------------------------------------------------------------- */
@ -46,19 +46,20 @@ size_t crypto_auth_hmacsha512_statebytes(void);
SODIUM_EXPORT
int crypto_auth_hmacsha512_init(crypto_auth_hmacsha512_state *state,
const unsigned char *key,
size_t keylen);
size_t keylen) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_auth_hmacsha512_update(crypto_auth_hmacsha512_state *state,
const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen) __attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_auth_hmacsha512_final(crypto_auth_hmacsha512_state *state,
unsigned char *out);
unsigned char *out) __attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_auth_hmacsha512_keygen(unsigned char k[crypto_auth_hmacsha512_KEYBYTES]);
void crypto_auth_hmacsha512_keygen(unsigned char k[crypto_auth_hmacsha512_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -21,15 +21,17 @@ SODIUM_EXPORT
size_t crypto_auth_hmacsha512256_keybytes(void);
SODIUM_EXPORT
int crypto_auth_hmacsha512256(unsigned char *out, const unsigned char *in,
unsigned long long inlen,const unsigned char *k);
int crypto_auth_hmacsha512256(unsigned char *out,
const unsigned char *in,
unsigned long long inlen,
const unsigned char *k) __attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_auth_hmacsha512256_verify(const unsigned char *h,
const unsigned char *in,
unsigned long long inlen,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
/* ------------------------------------------------------------------------- */
@ -41,19 +43,20 @@ size_t crypto_auth_hmacsha512256_statebytes(void);
SODIUM_EXPORT
int crypto_auth_hmacsha512256_init(crypto_auth_hmacsha512256_state *state,
const unsigned char *key,
size_t keylen);
size_t keylen) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_auth_hmacsha512256_update(crypto_auth_hmacsha512256_state *state,
const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen) __attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_auth_hmacsha512256_final(crypto_auth_hmacsha512256_state *state,
unsigned char *out);
unsigned char *out) __attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_auth_hmacsha512256_keygen(unsigned char k[crypto_auth_hmacsha512256_KEYBYTES]);
void crypto_auth_hmacsha512256_keygen(unsigned char k[crypto_auth_hmacsha512256_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -50,29 +50,31 @@ const char *crypto_box_primitive(void);
SODIUM_EXPORT
int crypto_box_seed_keypair(unsigned char *pk, unsigned char *sk,
const unsigned char *seed);
const unsigned char *seed)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_box_keypair(unsigned char *pk, unsigned char *sk);
int crypto_box_keypair(unsigned char *pk, unsigned char *sk)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_box_easy(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *pk, const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4, 5, 6)));
SODIUM_EXPORT
int crypto_box_open_easy(unsigned char *m, const unsigned char *c,
unsigned long long clen, const unsigned char *n,
const unsigned char *pk, const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5, 6)));
SODIUM_EXPORT
int crypto_box_detached(unsigned char *c, unsigned char *mac,
const unsigned char *m, unsigned long long mlen,
const unsigned char *n, const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 2, 5, 6, 7)));
SODIUM_EXPORT
int crypto_box_open_detached(unsigned char *m, const unsigned char *c,
@ -81,7 +83,7 @@ int crypto_box_open_detached(unsigned char *m, const unsigned char *c,
const unsigned char *n,
const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 3, 5, 6, 7)));
/* -- Precomputation interface -- */
@ -92,30 +94,31 @@ size_t crypto_box_beforenmbytes(void);
SODIUM_EXPORT
int crypto_box_beforenm(unsigned char *k, const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_box_easy_afternm(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);
const unsigned char *k) __attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_box_open_easy_afternm(unsigned char *m, const unsigned char *c,
unsigned long long clen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
SODIUM_EXPORT
int crypto_box_detached_afternm(unsigned char *c, unsigned char *mac,
const unsigned char *m, unsigned long long mlen,
const unsigned char *n, const unsigned char *k);
const unsigned char *n, const unsigned char *k)
__attribute__ ((nonnull(1, 2, 5, 6)));
SODIUM_EXPORT
int crypto_box_open_detached_afternm(unsigned char *m, const unsigned char *c,
const unsigned char *mac,
unsigned long long clen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 3, 5, 6)));
/* -- Ephemeral SK interface -- */
@ -125,13 +128,14 @@ size_t crypto_box_sealbytes(void);
SODIUM_EXPORT
int crypto_box_seal(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *pk);
unsigned long long mlen, const unsigned char *pk)
__attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_box_seal_open(unsigned char *m, const unsigned char *c,
unsigned long long clen,
const unsigned char *pk, const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
/* -- NaCl compatibility interface ; Requires padding -- */
@ -147,24 +151,24 @@ SODIUM_EXPORT
int crypto_box(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *pk, const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4, 5, 6)));
SODIUM_EXPORT
int crypto_box_open(unsigned char *m, const unsigned char *c,
unsigned long long clen, const unsigned char *n,
const unsigned char *pk, const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5, 6)));
SODIUM_EXPORT
int crypto_box_afternm(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);
const unsigned char *k) __attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_box_open_afternm(unsigned char *m, const unsigned char *c,
unsigned long long clen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
#ifdef __cplusplus
}

View File

@ -45,11 +45,13 @@ size_t crypto_box_curve25519xchacha20poly1305_messagebytes_max(void);
SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_seed_keypair(unsigned char *pk,
unsigned char *sk,
const unsigned char *seed);
const unsigned char *seed)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_keypair(unsigned char *pk,
unsigned char *sk);
unsigned char *sk)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_easy(unsigned char *c,
@ -58,7 +60,7 @@ int crypto_box_curve25519xchacha20poly1305_easy(unsigned char *c,
const unsigned char *n,
const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4, 5, 6)));
SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_open_easy(unsigned char *m,
@ -67,7 +69,7 @@ int crypto_box_curve25519xchacha20poly1305_open_easy(unsigned char *m,
const unsigned char *n,
const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5, 6)));
SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_detached(unsigned char *c,
@ -77,7 +79,7 @@ int crypto_box_curve25519xchacha20poly1305_detached(unsigned char *c,
const unsigned char *n,
const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 2, 5, 6, 7)));
SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_open_detached(unsigned char *m,
@ -87,7 +89,7 @@ int crypto_box_curve25519xchacha20poly1305_open_detached(unsigned char *m,
const unsigned char *n,
const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 3, 5, 6, 7)));
/* -- Precomputation interface -- */
@ -95,14 +97,15 @@ SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_beforenm(unsigned char *k,
const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_easy_afternm(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_open_easy_afternm(unsigned char *m,
@ -110,7 +113,7 @@ int crypto_box_curve25519xchacha20poly1305_open_easy_afternm(unsigned char *m,
unsigned long long clen,
const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_detached_afternm(unsigned char *c,
@ -118,7 +121,8 @@ int crypto_box_curve25519xchacha20poly1305_detached_afternm(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 2, 5, 6)));
SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_open_detached_afternm(unsigned char *m,
@ -127,7 +131,7 @@ int crypto_box_curve25519xchacha20poly1305_open_detached_afternm(unsigned char *
unsigned long long clen,
const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 3, 5, 6)));
/* -- Ephemeral SK interface -- */
@ -142,7 +146,8 @@ SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_seal(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *pk);
const unsigned char *pk)
__attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_box_curve25519xchacha20poly1305_seal_open(unsigned char *m,
@ -150,7 +155,7 @@ int crypto_box_curve25519xchacha20poly1305_seal_open(unsigned char *m,
unsigned long long clen,
const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
#ifdef __cplusplus
}

View File

@ -45,17 +45,19 @@ size_t crypto_box_curve25519xsalsa20poly1305_messagebytes_max(void);
SODIUM_EXPORT
int crypto_box_curve25519xsalsa20poly1305_seed_keypair(unsigned char *pk,
unsigned char *sk,
const unsigned char *seed);
const unsigned char *seed)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_box_curve25519xsalsa20poly1305_keypair(unsigned char *pk,
unsigned char *sk);
unsigned char *sk)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_box_curve25519xsalsa20poly1305_beforenm(unsigned char *k,
const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
/* -- NaCl compatibility interface ; Requires padding -- */
@ -76,7 +78,7 @@ int crypto_box_curve25519xsalsa20poly1305(unsigned char *c,
const unsigned char *n,
const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4, 5, 6)));
SODIUM_EXPORT
int crypto_box_curve25519xsalsa20poly1305_open(unsigned char *m,
@ -85,14 +87,15 @@ int crypto_box_curve25519xsalsa20poly1305_open(unsigned char *m,
const unsigned char *n,
const unsigned char *pk,
const unsigned char *sk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5, 6)));
SODIUM_EXPORT
int crypto_box_curve25519xsalsa20poly1305_afternm(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_box_curve25519xsalsa20poly1305_open_afternm(unsigned char *m,
@ -100,7 +103,7 @@ int crypto_box_curve25519xsalsa20poly1305_open_afternm(unsigned char *m,
unsigned long long clen,
const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
#ifdef __cplusplus
}

View File

@ -16,19 +16,82 @@ size_t crypto_core_ed25519_bytes(void);
SODIUM_EXPORT
size_t crypto_core_ed25519_uniformbytes(void);
#define crypto_core_ed25519_HASHBYTES 64
SODIUM_EXPORT
int crypto_core_ed25519_is_valid_point(const unsigned char *p);
size_t crypto_core_ed25519_hashbytes(void);
#define crypto_core_ed25519_SCALARBYTES 32
SODIUM_EXPORT
size_t crypto_core_ed25519_scalarbytes(void);
#define crypto_core_ed25519_NONREDUCEDSCALARBYTES 64
SODIUM_EXPORT
size_t crypto_core_ed25519_nonreducedscalarbytes(void);
SODIUM_EXPORT
int crypto_core_ed25519_is_valid_point(const unsigned char *p)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_core_ed25519_add(unsigned char *r,
const unsigned char *p, const unsigned char *q);
const unsigned char *p, const unsigned char *q)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_core_ed25519_sub(unsigned char *r,
const unsigned char *p, const unsigned char *q);
const unsigned char *p, const unsigned char *q)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_core_ed25519_from_uniform(unsigned char *p, const unsigned char *r);
int crypto_core_ed25519_from_uniform(unsigned char *p, const unsigned char *r)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_core_ed25519_from_hash(unsigned char *p, const unsigned char *h)
__attribute__ ((nonnull)) __attribute__ ((deprecated));
SODIUM_EXPORT
void crypto_core_ed25519_random(unsigned char *p)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ed25519_scalar_random(unsigned char *r)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_core_ed25519_scalar_invert(unsigned char *recip, const unsigned char *s)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ed25519_scalar_negate(unsigned char *neg, const unsigned char *s)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ed25519_scalar_complement(unsigned char *comp, const unsigned char *s)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ed25519_scalar_add(unsigned char *z, const unsigned char *x,
const unsigned char *y)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ed25519_scalar_sub(unsigned char *z, const unsigned char *x,
const unsigned char *y)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ed25519_scalar_mul(unsigned char *z, const unsigned char *x,
const unsigned char *y)
__attribute__ ((nonnull));
/*
* The interval `s` is sampled from should be at least 317 bits to ensure almost
* uniformity of `r` over `L`.
*/
SODIUM_EXPORT
void crypto_core_ed25519_scalar_reduce(unsigned char *r, const unsigned char *s)
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -26,7 +26,8 @@ size_t crypto_core_hchacha20_constbytes(void);
SODIUM_EXPORT
int crypto_core_hchacha20(unsigned char *out, const unsigned char *in,
const unsigned char *k, const unsigned char *c);
const unsigned char *k, const unsigned char *c)
__attribute__ ((nonnull(1, 2, 3)));
#ifdef __cplusplus
}

View File

@ -26,7 +26,8 @@ size_t crypto_core_hsalsa20_constbytes(void);
SODIUM_EXPORT
int crypto_core_hsalsa20(unsigned char *out, const unsigned char *in,
const unsigned char *k, const unsigned char *c);
const unsigned char *k, const unsigned char *c)
__attribute__ ((nonnull(1, 2, 3)));
#ifdef __cplusplus
}

View File

@ -0,0 +1,100 @@
#ifndef crypto_core_ristretto255_H
#define crypto_core_ristretto255_H
#include <stddef.h>
#include "export.h"
#ifdef __cplusplus
extern "C" {
#endif
#define crypto_core_ristretto255_BYTES 32
SODIUM_EXPORT
size_t crypto_core_ristretto255_bytes(void);
#define crypto_core_ristretto255_HASHBYTES 64
SODIUM_EXPORT
size_t crypto_core_ristretto255_hashbytes(void);
#define crypto_core_ristretto255_SCALARBYTES 32
SODIUM_EXPORT
size_t crypto_core_ristretto255_scalarbytes(void);
#define crypto_core_ristretto255_NONREDUCEDSCALARBYTES 64
SODIUM_EXPORT
size_t crypto_core_ristretto255_nonreducedscalarbytes(void);
SODIUM_EXPORT
int crypto_core_ristretto255_is_valid_point(const unsigned char *p)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_core_ristretto255_add(unsigned char *r,
const unsigned char *p, const unsigned char *q)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_core_ristretto255_sub(unsigned char *r,
const unsigned char *p, const unsigned char *q)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_core_ristretto255_from_hash(unsigned char *p,
const unsigned char *r)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ristretto255_random(unsigned char *p)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ristretto255_scalar_random(unsigned char *r)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_core_ristretto255_scalar_invert(unsigned char *recip,
const unsigned char *s)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ristretto255_scalar_negate(unsigned char *neg,
const unsigned char *s)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ristretto255_scalar_complement(unsigned char *comp,
const unsigned char *s)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ristretto255_scalar_add(unsigned char *z,
const unsigned char *x,
const unsigned char *y)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ristretto255_scalar_sub(unsigned char *z,
const unsigned char *x,
const unsigned char *y)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_core_ristretto255_scalar_mul(unsigned char *z,
const unsigned char *x,
const unsigned char *y)
__attribute__ ((nonnull));
/*
* The interval `s` is sampled from should be at least 317 bits to ensure almost
* uniformity of `r` over `L`.
*/
SODIUM_EXPORT
void crypto_core_ristretto255_scalar_reduce(unsigned char *r,
const unsigned char *s)
__attribute__ ((nonnull));
#ifdef __cplusplus
}
#endif
#endif

View File

@ -26,7 +26,8 @@ size_t crypto_core_salsa20_constbytes(void);
SODIUM_EXPORT
int crypto_core_salsa20(unsigned char *out, const unsigned char *in,
const unsigned char *k, const unsigned char *c);
const unsigned char *k, const unsigned char *c)
__attribute__ ((nonnull(1, 2, 3)));
#ifdef __cplusplus
}

View File

@ -26,7 +26,8 @@ size_t crypto_core_salsa2012_constbytes(void);
SODIUM_EXPORT
int crypto_core_salsa2012(unsigned char *out, const unsigned char *in,
const unsigned char *k, const unsigned char *c);
const unsigned char *k, const unsigned char *c)
__attribute__ ((nonnull(1, 2, 3)));
#ifdef __cplusplus
}

View File

@ -30,7 +30,8 @@ size_t crypto_core_salsa208_constbytes(void)
SODIUM_EXPORT
int crypto_core_salsa208(unsigned char *out, const unsigned char *in,
const unsigned char *k, const unsigned char *c);
const unsigned char *k, const unsigned char *c)
__attribute__ ((nonnull(1, 2, 3)));
#ifdef __cplusplus
}

View File

@ -41,6 +41,10 @@ size_t crypto_generichash_keybytes(void);
SODIUM_EXPORT
const char *crypto_generichash_primitive(void);
/*
* Important when writing bindings for other programming languages:
* the state address should be 64-bytes aligned.
*/
typedef crypto_generichash_blake2b_state crypto_generichash_state;
SODIUM_EXPORT
@ -49,24 +53,29 @@ size_t crypto_generichash_statebytes(void);
SODIUM_EXPORT
int crypto_generichash(unsigned char *out, size_t outlen,
const unsigned char *in, unsigned long long inlen,
const unsigned char *key, size_t keylen);
const unsigned char *key, size_t keylen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_generichash_init(crypto_generichash_state *state,
const unsigned char *key,
const size_t keylen, const size_t outlen);
const size_t keylen, const size_t outlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_generichash_update(crypto_generichash_state *state,
const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_generichash_final(crypto_generichash_state *state,
unsigned char *out, const size_t outlen);
unsigned char *out, const size_t outlen)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_generichash_keygen(unsigned char k[crypto_generichash_KEYBYTES]);
void crypto_generichash_keygen(unsigned char k[crypto_generichash_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -21,12 +21,7 @@ extern "C" {
#endif
typedef struct CRYPTO_ALIGN(64) crypto_generichash_blake2b_state {
uint64_t h[8];
uint64_t t[2];
uint64_t f[2];
uint8_t buf[2 * 128];
size_t buflen;
uint8_t last_node;
unsigned char opaque[384];
} crypto_generichash_blake2b_state;
#if defined(__IBMC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
@ -74,7 +69,8 @@ SODIUM_EXPORT
int crypto_generichash_blake2b(unsigned char *out, size_t outlen,
const unsigned char *in,
unsigned long long inlen,
const unsigned char *key, size_t keylen);
const unsigned char *key, size_t keylen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_generichash_blake2b_salt_personal(unsigned char *out, size_t outlen,
@ -83,32 +79,37 @@ int crypto_generichash_blake2b_salt_personal(unsigned char *out, size_t outlen,
const unsigned char *key,
size_t keylen,
const unsigned char *salt,
const unsigned char *personal);
const unsigned char *personal)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_generichash_blake2b_init(crypto_generichash_blake2b_state *state,
const unsigned char *key,
const size_t keylen, const size_t outlen);
const size_t keylen, const size_t outlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_generichash_blake2b_init_salt_personal(crypto_generichash_blake2b_state *state,
const unsigned char *key,
const size_t keylen, const size_t outlen,
const unsigned char *salt,
const unsigned char *personal);
const unsigned char *personal)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_generichash_blake2b_update(crypto_generichash_blake2b_state *state,
const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_generichash_blake2b_final(crypto_generichash_blake2b_state *state,
unsigned char *out,
const size_t outlen);
const size_t outlen) __attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_generichash_blake2b_keygen(unsigned char k[crypto_generichash_blake2b_KEYBYTES]);
void crypto_generichash_blake2b_keygen(unsigned char k[crypto_generichash_blake2b_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -26,7 +26,7 @@ size_t crypto_hash_bytes(void);
SODIUM_EXPORT
int crypto_hash(unsigned char *out, const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen) __attribute__ ((nonnull(1)));
#define crypto_hash_PRIMITIVE "sha512"
SODIUM_EXPORT

View File

@ -36,19 +36,22 @@ size_t crypto_hash_sha256_bytes(void);
SODIUM_EXPORT
int crypto_hash_sha256(unsigned char *out, const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen) __attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_hash_sha256_init(crypto_hash_sha256_state *state);
int crypto_hash_sha256_init(crypto_hash_sha256_state *state)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_hash_sha256_update(crypto_hash_sha256_state *state,
const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_hash_sha256_final(crypto_hash_sha256_state *state,
unsigned char *out);
unsigned char *out)
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -36,19 +36,22 @@ size_t crypto_hash_sha512_bytes(void);
SODIUM_EXPORT
int crypto_hash_sha512(unsigned char *out, const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen) __attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_hash_sha512_init(crypto_hash_sha512_state *state);
int crypto_hash_sha512_init(crypto_hash_sha512_state *state)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_hash_sha512_update(crypto_hash_sha512_state *state,
const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_hash_sha512_final(crypto_hash_sha512_state *state,
unsigned char *out);
unsigned char *out)
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -39,10 +39,12 @@ SODIUM_EXPORT
int crypto_kdf_derive_from_key(unsigned char *subkey, size_t subkey_len,
uint64_t subkey_id,
const char ctx[crypto_kdf_CONTEXTBYTES],
const unsigned char key[crypto_kdf_KEYBYTES]);
const unsigned char key[crypto_kdf_KEYBYTES])
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_kdf_keygen(unsigned char k[crypto_kdf_KEYBYTES]);
void crypto_kdf_keygen(unsigned char k[crypto_kdf_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -34,7 +34,9 @@ SODIUM_EXPORT
int crypto_kdf_blake2b_derive_from_key(unsigned char *subkey, size_t subkey_len,
uint64_t subkey_id,
const char ctx[crypto_kdf_blake2b_CONTEXTBYTES],
const unsigned char key[crypto_kdf_blake2b_KEYBYTES]);
const unsigned char key[crypto_kdf_blake2b_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}
#endif

View File

@ -35,11 +35,13 @@ const char *crypto_kx_primitive(void);
SODIUM_EXPORT
int crypto_kx_seed_keypair(unsigned char pk[crypto_kx_PUBLICKEYBYTES],
unsigned char sk[crypto_kx_SECRETKEYBYTES],
const unsigned char seed[crypto_kx_SEEDBYTES]);
const unsigned char seed[crypto_kx_SEEDBYTES])
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_kx_keypair(unsigned char pk[crypto_kx_PUBLICKEYBYTES],
unsigned char sk[crypto_kx_SECRETKEYBYTES]);
unsigned char sk[crypto_kx_SECRETKEYBYTES])
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_kx_client_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES],
@ -47,7 +49,7 @@ int crypto_kx_client_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES],
const unsigned char client_pk[crypto_kx_PUBLICKEYBYTES],
const unsigned char client_sk[crypto_kx_SECRETKEYBYTES],
const unsigned char server_pk[crypto_kx_PUBLICKEYBYTES])
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 4, 5)));
SODIUM_EXPORT
int crypto_kx_server_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES],
@ -55,7 +57,7 @@ int crypto_kx_server_session_keys(unsigned char rx[crypto_kx_SESSIONKEYBYTES],
const unsigned char server_pk[crypto_kx_PUBLICKEYBYTES],
const unsigned char server_sk[crypto_kx_SECRETKEYBYTES],
const unsigned char client_pk[crypto_kx_PUBLICKEYBYTES])
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 4, 5)));
#ifdef __cplusplus
}

View File

@ -32,28 +32,31 @@ const char *crypto_onetimeauth_primitive(void);
SODIUM_EXPORT
int crypto_onetimeauth(unsigned char *out, const unsigned char *in,
unsigned long long inlen, const unsigned char *k);
unsigned long long inlen, const unsigned char *k)
__attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_onetimeauth_verify(const unsigned char *h, const unsigned char *in,
unsigned long long inlen, const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_onetimeauth_init(crypto_onetimeauth_state *state,
const unsigned char *key);
const unsigned char *key) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_onetimeauth_update(crypto_onetimeauth_state *state,
const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_onetimeauth_final(crypto_onetimeauth_state *state,
unsigned char *out);
unsigned char *out) __attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_onetimeauth_keygen(unsigned char k[crypto_onetimeauth_KEYBYTES]);
void crypto_onetimeauth_keygen(unsigned char k[crypto_onetimeauth_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -35,30 +35,35 @@ SODIUM_EXPORT
int crypto_onetimeauth_poly1305(unsigned char *out,
const unsigned char *in,
unsigned long long inlen,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_onetimeauth_poly1305_verify(const unsigned char *h,
const unsigned char *in,
unsigned long long inlen,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_onetimeauth_poly1305_init(crypto_onetimeauth_poly1305_state *state,
const unsigned char *key);
const unsigned char *key)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_onetimeauth_poly1305_update(crypto_onetimeauth_poly1305_state *state,
const unsigned char *in,
unsigned long long inlen);
unsigned long long inlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_onetimeauth_poly1305_final(crypto_onetimeauth_poly1305_state *state,
unsigned char *out);
unsigned char *out)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_onetimeauth_poly1305_keygen(unsigned char k[crypto_onetimeauth_poly1305_KEYBYTES]);
void crypto_onetimeauth_poly1305_keygen(unsigned char k[crypto_onetimeauth_poly1305_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -105,7 +105,7 @@ int crypto_pwhash(unsigned char * const out, unsigned long long outlen,
const char * const passwd, unsigned long long passwdlen,
const unsigned char * const salt,
unsigned long long opslimit, size_t memlimit, int alg)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
/*
* The output string already includes all the required parameters, including
@ -116,24 +116,24 @@ SODIUM_EXPORT
int crypto_pwhash_str(char out[crypto_pwhash_STRBYTES],
const char * const passwd, unsigned long long passwdlen,
unsigned long long opslimit, size_t memlimit)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_str_alg(char out[crypto_pwhash_STRBYTES],
const char * const passwd, unsigned long long passwdlen,
unsigned long long opslimit, size_t memlimit, int alg)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_str_verify(const char str[crypto_pwhash_STRBYTES],
const char * const passwd,
unsigned long long passwdlen)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_str_needs_rehash(const char str[crypto_pwhash_STRBYTES],
unsigned long long opslimit, size_t memlimit)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
#define crypto_pwhash_PRIMITIVE "argon2i"
SODIUM_EXPORT

View File

@ -95,25 +95,25 @@ int crypto_pwhash_argon2i(unsigned char * const out,
const unsigned char * const salt,
unsigned long long opslimit, size_t memlimit,
int alg)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_argon2i_str(char out[crypto_pwhash_argon2i_STRBYTES],
const char * const passwd,
unsigned long long passwdlen,
unsigned long long opslimit, size_t memlimit)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_argon2i_str_verify(const char str[crypto_pwhash_argon2i_STRBYTES],
const char * const passwd,
unsigned long long passwdlen)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_argon2i_str_needs_rehash(const char str[crypto_pwhash_argon2i_STRBYTES],
unsigned long long opslimit, size_t memlimit)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -95,25 +95,25 @@ int crypto_pwhash_argon2id(unsigned char * const out,
const unsigned char * const salt,
unsigned long long opslimit, size_t memlimit,
int alg)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_argon2id_str(char out[crypto_pwhash_argon2id_STRBYTES],
const char * const passwd,
unsigned long long passwdlen,
unsigned long long opslimit, size_t memlimit)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_argon2id_str_verify(const char str[crypto_pwhash_argon2id_STRBYTES],
const char * const passwd,
unsigned long long passwdlen)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_argon2id_str_needs_rehash(const char str[crypto_pwhash_argon2id_STRBYTES],
unsigned long long opslimit, size_t memlimit)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -84,7 +84,7 @@ int crypto_pwhash_scryptsalsa208sha256(unsigned char * const out,
const unsigned char * const salt,
unsigned long long opslimit,
size_t memlimit)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_scryptsalsa208sha256_str(char out[crypto_pwhash_scryptsalsa208sha256_STRBYTES],
@ -92,26 +92,26 @@ int crypto_pwhash_scryptsalsa208sha256_str(char out[crypto_pwhash_scryptsalsa208
unsigned long long passwdlen,
unsigned long long opslimit,
size_t memlimit)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_scryptsalsa208sha256_str_verify(const char str[crypto_pwhash_scryptsalsa208sha256_STRBYTES],
const char * const passwd,
unsigned long long passwdlen)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_scryptsalsa208sha256_ll(const uint8_t * passwd, size_t passwdlen,
const uint8_t * salt, size_t saltlen,
uint64_t N, uint32_t r, uint32_t p,
uint8_t * buf, size_t buflen)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_pwhash_scryptsalsa208sha256_str_needs_rehash(const char str[crypto_pwhash_scryptsalsa208sha256_STRBYTES],
unsigned long long opslimit,
size_t memlimit)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -23,10 +23,11 @@ SODIUM_EXPORT
const char *crypto_scalarmult_primitive(void);
SODIUM_EXPORT
int crypto_scalarmult_base(unsigned char *q, const unsigned char *n);
int crypto_scalarmult_base(unsigned char *q, const unsigned char *n)
__attribute__ ((nonnull));
/*
* NOTE: Do not use the result of this function directly.
* NOTE: Do not use the result of this function directly for key exchange.
*
* Hash the result with the public keys in order to compute a shared
* secret key: H(q || client_pk || server_pk)
@ -36,7 +37,7 @@ int crypto_scalarmult_base(unsigned char *q, const unsigned char *n);
SODIUM_EXPORT
int crypto_scalarmult(unsigned char *q, const unsigned char *n,
const unsigned char *p)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -18,7 +18,7 @@ SODIUM_EXPORT
size_t crypto_scalarmult_curve25519_scalarbytes(void);
/*
* NOTE: Do not use the result of this function directly.
* NOTE: Do not use the result of this function directly for key exchange.
*
* Hash the result with the public keys in order to compute a shared
* secret key: H(q || client_pk || server_pk)
@ -28,10 +28,12 @@ size_t crypto_scalarmult_curve25519_scalarbytes(void);
SODIUM_EXPORT
int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n,
const unsigned char *p)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n);
int crypto_scalarmult_curve25519_base(unsigned char *q,
const unsigned char *n)
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -19,7 +19,7 @@ SODIUM_EXPORT
size_t crypto_scalarmult_ed25519_scalarbytes(void);
/*
* NOTE: Do not use the result of this function directly.
* NOTE: Do not use the result of this function directly for key exchange.
*
* Hash the result with the public keys in order to compute a shared
* secret key: H(q || client_pk || server_pk)
@ -29,10 +29,20 @@ size_t crypto_scalarmult_ed25519_scalarbytes(void);
SODIUM_EXPORT
int crypto_scalarmult_ed25519(unsigned char *q, const unsigned char *n,
const unsigned char *p)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_scalarmult_ed25519_base(unsigned char *q, const unsigned char *n);
int crypto_scalarmult_ed25519_noclamp(unsigned char *q, const unsigned char *n,
const unsigned char *p)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_scalarmult_ed25519_base(unsigned char *q, const unsigned char *n)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_scalarmult_ed25519_base_noclamp(unsigned char *q, const unsigned char *n)
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -0,0 +1,43 @@
#ifndef crypto_scalarmult_ristretto255_H
#define crypto_scalarmult_ristretto255_H
#include <stddef.h>
#include "export.h"
#ifdef __cplusplus
extern "C" {
#endif
#define crypto_scalarmult_ristretto255_BYTES 32U
SODIUM_EXPORT
size_t crypto_scalarmult_ristretto255_bytes(void);
#define crypto_scalarmult_ristretto255_SCALARBYTES 32U
SODIUM_EXPORT
size_t crypto_scalarmult_ristretto255_scalarbytes(void);
/*
* NOTE: Do not use the result of this function directly for key exchange.
*
* Hash the result with the public keys in order to compute a shared
* secret key: H(q || client_pk || server_pk)
*
* Or unless this is not an option, use the crypto_kx() API instead.
*/
SODIUM_EXPORT
int crypto_scalarmult_ristretto255(unsigned char *q, const unsigned char *n,
const unsigned char *p)
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_scalarmult_ristretto255_base(unsigned char *q,
const unsigned char *n)
__attribute__ ((nonnull));
#ifdef __cplusplus
}
#endif
#endif

View File

@ -36,20 +36,21 @@ size_t crypto_secretbox_messagebytes_max(void);
SODIUM_EXPORT
int crypto_secretbox_easy(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);
const unsigned char *k) __attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_secretbox_open_easy(unsigned char *m, const unsigned char *c,
unsigned long long clen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
SODIUM_EXPORT
int crypto_secretbox_detached(unsigned char *c, unsigned char *mac,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 2, 5, 6)));
SODIUM_EXPORT
int crypto_secretbox_open_detached(unsigned char *m,
@ -58,10 +59,11 @@ int crypto_secretbox_open_detached(unsigned char *m,
unsigned long long clen,
const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 3, 5, 6)));
SODIUM_EXPORT
void crypto_secretbox_keygen(unsigned char k[crypto_secretbox_KEYBYTES]);
void crypto_secretbox_keygen(unsigned char k[crypto_secretbox_KEYBYTES])
__attribute__ ((nonnull));
/* -- NaCl compatibility interface ; Requires padding -- */
@ -76,13 +78,13 @@ size_t crypto_secretbox_boxzerobytes(void);
SODIUM_EXPORT
int crypto_secretbox(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);
const unsigned char *k) __attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_secretbox_open(unsigned char *m, const unsigned char *c,
unsigned long long clen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
#ifdef __cplusplus
}

View File

@ -34,7 +34,8 @@ int crypto_secretbox_xchacha20poly1305_easy(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_secretbox_xchacha20poly1305_open_easy(unsigned char *m,
@ -42,7 +43,7 @@ int crypto_secretbox_xchacha20poly1305_open_easy(unsigned char *m,
unsigned long long clen,
const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
SODIUM_EXPORT
int crypto_secretbox_xchacha20poly1305_detached(unsigned char *c,
@ -50,7 +51,8 @@ int crypto_secretbox_xchacha20poly1305_detached(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 2, 5, 6)));
SODIUM_EXPORT
int crypto_secretbox_xchacha20poly1305_open_detached(unsigned char *m,
@ -59,7 +61,7 @@ int crypto_secretbox_xchacha20poly1305_open_detached(unsigned char *m,
unsigned long long clen,
const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 3, 5, 6)));
#ifdef __cplusplus
}

View File

@ -35,7 +35,8 @@ int crypto_secretbox_xsalsa20poly1305(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull(1, 4, 5)));
SODIUM_EXPORT
int crypto_secretbox_xsalsa20poly1305_open(unsigned char *m,
@ -43,10 +44,11 @@ int crypto_secretbox_xsalsa20poly1305_open(unsigned char *m,
unsigned long long clen,
const unsigned char *n,
const unsigned char *k)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(2, 4, 5)));
SODIUM_EXPORT
void crypto_secretbox_xsalsa20poly1305_keygen(unsigned char k[crypto_secretbox_xsalsa20poly1305_KEYBYTES]);
void crypto_secretbox_xsalsa20poly1305_keygen(unsigned char k[crypto_secretbox_xsalsa20poly1305_KEYBYTES])
__attribute__ ((nonnull));
/* -- NaCl compatibility interface ; Requires padding -- */

View File

@ -30,7 +30,8 @@ SODIUM_EXPORT
size_t crypto_secretstream_xchacha20poly1305_keybytes(void);
#define crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX \
SODIUM_MIN(SODIUM_SIZE_MAX, ((1ULL << 32) - 2ULL) * 64ULL)
SODIUM_MIN(SODIUM_SIZE_MAX - crypto_secretstream_xchacha20poly1305_ABYTES, \
(64ULL * ((1ULL << 32) - 2ULL)))
SODIUM_EXPORT
size_t crypto_secretstream_xchacha20poly1305_messagebytes_max(void);
@ -63,33 +64,38 @@ size_t crypto_secretstream_xchacha20poly1305_statebytes(void);
SODIUM_EXPORT
void crypto_secretstream_xchacha20poly1305_keygen
(unsigned char k[crypto_secretstream_xchacha20poly1305_KEYBYTES]);
(unsigned char k[crypto_secretstream_xchacha20poly1305_KEYBYTES])
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_secretstream_xchacha20poly1305_init_push
(crypto_secretstream_xchacha20poly1305_state *state,
unsigned char header[crypto_secretstream_xchacha20poly1305_HEADERBYTES],
const unsigned char k[crypto_secretstream_xchacha20poly1305_KEYBYTES]);
const unsigned char k[crypto_secretstream_xchacha20poly1305_KEYBYTES])
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_secretstream_xchacha20poly1305_push
(crypto_secretstream_xchacha20poly1305_state *state,
unsigned char *c, unsigned long long *clen_p,
const unsigned char *m, unsigned long long mlen,
const unsigned char *ad, unsigned long long adlen, unsigned char tag);
const unsigned char *ad, unsigned long long adlen, unsigned char tag)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_secretstream_xchacha20poly1305_init_pull
(crypto_secretstream_xchacha20poly1305_state *state,
const unsigned char header[crypto_secretstream_xchacha20poly1305_HEADERBYTES],
const unsigned char k[crypto_secretstream_xchacha20poly1305_KEYBYTES]);
const unsigned char k[crypto_secretstream_xchacha20poly1305_KEYBYTES])
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_secretstream_xchacha20poly1305_pull
(crypto_secretstream_xchacha20poly1305_state *state,
unsigned char *m, unsigned long long *mlen_p, unsigned char *tag_p,
const unsigned char *c, unsigned long long clen,
const unsigned char *ad, unsigned long long adlen);
const unsigned char *ad, unsigned long long adlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
void crypto_secretstream_xchacha20poly1305_rekey

View File

@ -27,10 +27,12 @@ const char *crypto_shorthash_primitive(void);
SODIUM_EXPORT
int crypto_shorthash(unsigned char *out, const unsigned char *in,
unsigned long long inlen, const unsigned char *k);
unsigned long long inlen, const unsigned char *k)
__attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
void crypto_shorthash_keygen(unsigned char k[crypto_shorthash_KEYBYTES]);
void crypto_shorthash_keygen(unsigned char k[crypto_shorthash_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -23,7 +23,8 @@ size_t crypto_shorthash_siphash24_keybytes(void);
SODIUM_EXPORT
int crypto_shorthash_siphash24(unsigned char *out, const unsigned char *in,
unsigned long long inlen, const unsigned char *k);
unsigned long long inlen, const unsigned char *k)
__attribute__ ((nonnull(1, 4)));
#ifndef SODIUM_LIBRARY_MINIMAL
/* -- 128-bit output -- */
@ -38,7 +39,8 @@ size_t crypto_shorthash_siphashx24_keybytes(void);
SODIUM_EXPORT
int crypto_shorthash_siphashx24(unsigned char *out, const unsigned char *in,
unsigned long long inlen, const unsigned char *k);
unsigned long long inlen, const unsigned char *k)
__attribute__ ((nonnull(1, 4)));
#endif
#ifdef __cplusplus

View File

@ -51,50 +51,54 @@ const char *crypto_sign_primitive(void);
SODIUM_EXPORT
int crypto_sign_seed_keypair(unsigned char *pk, unsigned char *sk,
const unsigned char *seed);
const unsigned char *seed)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_sign_keypair(unsigned char *pk, unsigned char *sk);
int crypto_sign_keypair(unsigned char *pk, unsigned char *sk)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_sign(unsigned char *sm, unsigned long long *smlen_p,
const unsigned char *m, unsigned long long mlen,
const unsigned char *sk);
const unsigned char *sk) __attribute__ ((nonnull(1, 5)));
SODIUM_EXPORT
int crypto_sign_open(unsigned char *m, unsigned long long *mlen_p,
const unsigned char *sm, unsigned long long smlen,
const unsigned char *pk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 5)));
SODIUM_EXPORT
int crypto_sign_detached(unsigned char *sig, unsigned long long *siglen_p,
const unsigned char *m, unsigned long long mlen,
const unsigned char *sk);
const unsigned char *sk) __attribute__ ((nonnull(1, 5)));
SODIUM_EXPORT
int crypto_sign_verify_detached(const unsigned char *sig,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *pk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_sign_init(crypto_sign_state *state);
SODIUM_EXPORT
int crypto_sign_update(crypto_sign_state *state,
const unsigned char *m, unsigned long long mlen);
const unsigned char *m, unsigned long long mlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_sign_final_create(crypto_sign_state *state, unsigned char *sig,
unsigned long long *siglen_p,
const unsigned char *sk);
const unsigned char *sk)
__attribute__ ((nonnull(1, 2, 4)));
SODIUM_EXPORT
int crypto_sign_final_verify(crypto_sign_state *state, unsigned char *sig,
int crypto_sign_final_verify(crypto_sign_state *state, const unsigned char *sig,
const unsigned char *pk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -42,70 +42,80 @@ size_t crypto_sign_ed25519_messagebytes_max(void);
SODIUM_EXPORT
int crypto_sign_ed25519(unsigned char *sm, unsigned long long *smlen_p,
const unsigned char *m, unsigned long long mlen,
const unsigned char *sk);
const unsigned char *sk)
__attribute__ ((nonnull(1, 5)));
SODIUM_EXPORT
int crypto_sign_ed25519_open(unsigned char *m, unsigned long long *mlen_p,
const unsigned char *sm, unsigned long long smlen,
const unsigned char *pk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(3, 5)));
SODIUM_EXPORT
int crypto_sign_ed25519_detached(unsigned char *sig,
unsigned long long *siglen_p,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *sk);
const unsigned char *sk)
__attribute__ ((nonnull(1, 5)));
SODIUM_EXPORT
int crypto_sign_ed25519_verify_detached(const unsigned char *sig,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *pk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull(1, 4)));
SODIUM_EXPORT
int crypto_sign_ed25519_keypair(unsigned char *pk, unsigned char *sk);
int crypto_sign_ed25519_keypair(unsigned char *pk, unsigned char *sk)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_sign_ed25519_seed_keypair(unsigned char *pk, unsigned char *sk,
const unsigned char *seed);
const unsigned char *seed)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_sign_ed25519_pk_to_curve25519(unsigned char *curve25519_pk,
const unsigned char *ed25519_pk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_sign_ed25519_sk_to_curve25519(unsigned char *curve25519_sk,
const unsigned char *ed25519_sk);
const unsigned char *ed25519_sk)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_sign_ed25519_sk_to_seed(unsigned char *seed,
const unsigned char *sk);
const unsigned char *sk)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_sign_ed25519_sk_to_pk(unsigned char *pk, const unsigned char *sk);
int crypto_sign_ed25519_sk_to_pk(unsigned char *pk, const unsigned char *sk)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_sign_ed25519ph_init(crypto_sign_ed25519ph_state *state);
int crypto_sign_ed25519ph_init(crypto_sign_ed25519ph_state *state)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_sign_ed25519ph_update(crypto_sign_ed25519ph_state *state,
const unsigned char *m,
unsigned long long mlen);
unsigned long long mlen)
__attribute__ ((nonnull(1)));
SODIUM_EXPORT
int crypto_sign_ed25519ph_final_create(crypto_sign_ed25519ph_state *state,
unsigned char *sig,
unsigned long long *siglen_p,
const unsigned char *sk);
const unsigned char *sk)
__attribute__ ((nonnull(1, 2, 4)));
SODIUM_EXPORT
int crypto_sign_ed25519ph_final_verify(crypto_sign_ed25519ph_state *state,
unsigned char *sig,
const unsigned char *sig,
const unsigned char *pk)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -33,7 +33,7 @@ int crypto_sign_edwards25519sha512batch(unsigned char *sm,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *sk)
__attribute__ ((deprecated));
__attribute__ ((deprecated)) __attribute__ ((nonnull(1, 5)));
SODIUM_EXPORT
int crypto_sign_edwards25519sha512batch_open(unsigned char *m,
@ -41,12 +41,12 @@ int crypto_sign_edwards25519sha512batch_open(unsigned char *m,
const unsigned char *sm,
unsigned long long smlen,
const unsigned char *pk)
__attribute__ ((deprecated));
__attribute__ ((deprecated)) __attribute__ ((nonnull(3, 5)));
SODIUM_EXPORT
int crypto_sign_edwards25519sha512batch_keypair(unsigned char *pk,
unsigned char *sk)
__attribute__ ((deprecated));
__attribute__ ((deprecated)) __attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -39,15 +39,18 @@ const char *crypto_stream_primitive(void);
SODIUM_EXPORT
int crypto_stream(unsigned char *c, unsigned long long clen,
const unsigned char *n, const unsigned char *k);
const unsigned char *n, const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_stream_keygen(unsigned char k[crypto_stream_KEYBYTES]);
void crypto_stream_keygen(unsigned char k[crypto_stream_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -36,21 +36,25 @@ size_t crypto_stream_chacha20_messagebytes_max(void);
SODIUM_EXPORT
int crypto_stream_chacha20(unsigned char *c, unsigned long long clen,
const unsigned char *n, const unsigned char *k);
const unsigned char *n, const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_chacha20_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_chacha20_xor_ic(unsigned char *c, const unsigned char *m,
unsigned long long mlen,
const unsigned char *n, uint64_t ic,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_stream_chacha20_keygen(unsigned char k[crypto_stream_chacha20_KEYBYTES]);
void crypto_stream_chacha20_keygen(unsigned char k[crypto_stream_chacha20_KEYBYTES])
__attribute__ ((nonnull));
/* ChaCha20 with a 96-bit nonce and a 32-bit counter (IETF) */
@ -69,21 +73,25 @@ size_t crypto_stream_chacha20_ietf_messagebytes_max(void);
SODIUM_EXPORT
int crypto_stream_chacha20_ietf(unsigned char *c, unsigned long long clen,
const unsigned char *n, const unsigned char *k);
const unsigned char *n, const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_chacha20_ietf_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_chacha20_ietf_xor_ic(unsigned char *c, const unsigned char *m,
unsigned long long mlen,
const unsigned char *n, uint32_t ic,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_stream_chacha20_ietf_keygen(unsigned char k[crypto_stream_chacha20_ietf_KEYBYTES]);
void crypto_stream_chacha20_ietf_keygen(unsigned char k[crypto_stream_chacha20_ietf_KEYBYTES])
__attribute__ ((nonnull));
/* Aliases */

View File

@ -34,21 +34,25 @@ size_t crypto_stream_salsa20_messagebytes_max(void);
SODIUM_EXPORT
int crypto_stream_salsa20(unsigned char *c, unsigned long long clen,
const unsigned char *n, const unsigned char *k);
const unsigned char *n, const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_salsa20_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_salsa20_xor_ic(unsigned char *c, const unsigned char *m,
unsigned long long mlen,
const unsigned char *n, uint64_t ic,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_stream_salsa20_keygen(unsigned char k[crypto_stream_salsa20_KEYBYTES]);
void crypto_stream_salsa20_keygen(unsigned char k[crypto_stream_salsa20_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -33,15 +33,18 @@ size_t crypto_stream_salsa2012_messagebytes_max(void);
SODIUM_EXPORT
int crypto_stream_salsa2012(unsigned char *c, unsigned long long clen,
const unsigned char *n, const unsigned char *k);
const unsigned char *n, const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_salsa2012_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_stream_salsa2012_keygen(unsigned char k[crypto_stream_salsa2012_KEYBYTES]);
void crypto_stream_salsa2012_keygen(unsigned char k[crypto_stream_salsa2012_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -37,17 +37,17 @@ size_t crypto_stream_salsa208_messagebytes_max(void)
SODIUM_EXPORT
int crypto_stream_salsa208(unsigned char *c, unsigned long long clen,
const unsigned char *n, const unsigned char *k)
__attribute__ ((deprecated));
__attribute__ ((deprecated)) __attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_salsa208_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k)
__attribute__ ((deprecated));
__attribute__ ((deprecated)) __attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_stream_salsa208_keygen(unsigned char k[crypto_stream_salsa208_KEYBYTES])
__attribute__ ((deprecated));
__attribute__ ((deprecated)) __attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -34,21 +34,25 @@ size_t crypto_stream_xchacha20_messagebytes_max(void);
SODIUM_EXPORT
int crypto_stream_xchacha20(unsigned char *c, unsigned long long clen,
const unsigned char *n, const unsigned char *k);
const unsigned char *n, const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_xchacha20_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_xchacha20_xor_ic(unsigned char *c, const unsigned char *m,
unsigned long long mlen,
const unsigned char *n, uint64_t ic,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_stream_xchacha20_keygen(unsigned char k[crypto_stream_xchacha20_KEYBYTES]);
void crypto_stream_xchacha20_keygen(unsigned char k[crypto_stream_xchacha20_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -34,21 +34,25 @@ size_t crypto_stream_xsalsa20_messagebytes_max(void);
SODIUM_EXPORT
int crypto_stream_xsalsa20(unsigned char *c, unsigned long long clen,
const unsigned char *n, const unsigned char *k);
const unsigned char *n, const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_xsalsa20_xor(unsigned char *c, const unsigned char *m,
unsigned long long mlen, const unsigned char *n,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
int crypto_stream_xsalsa20_xor_ic(unsigned char *c, const unsigned char *m,
unsigned long long mlen,
const unsigned char *n, uint64_t ic,
const unsigned char *k);
const unsigned char *k)
__attribute__ ((nonnull));
SODIUM_EXPORT
void crypto_stream_xsalsa20_keygen(unsigned char k[crypto_stream_xsalsa20_KEYBYTES]);
void crypto_stream_xsalsa20_keygen(unsigned char k[crypto_stream_xsalsa20_KEYBYTES])
__attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -14,7 +14,7 @@ size_t crypto_verify_16_bytes(void);
SODIUM_EXPORT
int crypto_verify_16(const unsigned char *x, const unsigned char *y)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -14,7 +14,7 @@ size_t crypto_verify_32_bytes(void);
SODIUM_EXPORT
int crypto_verify_32(const unsigned char *x, const unsigned char *y)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -14,7 +14,7 @@ size_t crypto_verify_64_bytes(void);
SODIUM_EXPORT
int crypto_verify_64(const unsigned char *x, const unsigned char *y)
__attribute__ ((warn_unused_result));
__attribute__ ((warn_unused_result)) __attribute__ ((nonnull));
#ifdef __cplusplus
}

View File

@ -2,7 +2,11 @@
#ifndef sodium_export_H
#define sodium_export_H
#ifndef __GNUC__
#include <stddef.h>
#include <stdint.h>
#include <limits.h>
#if !defined(__clang__) && !defined(__GNUC__)
# ifdef __attribute__
# undef __attribute__
# endif

Some files were not shown because too many files have changed in this diff Show More