build and have init() inside sync
authorVolker Birk <vb@pep.foundation>
Mon, 15 Oct 2018 21:35:08 +0200
branchsync
changeset 3056924a5dfb5367
parent 3055 4a8480cf6c94
child 3057 fff5fb5e01fe
build and have init() inside
build-windows/generate_code.cmd
build-windows/libpEpasn1/ReadMe.txt
build-windows/libpEpasn1/libpEpasn1.vcxproj
build-windows/libpEpasn1/libpEpasn1.vcxproj.filters
build-windows/pEpEngine.vcxproj
src/keymanagement.c
src/keymanagement.h
     1.1 --- a/build-windows/generate_code.cmd	Sat Oct 06 08:19:14 2018 +0200
     1.2 +++ b/build-windows/generate_code.cmd	Mon Oct 15 21:35:08 2018 +0200
     1.3 @@ -20,4 +20,7 @@
     1.4  
     1.5  del *-sample.c
     1.6  
     1.7 +cd %1\..
     1.8 +if not exist pEp mklink /d pEp pEpEngine\src
     1.9 +
    1.10  popd
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/build-windows/libpEpasn1/ReadMe.txt	Mon Oct 15 21:35:08 2018 +0200
     2.3 @@ -0,0 +1,29 @@
     2.4 +========================================================================
     2.5 +    STATIC LIBRARY : libpEpasn1 Project Overview
     2.6 +========================================================================
     2.7 +
     2.8 +AppWizard has created this libpEpasn1 library project for you.
     2.9 +
    2.10 +No source files were created as part of your project.
    2.11 +
    2.12 +
    2.13 +libpEpasn1.vcxproj
    2.14 +    This is the main project file for VC++ projects generated using an Application Wizard.
    2.15 +    It contains information about the version of Visual C++ that generated the file, and
    2.16 +    information about the platforms, configurations, and project features selected with the
    2.17 +    Application Wizard.
    2.18 +
    2.19 +libpEpasn1.vcxproj.filters
    2.20 +    This is the filters file for VC++ projects generated using an Application Wizard. 
    2.21 +    It contains information about the association between the files in your project 
    2.22 +    and the filters. This association is used in the IDE to show grouping of files with
    2.23 +    similar extensions under a specific node (for e.g. ".cpp" files are associated with the
    2.24 +    "Source Files" filter).
    2.25 +
    2.26 +/////////////////////////////////////////////////////////////////////////////
    2.27 +Other notes:
    2.28 +
    2.29 +AppWizard uses "TODO:" comments to indicate parts of the source code you
    2.30 +should add to or customize.
    2.31 +
    2.32 +/////////////////////////////////////////////////////////////////////////////
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/build-windows/libpEpasn1/libpEpasn1.vcxproj	Mon Oct 15 21:35:08 2018 +0200
     3.3 @@ -0,0 +1,247 @@
     3.4 +<?xml version="1.0" encoding="utf-8"?>
     3.5 +<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     3.6 +  <ItemGroup Label="ProjectConfigurations">
     3.7 +    <ProjectConfiguration Include="Debug|Win32">
     3.8 +      <Configuration>Debug</Configuration>
     3.9 +      <Platform>Win32</Platform>
    3.10 +    </ProjectConfiguration>
    3.11 +    <ProjectConfiguration Include="Release|Win32">
    3.12 +      <Configuration>Release</Configuration>
    3.13 +      <Platform>Win32</Platform>
    3.14 +    </ProjectConfiguration>
    3.15 +    <ProjectConfiguration Include="Debug|x64">
    3.16 +      <Configuration>Debug</Configuration>
    3.17 +      <Platform>x64</Platform>
    3.18 +    </ProjectConfiguration>
    3.19 +    <ProjectConfiguration Include="Release|x64">
    3.20 +      <Configuration>Release</Configuration>
    3.21 +      <Platform>x64</Platform>
    3.22 +    </ProjectConfiguration>
    3.23 +  </ItemGroup>
    3.24 +  <PropertyGroup Label="Globals">
    3.25 +    <ProjectGuid>{9A67164D-B8F8-4601-A24B-28AFE774D41C}</ProjectGuid>
    3.26 +    <Keyword>Win32Proj</Keyword>
    3.27 +    <RootNamespace>libpEpasn1</RootNamespace>
    3.28 +    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
    3.29 +  </PropertyGroup>
    3.30 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
    3.31 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    3.32 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    3.33 +    <UseDebugLibraries>true</UseDebugLibraries>
    3.34 +    <PlatformToolset>v140</PlatformToolset>
    3.35 +    <CharacterSet>Unicode</CharacterSet>
    3.36 +  </PropertyGroup>
    3.37 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    3.38 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    3.39 +    <UseDebugLibraries>false</UseDebugLibraries>
    3.40 +    <PlatformToolset>v140</PlatformToolset>
    3.41 +    <WholeProgramOptimization>true</WholeProgramOptimization>
    3.42 +    <CharacterSet>Unicode</CharacterSet>
    3.43 +  </PropertyGroup>
    3.44 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    3.45 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    3.46 +    <UseDebugLibraries>true</UseDebugLibraries>
    3.47 +    <PlatformToolset>v140</PlatformToolset>
    3.48 +    <CharacterSet>Unicode</CharacterSet>
    3.49 +  </PropertyGroup>
    3.50 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    3.51 +    <ConfigurationType>StaticLibrary</ConfigurationType>
    3.52 +    <UseDebugLibraries>false</UseDebugLibraries>
    3.53 +    <PlatformToolset>v140</PlatformToolset>
    3.54 +    <WholeProgramOptimization>true</WholeProgramOptimization>
    3.55 +    <CharacterSet>Unicode</CharacterSet>
    3.56 +  </PropertyGroup>
    3.57 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
    3.58 +  <ImportGroup Label="ExtensionSettings">
    3.59 +  </ImportGroup>
    3.60 +  <ImportGroup Label="Shared">
    3.61 +  </ImportGroup>
    3.62 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    3.63 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    3.64 +  </ImportGroup>
    3.65 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    3.66 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    3.67 +  </ImportGroup>
    3.68 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    3.69 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    3.70 +  </ImportGroup>
    3.71 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    3.72 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    3.73 +  </ImportGroup>
    3.74 +  <PropertyGroup Label="UserMacros" />
    3.75 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    3.76 +    <IncludePath>C:\Users\vb\Documents\Visual Studio 2015\Projects\pEp_for_Outlook_Solution\pEpEngine\asn.1;$(IncludePath)</IncludePath>
    3.77 +  </PropertyGroup>
    3.78 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    3.79 +    <IncludePath>C:\Users\vb\Documents\Visual Studio 2015\Projects\pEp_for_Outlook_Solution\pEpEngine\asn.1;$(IncludePath)</IncludePath>
    3.80 +  </PropertyGroup>
    3.81 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    3.82 +    <ClCompile>
    3.83 +      <PrecompiledHeader>
    3.84 +      </PrecompiledHeader>
    3.85 +      <WarningLevel>Level3</WarningLevel>
    3.86 +      <Optimization>Disabled</Optimization>
    3.87 +      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    3.88 +    </ClCompile>
    3.89 +    <Link>
    3.90 +      <SubSystem>Windows</SubSystem>
    3.91 +    </Link>
    3.92 +    <PreBuildEvent>
    3.93 +      <Command>"$(ProjectDir)..\generate_code.cmd" "$(ProjectDir)..\.."</Command>
    3.94 +    </PreBuildEvent>
    3.95 +  </ItemDefinitionGroup>
    3.96 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    3.97 +    <ClCompile>
    3.98 +      <PrecompiledHeader>
    3.99 +      </PrecompiledHeader>
   3.100 +      <WarningLevel>Level3</WarningLevel>
   3.101 +      <Optimization>Disabled</Optimization>
   3.102 +      <PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   3.103 +    </ClCompile>
   3.104 +    <Link>
   3.105 +      <SubSystem>Windows</SubSystem>
   3.106 +    </Link>
   3.107 +  </ItemDefinitionGroup>
   3.108 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
   3.109 +    <ClCompile>
   3.110 +      <WarningLevel>Level3</WarningLevel>
   3.111 +      <PrecompiledHeader>
   3.112 +      </PrecompiledHeader>
   3.113 +      <Optimization>MaxSpeed</Optimization>
   3.114 +      <FunctionLevelLinking>true</FunctionLevelLinking>
   3.115 +      <IntrinsicFunctions>true</IntrinsicFunctions>
   3.116 +      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   3.117 +    </ClCompile>
   3.118 +    <Link>
   3.119 +      <SubSystem>Windows</SubSystem>
   3.120 +      <EnableCOMDATFolding>true</EnableCOMDATFolding>
   3.121 +      <OptimizeReferences>true</OptimizeReferences>
   3.122 +    </Link>
   3.123 +    <PreBuildEvent>
   3.124 +      <Command>"$(ProjectDir)..\generate_code.cmd" "$(ProjectDir)..\.."</Command>
   3.125 +    </PreBuildEvent>
   3.126 +  </ItemDefinitionGroup>
   3.127 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
   3.128 +    <ClCompile>
   3.129 +      <WarningLevel>Level3</WarningLevel>
   3.130 +      <PrecompiledHeader>
   3.131 +      </PrecompiledHeader>
   3.132 +      <Optimization>MaxSpeed</Optimization>
   3.133 +      <FunctionLevelLinking>true</FunctionLevelLinking>
   3.134 +      <IntrinsicFunctions>true</IntrinsicFunctions>
   3.135 +      <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   3.136 +    </ClCompile>
   3.137 +    <Link>
   3.138 +      <SubSystem>Windows</SubSystem>
   3.139 +      <EnableCOMDATFolding>true</EnableCOMDATFolding>
   3.140 +      <OptimizeReferences>true</OptimizeReferences>
   3.141 +    </Link>
   3.142 +  </ItemDefinitionGroup>
   3.143 +  <ItemGroup>
   3.144 +    <Text Include="ReadMe.txt" />
   3.145 +  </ItemGroup>
   3.146 +  <ItemGroup>
   3.147 +    <ClInclude Include="..\..\asn.1\asn_application.h" />
   3.148 +    <ClInclude Include="..\..\asn.1\asn_codecs.h" />
   3.149 +    <ClInclude Include="..\..\asn.1\asn_codecs_prim.h" />
   3.150 +    <ClInclude Include="..\..\asn.1\asn_internal.h" />
   3.151 +    <ClInclude Include="..\..\asn.1\asn_SEQUENCE_OF.h" />
   3.152 +    <ClInclude Include="..\..\asn.1\asn_SET_OF.h" />
   3.153 +    <ClInclude Include="..\..\asn.1\asn_system.h" />
   3.154 +    <ClInclude Include="..\..\asn.1\Beacon.h" />
   3.155 +    <ClInclude Include="..\..\asn.1\ber_decoder.h" />
   3.156 +    <ClInclude Include="..\..\asn.1\ber_tlv_length.h" />
   3.157 +    <ClInclude Include="..\..\asn.1\ber_tlv_tag.h" />
   3.158 +    <ClInclude Include="..\..\asn.1\BIT_STRING.h" />
   3.159 +    <ClInclude Include="..\..\asn.1\BOOLEAN.h" />
   3.160 +    <ClInclude Include="..\..\asn.1\CommitAccept.h" />
   3.161 +    <ClInclude Include="..\..\asn.1\CommitReject.h" />
   3.162 +    <ClInclude Include="..\..\asn.1\constraints.h" />
   3.163 +    <ClInclude Include="..\..\asn.1\constr_CHOICE.h" />
   3.164 +    <ClInclude Include="..\..\asn.1\constr_SEQUENCE.h" />
   3.165 +    <ClInclude Include="..\..\asn.1\constr_SEQUENCE_OF.h" />
   3.166 +    <ClInclude Include="..\..\asn.1\constr_SET_OF.h" />
   3.167 +    <ClInclude Include="..\..\asn.1\constr_TYPE.h" />
   3.168 +    <ClInclude Include="..\..\asn.1\der_encoder.h" />
   3.169 +    <ClInclude Include="..\..\asn.1\GroupKeys.h" />
   3.170 +    <ClInclude Include="..\..\asn.1\GroupKeysAndClose.h" />
   3.171 +    <ClInclude Include="..\..\asn.1\HandshakeAnswer.h" />
   3.172 +    <ClInclude Include="..\..\asn.1\HandshakeRequest.h" />
   3.173 +    <ClInclude Include="..\..\asn.1\Hash.h" />
   3.174 +    <ClInclude Include="..\..\asn.1\Hex.h" />
   3.175 +    <ClInclude Include="..\..\asn.1\Identity.h" />
   3.176 +    <ClInclude Include="..\..\asn.1\IdentityList.h" />
   3.177 +    <ClInclude Include="..\..\asn.1\INTEGER.h" />
   3.178 +    <ClInclude Include="..\..\asn.1\ISO639-1.h" />
   3.179 +    <ClInclude Include="..\..\asn.1\KeySync.h" />
   3.180 +    <ClInclude Include="..\..\asn.1\NativeEnumerated.h" />
   3.181 +    <ClInclude Include="..\..\asn.1\NativeInteger.h" />
   3.182 +    <ClInclude Include="..\..\asn.1\OCTET_STRING.h" />
   3.183 +    <ClInclude Include="..\..\asn.1\per_decoder.h" />
   3.184 +    <ClInclude Include="..\..\asn.1\per_encoder.h" />
   3.185 +    <ClInclude Include="..\..\asn.1\per_opentype.h" />
   3.186 +    <ClInclude Include="..\..\asn.1\per_support.h" />
   3.187 +    <ClInclude Include="..\..\asn.1\PrintableString.h" />
   3.188 +    <ClInclude Include="..\..\asn.1\PString.h" />
   3.189 +    <ClInclude Include="..\..\asn.1\Rollback.h" />
   3.190 +    <ClInclude Include="..\..\asn.1\Sync.h" />
   3.191 +    <ClInclude Include="..\..\asn.1\TID.h" />
   3.192 +    <ClInclude Include="..\..\asn.1\UTF8String.h" />
   3.193 +    <ClInclude Include="..\..\asn.1\Version.h" />
   3.194 +    <ClInclude Include="..\..\asn.1\xer_decoder.h" />
   3.195 +    <ClInclude Include="..\..\asn.1\xer_encoder.h" />
   3.196 +    <ClInclude Include="..\..\asn.1\xer_support.h" />
   3.197 +  </ItemGroup>
   3.198 +  <ItemGroup>
   3.199 +    <ClCompile Include="..\..\asn.1\asn_codecs_prim.c" />
   3.200 +    <ClCompile Include="..\..\asn.1\asn_SEQUENCE_OF.c" />
   3.201 +    <ClCompile Include="..\..\asn.1\asn_SET_OF.c" />
   3.202 +    <ClCompile Include="..\..\asn.1\Beacon.c" />
   3.203 +    <ClCompile Include="..\..\asn.1\ber_decoder.c" />
   3.204 +    <ClCompile Include="..\..\asn.1\ber_tlv_length.c" />
   3.205 +    <ClCompile Include="..\..\asn.1\ber_tlv_tag.c" />
   3.206 +    <ClCompile Include="..\..\asn.1\BIT_STRING.c" />
   3.207 +    <ClCompile Include="..\..\asn.1\BOOLEAN.c" />
   3.208 +    <ClCompile Include="..\..\asn.1\CommitAccept.c" />
   3.209 +    <ClCompile Include="..\..\asn.1\CommitReject.c" />
   3.210 +    <ClCompile Include="..\..\asn.1\constraints.c" />
   3.211 +    <ClCompile Include="..\..\asn.1\constr_CHOICE.c" />
   3.212 +    <ClCompile Include="..\..\asn.1\constr_SEQUENCE.c" />
   3.213 +    <ClCompile Include="..\..\asn.1\constr_SEQUENCE_OF.c" />
   3.214 +    <ClCompile Include="..\..\asn.1\constr_SET_OF.c" />
   3.215 +    <ClCompile Include="..\..\asn.1\constr_TYPE.c" />
   3.216 +    <ClCompile Include="..\..\asn.1\der_encoder.c" />
   3.217 +    <ClCompile Include="..\..\asn.1\GroupKeys.c" />
   3.218 +    <ClCompile Include="..\..\asn.1\GroupKeysAndClose.c" />
   3.219 +    <ClCompile Include="..\..\asn.1\HandshakeAnswer.c" />
   3.220 +    <ClCompile Include="..\..\asn.1\HandshakeRequest.c" />
   3.221 +    <ClCompile Include="..\..\asn.1\Hash.c" />
   3.222 +    <ClCompile Include="..\..\asn.1\Hex.c" />
   3.223 +    <ClCompile Include="..\..\asn.1\Identity.c" />
   3.224 +    <ClCompile Include="..\..\asn.1\IdentityList.c" />
   3.225 +    <ClCompile Include="..\..\asn.1\INTEGER.c" />
   3.226 +    <ClCompile Include="..\..\asn.1\ISO639-1.c" />
   3.227 +    <ClCompile Include="..\..\asn.1\KeySync.c" />
   3.228 +    <ClCompile Include="..\..\asn.1\NativeEnumerated.c" />
   3.229 +    <ClCompile Include="..\..\asn.1\NativeInteger.c" />
   3.230 +    <ClCompile Include="..\..\asn.1\OCTET_STRING.c" />
   3.231 +    <ClCompile Include="..\..\asn.1\pdu_collection.c" />
   3.232 +    <ClCompile Include="..\..\asn.1\per_decoder.c" />
   3.233 +    <ClCompile Include="..\..\asn.1\per_encoder.c" />
   3.234 +    <ClCompile Include="..\..\asn.1\per_opentype.c" />
   3.235 +    <ClCompile Include="..\..\asn.1\per_support.c" />
   3.236 +    <ClCompile Include="..\..\asn.1\PrintableString.c" />
   3.237 +    <ClCompile Include="..\..\asn.1\PString.c" />
   3.238 +    <ClCompile Include="..\..\asn.1\Rollback.c" />
   3.239 +    <ClCompile Include="..\..\asn.1\Sync.c" />
   3.240 +    <ClCompile Include="..\..\asn.1\TID.c" />
   3.241 +    <ClCompile Include="..\..\asn.1\UTF8String.c" />
   3.242 +    <ClCompile Include="..\..\asn.1\Version.c" />
   3.243 +    <ClCompile Include="..\..\asn.1\xer_decoder.c" />
   3.244 +    <ClCompile Include="..\..\asn.1\xer_encoder.c" />
   3.245 +    <ClCompile Include="..\..\asn.1\xer_support.c" />
   3.246 +  </ItemGroup>
   3.247 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   3.248 +  <ImportGroup Label="ExtensionTargets">
   3.249 +  </ImportGroup>
   3.250 +</Project>
   3.251 \ No newline at end of file
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/build-windows/libpEpasn1/libpEpasn1.vcxproj.filters	Mon Oct 15 21:35:08 2018 +0200
     4.3 @@ -0,0 +1,315 @@
     4.4 +<?xml version="1.0" encoding="utf-8"?>
     4.5 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     4.6 +  <ItemGroup>
     4.7 +    <Filter Include="Source Files">
     4.8 +      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
     4.9 +      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
    4.10 +    </Filter>
    4.11 +    <Filter Include="Header Files">
    4.12 +      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
    4.13 +      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
    4.14 +    </Filter>
    4.15 +    <Filter Include="Resource Files">
    4.16 +      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
    4.17 +      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
    4.18 +    </Filter>
    4.19 +  </ItemGroup>
    4.20 +  <ItemGroup>
    4.21 +    <Text Include="ReadMe.txt" />
    4.22 +  </ItemGroup>
    4.23 +  <ItemGroup>
    4.24 +    <ClInclude Include="..\..\asn.1\asn_application.h">
    4.25 +      <Filter>Header Files</Filter>
    4.26 +    </ClInclude>
    4.27 +    <ClInclude Include="..\..\asn.1\asn_codecs.h">
    4.28 +      <Filter>Header Files</Filter>
    4.29 +    </ClInclude>
    4.30 +    <ClInclude Include="..\..\asn.1\asn_codecs_prim.h">
    4.31 +      <Filter>Header Files</Filter>
    4.32 +    </ClInclude>
    4.33 +    <ClInclude Include="..\..\asn.1\asn_internal.h">
    4.34 +      <Filter>Header Files</Filter>
    4.35 +    </ClInclude>
    4.36 +    <ClInclude Include="..\..\asn.1\asn_SEQUENCE_OF.h">
    4.37 +      <Filter>Header Files</Filter>
    4.38 +    </ClInclude>
    4.39 +    <ClInclude Include="..\..\asn.1\asn_SET_OF.h">
    4.40 +      <Filter>Header Files</Filter>
    4.41 +    </ClInclude>
    4.42 +    <ClInclude Include="..\..\asn.1\asn_system.h">
    4.43 +      <Filter>Header Files</Filter>
    4.44 +    </ClInclude>
    4.45 +    <ClInclude Include="..\..\asn.1\Beacon.h">
    4.46 +      <Filter>Header Files</Filter>
    4.47 +    </ClInclude>
    4.48 +    <ClInclude Include="..\..\asn.1\ber_decoder.h">
    4.49 +      <Filter>Header Files</Filter>
    4.50 +    </ClInclude>
    4.51 +    <ClInclude Include="..\..\asn.1\ber_tlv_length.h">
    4.52 +      <Filter>Header Files</Filter>
    4.53 +    </ClInclude>
    4.54 +    <ClInclude Include="..\..\asn.1\ber_tlv_tag.h">
    4.55 +      <Filter>Header Files</Filter>
    4.56 +    </ClInclude>
    4.57 +    <ClInclude Include="..\..\asn.1\BIT_STRING.h">
    4.58 +      <Filter>Header Files</Filter>
    4.59 +    </ClInclude>
    4.60 +    <ClInclude Include="..\..\asn.1\BOOLEAN.h">
    4.61 +      <Filter>Header Files</Filter>
    4.62 +    </ClInclude>
    4.63 +    <ClInclude Include="..\..\asn.1\CommitAccept.h">
    4.64 +      <Filter>Header Files</Filter>
    4.65 +    </ClInclude>
    4.66 +    <ClInclude Include="..\..\asn.1\CommitReject.h">
    4.67 +      <Filter>Header Files</Filter>
    4.68 +    </ClInclude>
    4.69 +    <ClInclude Include="..\..\asn.1\constr_CHOICE.h">
    4.70 +      <Filter>Header Files</Filter>
    4.71 +    </ClInclude>
    4.72 +    <ClInclude Include="..\..\asn.1\constr_SEQUENCE.h">
    4.73 +      <Filter>Header Files</Filter>
    4.74 +    </ClInclude>
    4.75 +    <ClInclude Include="..\..\asn.1\constr_SEQUENCE_OF.h">
    4.76 +      <Filter>Header Files</Filter>
    4.77 +    </ClInclude>
    4.78 +    <ClInclude Include="..\..\asn.1\constr_SET_OF.h">
    4.79 +      <Filter>Header Files</Filter>
    4.80 +    </ClInclude>
    4.81 +    <ClInclude Include="..\..\asn.1\constr_TYPE.h">
    4.82 +      <Filter>Header Files</Filter>
    4.83 +    </ClInclude>
    4.84 +    <ClInclude Include="..\..\asn.1\constraints.h">
    4.85 +      <Filter>Header Files</Filter>
    4.86 +    </ClInclude>
    4.87 +    <ClInclude Include="..\..\asn.1\der_encoder.h">
    4.88 +      <Filter>Header Files</Filter>
    4.89 +    </ClInclude>
    4.90 +    <ClInclude Include="..\..\asn.1\GroupKeys.h">
    4.91 +      <Filter>Header Files</Filter>
    4.92 +    </ClInclude>
    4.93 +    <ClInclude Include="..\..\asn.1\GroupKeysAndClose.h">
    4.94 +      <Filter>Header Files</Filter>
    4.95 +    </ClInclude>
    4.96 +    <ClInclude Include="..\..\asn.1\HandshakeAnswer.h">
    4.97 +      <Filter>Header Files</Filter>
    4.98 +    </ClInclude>
    4.99 +    <ClInclude Include="..\..\asn.1\HandshakeRequest.h">
   4.100 +      <Filter>Header Files</Filter>
   4.101 +    </ClInclude>
   4.102 +    <ClInclude Include="..\..\asn.1\Hash.h">
   4.103 +      <Filter>Header Files</Filter>
   4.104 +    </ClInclude>
   4.105 +    <ClInclude Include="..\..\asn.1\Hex.h">
   4.106 +      <Filter>Header Files</Filter>
   4.107 +    </ClInclude>
   4.108 +    <ClInclude Include="..\..\asn.1\Identity.h">
   4.109 +      <Filter>Header Files</Filter>
   4.110 +    </ClInclude>
   4.111 +    <ClInclude Include="..\..\asn.1\IdentityList.h">
   4.112 +      <Filter>Header Files</Filter>
   4.113 +    </ClInclude>
   4.114 +    <ClInclude Include="..\..\asn.1\INTEGER.h">
   4.115 +      <Filter>Header Files</Filter>
   4.116 +    </ClInclude>
   4.117 +    <ClInclude Include="..\..\asn.1\ISO639-1.h">
   4.118 +      <Filter>Header Files</Filter>
   4.119 +    </ClInclude>
   4.120 +    <ClInclude Include="..\..\asn.1\KeySync.h">
   4.121 +      <Filter>Header Files</Filter>
   4.122 +    </ClInclude>
   4.123 +    <ClInclude Include="..\..\asn.1\NativeEnumerated.h">
   4.124 +      <Filter>Header Files</Filter>
   4.125 +    </ClInclude>
   4.126 +    <ClInclude Include="..\..\asn.1\NativeInteger.h">
   4.127 +      <Filter>Header Files</Filter>
   4.128 +    </ClInclude>
   4.129 +    <ClInclude Include="..\..\asn.1\OCTET_STRING.h">
   4.130 +      <Filter>Header Files</Filter>
   4.131 +    </ClInclude>
   4.132 +    <ClInclude Include="..\..\asn.1\per_decoder.h">
   4.133 +      <Filter>Header Files</Filter>
   4.134 +    </ClInclude>
   4.135 +    <ClInclude Include="..\..\asn.1\per_encoder.h">
   4.136 +      <Filter>Header Files</Filter>
   4.137 +    </ClInclude>
   4.138 +    <ClInclude Include="..\..\asn.1\per_opentype.h">
   4.139 +      <Filter>Header Files</Filter>
   4.140 +    </ClInclude>
   4.141 +    <ClInclude Include="..\..\asn.1\per_support.h">
   4.142 +      <Filter>Header Files</Filter>
   4.143 +    </ClInclude>
   4.144 +    <ClInclude Include="..\..\asn.1\PrintableString.h">
   4.145 +      <Filter>Header Files</Filter>
   4.146 +    </ClInclude>
   4.147 +    <ClInclude Include="..\..\asn.1\PString.h">
   4.148 +      <Filter>Header Files</Filter>
   4.149 +    </ClInclude>
   4.150 +    <ClInclude Include="..\..\asn.1\Rollback.h">
   4.151 +      <Filter>Header Files</Filter>
   4.152 +    </ClInclude>
   4.153 +    <ClInclude Include="..\..\asn.1\Sync.h">
   4.154 +      <Filter>Header Files</Filter>
   4.155 +    </ClInclude>
   4.156 +    <ClInclude Include="..\..\asn.1\TID.h">
   4.157 +      <Filter>Header Files</Filter>
   4.158 +    </ClInclude>
   4.159 +    <ClInclude Include="..\..\asn.1\UTF8String.h">
   4.160 +      <Filter>Header Files</Filter>
   4.161 +    </ClInclude>
   4.162 +    <ClInclude Include="..\..\asn.1\Version.h">
   4.163 +      <Filter>Header Files</Filter>
   4.164 +    </ClInclude>
   4.165 +    <ClInclude Include="..\..\asn.1\xer_decoder.h">
   4.166 +      <Filter>Header Files</Filter>
   4.167 +    </ClInclude>
   4.168 +    <ClInclude Include="..\..\asn.1\xer_encoder.h">
   4.169 +      <Filter>Header Files</Filter>
   4.170 +    </ClInclude>
   4.171 +    <ClInclude Include="..\..\asn.1\xer_support.h">
   4.172 +      <Filter>Header Files</Filter>
   4.173 +    </ClInclude>
   4.174 +  </ItemGroup>
   4.175 +  <ItemGroup>
   4.176 +    <ClCompile Include="..\..\asn.1\asn_codecs_prim.c">
   4.177 +      <Filter>Source Files</Filter>
   4.178 +    </ClCompile>
   4.179 +    <ClCompile Include="..\..\asn.1\asn_SEQUENCE_OF.c">
   4.180 +      <Filter>Source Files</Filter>
   4.181 +    </ClCompile>
   4.182 +    <ClCompile Include="..\..\asn.1\asn_SET_OF.c">
   4.183 +      <Filter>Source Files</Filter>
   4.184 +    </ClCompile>
   4.185 +    <ClCompile Include="..\..\asn.1\Beacon.c">
   4.186 +      <Filter>Source Files</Filter>
   4.187 +    </ClCompile>
   4.188 +    <ClCompile Include="..\..\asn.1\ber_decoder.c">
   4.189 +      <Filter>Source Files</Filter>
   4.190 +    </ClCompile>
   4.191 +    <ClCompile Include="..\..\asn.1\ber_tlv_length.c">
   4.192 +      <Filter>Source Files</Filter>
   4.193 +    </ClCompile>
   4.194 +    <ClCompile Include="..\..\asn.1\ber_tlv_tag.c">
   4.195 +      <Filter>Source Files</Filter>
   4.196 +    </ClCompile>
   4.197 +    <ClCompile Include="..\..\asn.1\BIT_STRING.c">
   4.198 +      <Filter>Source Files</Filter>
   4.199 +    </ClCompile>
   4.200 +    <ClCompile Include="..\..\asn.1\BOOLEAN.c">
   4.201 +      <Filter>Source Files</Filter>
   4.202 +    </ClCompile>
   4.203 +    <ClCompile Include="..\..\asn.1\CommitAccept.c">
   4.204 +      <Filter>Source Files</Filter>
   4.205 +    </ClCompile>
   4.206 +    <ClCompile Include="..\..\asn.1\CommitReject.c">
   4.207 +      <Filter>Source Files</Filter>
   4.208 +    </ClCompile>
   4.209 +    <ClCompile Include="..\..\asn.1\constr_CHOICE.c">
   4.210 +      <Filter>Source Files</Filter>
   4.211 +    </ClCompile>
   4.212 +    <ClCompile Include="..\..\asn.1\constr_SEQUENCE.c">
   4.213 +      <Filter>Source Files</Filter>
   4.214 +    </ClCompile>
   4.215 +    <ClCompile Include="..\..\asn.1\constr_SEQUENCE_OF.c">
   4.216 +      <Filter>Source Files</Filter>
   4.217 +    </ClCompile>
   4.218 +    <ClCompile Include="..\..\asn.1\constr_SET_OF.c">
   4.219 +      <Filter>Source Files</Filter>
   4.220 +    </ClCompile>
   4.221 +    <ClCompile Include="..\..\asn.1\constr_TYPE.c">
   4.222 +      <Filter>Source Files</Filter>
   4.223 +    </ClCompile>
   4.224 +    <ClCompile Include="..\..\asn.1\constraints.c">
   4.225 +      <Filter>Source Files</Filter>
   4.226 +    </ClCompile>
   4.227 +    <ClCompile Include="..\..\asn.1\der_encoder.c">
   4.228 +      <Filter>Source Files</Filter>
   4.229 +    </ClCompile>
   4.230 +    <ClCompile Include="..\..\asn.1\GroupKeys.c">
   4.231 +      <Filter>Source Files</Filter>
   4.232 +    </ClCompile>
   4.233 +    <ClCompile Include="..\..\asn.1\GroupKeysAndClose.c">
   4.234 +      <Filter>Source Files</Filter>
   4.235 +    </ClCompile>
   4.236 +    <ClCompile Include="..\..\asn.1\HandshakeAnswer.c">
   4.237 +      <Filter>Source Files</Filter>
   4.238 +    </ClCompile>
   4.239 +    <ClCompile Include="..\..\asn.1\HandshakeRequest.c">
   4.240 +      <Filter>Source Files</Filter>
   4.241 +    </ClCompile>
   4.242 +    <ClCompile Include="..\..\asn.1\Hash.c">
   4.243 +      <Filter>Source Files</Filter>
   4.244 +    </ClCompile>
   4.245 +    <ClCompile Include="..\..\asn.1\Hex.c">
   4.246 +      <Filter>Source Files</Filter>
   4.247 +    </ClCompile>
   4.248 +    <ClCompile Include="..\..\asn.1\Identity.c">
   4.249 +      <Filter>Source Files</Filter>
   4.250 +    </ClCompile>
   4.251 +    <ClCompile Include="..\..\asn.1\IdentityList.c">
   4.252 +      <Filter>Source Files</Filter>
   4.253 +    </ClCompile>
   4.254 +    <ClCompile Include="..\..\asn.1\INTEGER.c">
   4.255 +      <Filter>Source Files</Filter>
   4.256 +    </ClCompile>
   4.257 +    <ClCompile Include="..\..\asn.1\ISO639-1.c">
   4.258 +      <Filter>Source Files</Filter>
   4.259 +    </ClCompile>
   4.260 +    <ClCompile Include="..\..\asn.1\KeySync.c">
   4.261 +      <Filter>Source Files</Filter>
   4.262 +    </ClCompile>
   4.263 +    <ClCompile Include="..\..\asn.1\NativeEnumerated.c">
   4.264 +      <Filter>Source Files</Filter>
   4.265 +    </ClCompile>
   4.266 +    <ClCompile Include="..\..\asn.1\NativeInteger.c">
   4.267 +      <Filter>Source Files</Filter>
   4.268 +    </ClCompile>
   4.269 +    <ClCompile Include="..\..\asn.1\OCTET_STRING.c">
   4.270 +      <Filter>Source Files</Filter>
   4.271 +    </ClCompile>
   4.272 +    <ClCompile Include="..\..\asn.1\pdu_collection.c">
   4.273 +      <Filter>Source Files</Filter>
   4.274 +    </ClCompile>
   4.275 +    <ClCompile Include="..\..\asn.1\per_decoder.c">
   4.276 +      <Filter>Source Files</Filter>
   4.277 +    </ClCompile>
   4.278 +    <ClCompile Include="..\..\asn.1\per_encoder.c">
   4.279 +      <Filter>Source Files</Filter>
   4.280 +    </ClCompile>
   4.281 +    <ClCompile Include="..\..\asn.1\per_opentype.c">
   4.282 +      <Filter>Source Files</Filter>
   4.283 +    </ClCompile>
   4.284 +    <ClCompile Include="..\..\asn.1\per_support.c">
   4.285 +      <Filter>Source Files</Filter>
   4.286 +    </ClCompile>
   4.287 +    <ClCompile Include="..\..\asn.1\PrintableString.c">
   4.288 +      <Filter>Source Files</Filter>
   4.289 +    </ClCompile>
   4.290 +    <ClCompile Include="..\..\asn.1\PString.c">
   4.291 +      <Filter>Source Files</Filter>
   4.292 +    </ClCompile>
   4.293 +    <ClCompile Include="..\..\asn.1\Rollback.c">
   4.294 +      <Filter>Source Files</Filter>
   4.295 +    </ClCompile>
   4.296 +    <ClCompile Include="..\..\asn.1\Sync.c">
   4.297 +      <Filter>Source Files</Filter>
   4.298 +    </ClCompile>
   4.299 +    <ClCompile Include="..\..\asn.1\TID.c">
   4.300 +      <Filter>Source Files</Filter>
   4.301 +    </ClCompile>
   4.302 +    <ClCompile Include="..\..\asn.1\UTF8String.c">
   4.303 +      <Filter>Source Files</Filter>
   4.304 +    </ClCompile>
   4.305 +    <ClCompile Include="..\..\asn.1\Version.c">
   4.306 +      <Filter>Source Files</Filter>
   4.307 +    </ClCompile>
   4.308 +    <ClCompile Include="..\..\asn.1\xer_decoder.c">
   4.309 +      <Filter>Source Files</Filter>
   4.310 +    </ClCompile>
   4.311 +    <ClCompile Include="..\..\asn.1\xer_encoder.c">
   4.312 +      <Filter>Source Files</Filter>
   4.313 +    </ClCompile>
   4.314 +    <ClCompile Include="..\..\asn.1\xer_support.c">
   4.315 +      <Filter>Source Files</Filter>
   4.316 +    </ClCompile>
   4.317 +  </ItemGroup>
   4.318 +</Project>
   4.319 \ No newline at end of file
     5.1 --- a/build-windows/pEpEngine.vcxproj	Sat Oct 06 08:19:14 2018 +0200
     5.2 +++ b/build-windows/pEpEngine.vcxproj	Mon Oct 15 21:35:08 2018 +0200
     5.3 @@ -65,11 +65,11 @@
     5.4      <Link>
     5.5        <SubSystem>Windows</SubSystem>
     5.6        <GenerateDebugInformation>true</GenerateDebugInformation>
     5.7 -      <AdditionalDependencies>$(TargetDir)\pEpEngineASN1.lib;Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
     5.8 +      <AdditionalDependencies>Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
     5.9      </Link>
    5.10      <PreBuildEvent>
    5.11 -      <Command>"$(SysProjectDir)generate_code.cmd" "$(ProjectDir).."
    5.12 -</Command>
    5.13 +      <Command>
    5.14 +      </Command>
    5.15      </PreBuildEvent>
    5.16    </ItemDefinitionGroup>
    5.17    <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    5.18 @@ -92,11 +92,11 @@
    5.19        <GenerateDebugInformation>true</GenerateDebugInformation>
    5.20        <EnableCOMDATFolding>true</EnableCOMDATFolding>
    5.21        <OptimizeReferences>true</OptimizeReferences>
    5.22 -      <AdditionalDependencies>$(TargetDir)\pEpEngineASN1.lib;Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
    5.23 +      <AdditionalDependencies>Rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
    5.24      </Link>
    5.25      <PreBuildEvent>
    5.26 -      <Command>"$(SysProjectDir)generate_code.cmd" "$(ProjectDir).."
    5.27 -</Command>
    5.28 +      <Command>
    5.29 +      </Command>
    5.30      </PreBuildEvent>
    5.31    </ItemDefinitionGroup>
    5.32    <ItemGroup>
     6.1 --- a/src/keymanagement.c	Sat Oct 06 08:19:14 2018 +0200
     6.2 +++ b/src/keymanagement.c	Mon Oct 15 21:35:08 2018 +0200
     6.3 @@ -1118,13 +1118,16 @@
     6.4  }
     6.5  
     6.6  DYNAMIC_API PEP_STATUS do_keymanagement(
     6.7 -        PEP_SESSION session,
     6.8          retrieve_next_identity_t retrieve_next_identity,
     6.9          void *management
    6.10      )
    6.11  {
    6.12 +    PEP_SESSION session;
    6.13      pEp_identity *identity;
    6.14 -    PEP_STATUS status;
    6.15 +    PEP_STATUS status = init(&session, NULL, NULL);
    6.16 +    assert(!status);
    6.17 +    if (status)
    6.18 +        return status;
    6.19  
    6.20      assert(session && retrieve_next_identity);
    6.21      if (!(session && retrieve_next_identity))
    6.22 @@ -1153,7 +1156,7 @@
    6.23      }
    6.24  
    6.25      log_event(session, "keymanagement thread shutdown", "pEp engine", NULL, NULL);
    6.26 -
    6.27 +    release(session);
    6.28      return PEP_STATUS_OK;
    6.29  }
    6.30  
     7.1 --- a/src/keymanagement.h	Sat Oct 06 08:19:14 2018 +0200
     7.2 +++ b/src/keymanagement.h	Mon Oct 15 21:35:08 2018 +0200
     7.3 @@ -164,14 +164,9 @@
     7.4  // do_keymanagement() - function to be run on an extra thread
     7.5  //
     7.6  //  parameters:
     7.7 -//      session (in)                session to use
     7.8  //      retrieve_next_identity (in) pointer to retrieve_next_identity()
     7.9  //                                  callback which returns at least a valid
    7.10  //                                  address field in the identity struct
    7.11 -//      messageToSend (in)          callback for sending message by the
    7.12 -//                                  application
    7.13 -//      management (in)             management data to give to keymanagement
    7.14 -//                                  (implementation defined)
    7.15  //
    7.16  //  return value:
    7.17  //      PEP_STATUS_OK if thread has to terminate successfully or any other
    7.18 @@ -187,7 +182,6 @@
    7.19  //      if transport system is not used it must not be NULL
    7.20  
    7.21  DYNAMIC_API PEP_STATUS do_keymanagement(
    7.22 -        PEP_SESSION session,
    7.23          retrieve_next_identity_t retrieve_next_identity,
    7.24          void *management
    7.25      );