Skip to content

Commit 663bbc4

Browse files
committed
initial commit
0 parents  commit 663bbc4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+4196
-0
lines changed

Enclave Bridge/Enclave Bridge.vcxproj

+237
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|x64">
5+
<Configuration>Debug</Configuration>
6+
<Platform>x64</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Prerelease|x64">
9+
<Configuration>Prerelease</Configuration>
10+
<Platform>x64</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Release|x64">
13+
<Configuration>Release</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Simulation|x64">
17+
<Configuration>Simulation</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<ProjectGuid>{82B30E48-D333-40DB-B289-4DAE12E5A86E}</ProjectGuid>
23+
<Keyword>Win32Proj</Keyword>
24+
<RootNamespace>Enclave Native</RootNamespace>
25+
<ProjectName>Enclave Bridge</ProjectName>
26+
</PropertyGroup>
27+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
29+
<ConfigurationType>DynamicLibrary</ConfigurationType>
30+
<UseDebugLibraries>true</UseDebugLibraries>
31+
<PlatformToolset>v120</PlatformToolset>
32+
<CharacterSet>Unicode</CharacterSet>
33+
</PropertyGroup>
34+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Simulation|x64'" Label="Configuration">
35+
<ConfigurationType>DynamicLibrary</ConfigurationType>
36+
<UseDebugLibraries>true</UseDebugLibraries>
37+
<PlatformToolset>v120</PlatformToolset>
38+
<CharacterSet>Unicode</CharacterSet>
39+
</PropertyGroup>
40+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
41+
<ConfigurationType>DynamicLibrary</ConfigurationType>
42+
<UseDebugLibraries>false</UseDebugLibraries>
43+
<PlatformToolset>v120</PlatformToolset>
44+
<WholeProgramOptimization>true</WholeProgramOptimization>
45+
<CharacterSet>Unicode</CharacterSet>
46+
</PropertyGroup>
47+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Prerelease|x64'" Label="Configuration">
48+
<ConfigurationType>DynamicLibrary</ConfigurationType>
49+
<UseDebugLibraries>false</UseDebugLibraries>
50+
<PlatformToolset>v120</PlatformToolset>
51+
<WholeProgramOptimization>true</WholeProgramOptimization>
52+
<CharacterSet>Unicode</CharacterSet>
53+
</PropertyGroup>
54+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
55+
<ImportGroup Label="ExtensionSettings">
56+
</ImportGroup>
57+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
58+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
59+
</ImportGroup>
60+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Simulation|x64'" Label="PropertySheets">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Prerelease|x64'" Label="PropertySheets">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<PropertyGroup Label="UserMacros" />
70+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
71+
<IgnoreImportLibrary>false</IgnoreImportLibrary>
72+
</PropertyGroup>
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Simulation|x64'">
74+
<LinkIncremental>true</LinkIncremental>
75+
</PropertyGroup>
76+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
77+
<LinkIncremental>false</LinkIncremental>
78+
</PropertyGroup>
79+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Prerelease|x64'">
80+
<LinkIncremental>false</LinkIncremental>
81+
</PropertyGroup>
82+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
83+
<ClCompile>
84+
<PrecompiledHeader>Use</PrecompiledHeader>
85+
<WarningLevel>Level3</WarningLevel>
86+
<Optimization>Disabled</Optimization>
87+
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ENCLAVELINKNATIVE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
88+
<AdditionalIncludeDirectories>$(SGXSDKInstallPath)\include;..\Enclave Link;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
89+
</ClCompile>
90+
<Link>
91+
<SubSystem>Windows</SubSystem>
92+
<GenerateDebugInformation>true</GenerateDebugInformation>
93+
<NoEntryPoint>true</NoEntryPoint>
94+
<AdditionalLibraryDirectories>$(SGXSDKInstallPath)\bin\$(Platform)\Debug;$(SolutionDir)$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
95+
<DelayLoadDLLs>
96+
</DelayLoadDLLs>
97+
<ForceSymbolReferences>
98+
</ForceSymbolReferences>
99+
<AdditionalDependencies>sgx_urts.lib;sgx_uae_service.lib;%(AdditionalDependencies)</AdditionalDependencies>
100+
</Link>
101+
<PostBuildEvent>
102+
<Command>
103+
</Command>
104+
</PostBuildEvent>
105+
<PostBuildEvent>
106+
<Message>
107+
</Message>
108+
</PostBuildEvent>
109+
<ProjectReference />
110+
</ItemDefinitionGroup>
111+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Simulation|x64'">
112+
<ClCompile>
113+
<PrecompiledHeader>Use</PrecompiledHeader>
114+
<WarningLevel>Level3</WarningLevel>
115+
<Optimization>Disabled</Optimization>
116+
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;ENCLAVELINKNATIVE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
117+
<AdditionalIncludeDirectories>$(SGXSDKInstallPath)\include;..\Enclave Link;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
118+
</ClCompile>
119+
<Link>
120+
<SubSystem>Windows</SubSystem>
121+
<GenerateDebugInformation>true</GenerateDebugInformation>
122+
<AdditionalLibraryDirectories>$(SGXSDKInstallPath)\bin\$(Platform)\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
123+
<AdditionalDependencies>sgx_urts_sim.lib;sgx_uae_service_sim.lib;%(AdditionalDependencies)</AdditionalDependencies>
124+
</Link>
125+
<PostBuildEvent>
126+
<Command>
127+
</Command>
128+
</PostBuildEvent>
129+
</ItemDefinitionGroup>
130+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
131+
<ClCompile>
132+
<WarningLevel>Level3</WarningLevel>
133+
<PrecompiledHeader>Use</PrecompiledHeader>
134+
<Optimization>MaxSpeed</Optimization>
135+
<FunctionLevelLinking>true</FunctionLevelLinking>
136+
<IntrinsicFunctions>true</IntrinsicFunctions>
137+
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;ENCLAVELINKNATIVE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
138+
<AdditionalIncludeDirectories>$(SGXSDKInstallPath)\include;..\Enclave Link;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
139+
</ClCompile>
140+
<Link>
141+
<SubSystem>Windows</SubSystem>
142+
<GenerateDebugInformation>true</GenerateDebugInformation>
143+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
144+
<OptimizeReferences>true</OptimizeReferences>
145+
<AdditionalLibraryDirectories>$(SGXSDKInstallPath)\bin\$(Platform)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
146+
<AdditionalDependencies>sgx_urts.lib;sgx_uae_service.lib;%(AdditionalDependencies)</AdditionalDependencies>
147+
</Link>
148+
<PostBuildEvent>
149+
<Command>
150+
</Command>
151+
</PostBuildEvent>
152+
</ItemDefinitionGroup>
153+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Prerelease|x64'">
154+
<ClCompile>
155+
<WarningLevel>Level3</WarningLevel>
156+
<PrecompiledHeader>Use</PrecompiledHeader>
157+
<Optimization>MaxSpeed</Optimization>
158+
<FunctionLevelLinking>true</FunctionLevelLinking>
159+
<IntrinsicFunctions>true</IntrinsicFunctions>
160+
<PreprocessorDefinitions>EDEBUG;WIN32;NDEBUG;_WINDOWS;_USRDLL;ENCLAVELINKNATIVE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
161+
<AdditionalIncludeDirectories>$(SGXSDKInstallPath)\include;..\Enclave Link;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
162+
</ClCompile>
163+
<Link>
164+
<SubSystem>Windows</SubSystem>
165+
<GenerateDebugInformation>true</GenerateDebugInformation>
166+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
167+
<OptimizeReferences>true</OptimizeReferences>
168+
<AdditionalLibraryDirectories>$(SGXSDKInstallPath)\bin\$(Platform)\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
169+
<AdditionalDependencies>sgx_urts.lib;sgx_uae_service.lib;%(AdditionalDependencies)</AdditionalDependencies>
170+
</Link>
171+
<PostBuildEvent>
172+
<Command>
173+
</Command>
174+
</PostBuildEvent>
175+
</ItemDefinitionGroup>
176+
<ItemGroup>
177+
<Text Include="ReadMe.txt" />
178+
</ItemGroup>
179+
<ItemGroup>
180+
<ClInclude Include="EnclaveBridge.h" />
181+
<ClInclude Include="Enclave_u.h" />
182+
<ClInclude Include="stdafx.h" />
183+
<ClInclude Include="targetver.h" />
184+
</ItemGroup>
185+
<ItemGroup>
186+
<ClCompile Include="dllmain.cpp">
187+
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
188+
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Simulation|x64'">false</CompileAsManaged>
189+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
190+
</PrecompiledHeader>
191+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Simulation|x64'">
192+
</PrecompiledHeader>
193+
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
194+
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Prerelease|x64'">false</CompileAsManaged>
195+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
196+
</PrecompiledHeader>
197+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Prerelease|x64'">
198+
</PrecompiledHeader>
199+
</ClCompile>
200+
<ClCompile Include="EnclaveBridge.cpp" />
201+
<ClCompile Include="Enclave_u.c">
202+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Prerelease|x64'">
203+
</PrecompiledHeader>
204+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Simulation|x64'">
205+
</PrecompiledHeader>
206+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
207+
</PrecompiledHeader>
208+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
209+
</PrecompiledHeader>
210+
</ClCompile>
211+
<ClCompile Include="stdafx.cpp">
212+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
213+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Simulation|x64'">Create</PrecompiledHeader>
214+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
215+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Prerelease|x64'">Create</PrecompiledHeader>
216+
</ClCompile>
217+
</ItemGroup>
218+
<ItemGroup>
219+
<CustomBuild Include="..\Enclave\Enclave.edl">
220+
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(SGXSDKInstallPath)\bin\win32\Release\sgx_edger8r.exe" --untrusted ".\..\Enclave\Enclave.edl" --search-path ".\..\Enclave%3b$(SGXSDKInstallPath)\include"</Command>
221+
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Creating untrusted proxy/bridge routines</Message>
222+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)%(Filename)_u.h;$(ProjectDir)%(Filename)_u.c;%(Outputs)</Outputs>
223+
<Command Condition="'$(Configuration)|$(Platform)'=='Prerelease|x64'">"$(SGXSDKInstallPath)\bin\win32\Release\sgx_edger8r.exe" --untrusted ".\..\Enclave\Enclave.edl" --search-path ".\..\Enclave%3b$(SGXSDKInstallPath)\include"</Command>
224+
<Message Condition="'$(Configuration)|$(Platform)'=='Prerelease|x64'">Creating untrusted proxy/bridge routines</Message>
225+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Prerelease|x64'">$(ProjectDir)%(Filename)_u.h;$(ProjectDir)%(Filename)_u.c;%(Outputs)</Outputs>
226+
<Command Condition="'$(Configuration)|$(Platform)'=='Simulation|x64'">"$(SGXSDKInstallPath)\bin\win32\Release\sgx_edger8r.exe" --untrusted ".\..\Enclave\Enclave.edl" --search-path ".\..\Enclave%3b$(SGXSDKInstallPath)\include"</Command>
227+
<Message Condition="'$(Configuration)|$(Platform)'=='Simulation|x64'">Creating untrusted proxy/bridge routines</Message>
228+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Simulation|x64'">$(ProjectDir)%(Filename)_u.h;$(ProjectDir)%(Filename)_u.c;%(Outputs)</Outputs>
229+
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(SGXSDKInstallPath)\bin\win32\Release\sgx_edger8r.exe" --untrusted ".\..\Enclave\Enclave.edl" --search-path ".\..\Enclave%3b$(SGXSDKInstallPath)\include"</Command>
230+
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Creating untrusted proxy/bridge routines</Message>
231+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)%(Filename)_u.h;$(ProjectDir)%(Filename)_u.c;%(Outputs)</Outputs>
232+
</CustomBuild>
233+
</ItemGroup>
234+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
235+
<ImportGroup Label="ExtensionTargets">
236+
</ImportGroup>
237+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
4+
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
5+
<LocalDebuggerDebuggerType>Auto</LocalDebuggerDebuggerType>
6+
</PropertyGroup>
7+
</Project>

Enclave Bridge/EnclaveBridge.cpp

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
// Copyright 2016 Intel Corporation.
2+
3+
// The source code, information and material ("Material") contained herein is
4+
// owned by Intel Corporation or its suppliers or licensors, and title to such
5+
// Material remains with Intel Corporation or its suppliers or licensors. The
6+
// Material contains proprietary information of Intel or its suppliers and
7+
// licensors. The Material is protected by worldwide copyright laws and treaty
8+
// provisions. No part of the Material may be used, copied, reproduced, modified,
9+
// published, uploaded, posted, transmitted, distributed or disclosed in any way
10+
// without Intel's prior express written permission. No license under any patent,
11+
// copyright or other intellectual property rights in the Material is granted to
12+
// or conferred upon you, either expressly, by implication, inducement, estoppel
13+
// or otherwise. Any license under such intellectual property rights must be
14+
// express and approved by Intel in writing.
15+
16+
// Include any supplier copyright notices as supplier requires Intel to use.
17+
18+
// Include supplier trademarks or logos as supplier requires Intel to use,
19+
// preceded by an asterisk. An asterisked footnote can be added as follows:
20+
// *Third Party trademarks are the property of their respective owners.
21+
22+
// Unless otherwise agreed by Intel in writing, you may not remove or alter this
23+
// notice or any other notice embedded in Materials by Intel or Intel's suppliers
24+
// or licensors in any way.
25+
26+
#include "stdafx.h"
27+
28+
#define ENCLAVENATIVE_API_EXPORTING 1
29+
30+
#include <sgx_urts.h>
31+
#include <tchar.h>
32+
#include <string.h>
33+
#include <Windows.h>
34+
#include "EnclaveBridge.h"
35+
#include "Enclave_u.h"
36+
37+
ENCLAVENATIVE_API sgx_status_t en_create_enclave (sgx_launch_token_t *token, sgx_enclave_id_t *eid, int *updated)
38+
{
39+
return sgx_create_enclave(ENCLAVE_FILE, SGX_DEBUG_FLAG, token, updated, eid, NULL);
40+
}
41+
42+
ENCLAVENATIVE_API sgx_status_t en_cpuid (sgx_enclave_id_t eid, int *rv, int leaf, uint32_t info[4])
43+
{
44+
return e_cpuid(eid, rv, leaf, info);
45+
}
46+
47+
ENCLAVENATIVE_API sgx_status_t en_genrand(sgx_enclave_id_t eid, int *rv, int kb, progress_callback_t callback, unsigned char *rbuffer)
48+
{
49+
sgx_status_t status;
50+
size_t cbsize = sizeof(progress_callback_t);
51+
52+
// Pass the callback pointer to the enclave as a 64-bit address value.
53+
status = e_genrand(eid, rv, kb, (void *)&callback, cbsize, rbuffer);
54+
55+
return status;
56+
}
57+
58+
59+
ENCLAVENATIVE_API sgx_status_t en_destroy_enclave (sgx_enclave_id_t eid)
60+
{
61+
return sgx_destroy_enclave(eid);
62+
}
63+
64+
int o_genrand_progress(void *cbref, size_t sz, int progress, int target)
65+
{
66+
progress_callback_t *callback = (progress_callback_t *) cbref;
67+
68+
// Recast as a pointer to our callback function.
69+
70+
if (callback == NULL) return 1;
71+
72+
// Propogate the cancellation condition back up the stack.
73+
return (*callback)(progress, target);
74+
}

Enclave Bridge/EnclaveBridge.h

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Copyright 2016 Intel Corporation.
2+
3+
// The source code, information and material ("Material") contained herein is
4+
// owned by Intel Corporation or its suppliers or licensors, and title to such
5+
// Material remains with Intel Corporation or its suppliers or licensors. The
6+
// Material contains proprietary information of Intel or its suppliers and
7+
// licensors. The Material is protected by worldwide copyright laws and treaty
8+
// provisions. No part of the Material may be used, copied, reproduced, modified,
9+
// published, uploaded, posted, transmitted, distributed or disclosed in any way
10+
// without Intel's prior express written permission. No license under any patent,
11+
// copyright or other intellectual property rights in the Material is granted to
12+
// or conferred upon you, either expressly, by implication, inducement, estoppel
13+
// or otherwise. Any license under such intellectual property rights must be
14+
// express and approved by Intel in writing.
15+
16+
// Include any supplier copyright notices as supplier requires Intel to use.
17+
18+
// Include supplier trademarks or logos as supplier requires Intel to use,
19+
// preceded by an asterisk. An asterisked footnote can be added as follows:
20+
// *Third Party trademarks are the property of their respective owners.
21+
22+
// Unless otherwise agreed by Intel in writing, you may not remove or alter this
23+
// notice or any other notice embedded in Materials by Intel or Intel's suppliers
24+
// or licensors in any way.
25+
26+
#pragma once
27+
28+
#include <sgx_urts.h>
29+
#include <tchar.h>
30+
#include <functional>
31+
32+
typedef std::function<int(int, int)> progress_callback_t;
33+
34+
#ifdef ENCLAVENATIVE_API_EXPORTING
35+
#define ENCLAVENATIVE_API __declspec(dllexport)
36+
#else
37+
#define ENCLAVENATIVE_API __declspec(dllimport)
38+
#endif
39+
40+
#define ENCLAVE_FILE _T("Enclave.signed.dll")
41+
42+
extern "C" {
43+
44+
ENCLAVENATIVE_API sgx_status_t en_create_enclave (sgx_launch_token_t *token, sgx_enclave_id_t *eid, int *updated);
45+
ENCLAVENATIVE_API sgx_status_t en_destroy_enclave (sgx_enclave_id_t eid);
46+
ENCLAVENATIVE_API sgx_status_t en_cpuid (sgx_enclave_id_t eid, int *rv, int leaf, uint32_t info[4]);
47+
ENCLAVENATIVE_API sgx_status_t en_genrand(sgx_enclave_id_t eid, int *rv, int kb, progress_callback_t callback, unsigned char *rbuffer);
48+
49+
};

0 commit comments

Comments
 (0)