Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
8d448910
Unverified
Commit
8d448910
authored
Sep 08, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3205
parent
5dbec9eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
ServerInit.cpp
ServerInit.cpp
+8
-2
ServerInit.h
ServerInit.h
+1
-1
common.h
common.h
+1
-0
No files found.
ServerInit.cpp
View file @
8d448910
...
...
@@ -57,6 +57,8 @@
#include "SGXException.h"
#include "SGXWalletServer.hpp"
uint32_t
enclaveLogLevel
=
0
;
void
initUserSpace
()
{
libff
::
inhibit_profiling_counters
=
true
;
...
...
@@ -110,7 +112,7 @@ void initEnclave() {
spdlog
::
info
(
"Enclave created and started successfully"
);
status
=
trustedEnclaveInit
(
eid
,
l
ogLevel
);
status
=
trustedEnclaveInit
(
eid
,
enclaveL
ogLevel
);
}
if
(
status
!=
SGX_SUCCESS
)
{
...
...
@@ -122,10 +124,13 @@ void initEnclave() {
}
void
initAll
(
uint32_t
_logLevel
,
bool
_checkCert
,
bool
_autoSign
)
{
static
atomic
<
bool
>
sgxServerInited
(
false
);
static
mutex
initMutex
;
enclaveLogLevel
=
_logLevel
;
lock_guard
<
mutex
>
lock
(
initMutex
);
...
...
@@ -138,7 +143,8 @@ void initAll(uint32_t _logLevel, bool _checkCert, bool _autoSign) {
CHECK_STATE
(
sgxServerInited
!=
1
)
sgxServerInited
=
1
;
initEnclave
(
_logLevel
);
initEnclave
();
initUserSpace
();
initSEK
();
...
...
ServerInit.h
View file @
8d448910
...
...
@@ -36,7 +36,7 @@ EXTERNC void initAll(uint32_t _logLevel, bool _checkCert, bool _autoSign);
EXTERNC
void
initUserSpace
();
EXTERNC
void
initEnclave
(
uint32_t
_logLevel
);
EXTERNC
void
initEnclave
();
...
...
common.h
View file @
8d448910
...
...
@@ -111,4 +111,5 @@ extern uint64_t initTime;
#define WRITE_LOCK(__X__) std::unique_lock<std::shared_timed_mutex> __LOCK__(__X__);
#endif //SGXWALLET_COMMON_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment