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
9b190d93
Unverified
Commit
9b190d93
authored
May 27, 2020
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2002 add backup logic to init proccess
parent
07c553db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
SEKManager.cpp
SEKManager.cpp
+11
-9
sgxwallet.c
sgxwallet.c
+1
-3
No files found.
SEKManager.cpp
View file @
9b190d93
...
...
@@ -209,8 +209,7 @@ void enter_SEK(){
// if (DEBUG_PRINT)
// std::cerr << "your key is " << SEK << std::endl;
status
=
trustedSetSEK_backup
(
eid
,
&
err_status
,
errMsg
.
data
(),
encr_SEK
.
data
(),
&
enc_len
,
SEK
.
c_str
()
);
status
=
trustedSetSEK_backup
(
eid
,
&
err_status
,
errMsg
.
data
(),
encr_SEK
.
data
(),
&
enc_len
,
SEK
.
c_str
());
if
(
status
!=
SGX_SUCCESS
){
cerr
<<
"RPCException thrown with status "
<<
status
<<
endl
;
throw
SGXException
(
status
,
errMsg
.
data
());
...
...
@@ -226,13 +225,16 @@ void enter_SEK(){
void
initSEK
(){
std
::
shared_ptr
<
std
::
string
>
encr_SEK_ptr
=
LevelDB
::
getLevelDb
()
->
readString
(
"SEK"
);
if
(
encr_SEK_ptr
==
nullptr
){
spdlog
::
error
(
"SEK was not created yet. Going to create SEK"
);
gen_SEK
();
}
else
{
trustedSetSEK
(
encr_SEK_ptr
);
if
(
encryptKeys
)
{
enter_SEK
();
}
else
{
if
(
encr_SEK_ptr
==
nullptr
)
{
spdlog
::
error
(
"SEK was not created yet. Going to create SEK"
);
gen_SEK
();
}
else
{
trustedSetSEK
(
encr_SEK_ptr
);
}
}
}
//a002e7ca685d46a32771d16fe2518e58
\ No newline at end of file
//a002e7ca685d46a32771d16fe2518e58
sgxwallet.c
View file @
9b190d93
...
...
@@ -118,7 +118,7 @@ int main(int argc, char *argv[]) {
encryptKeysOption
=
false
;
break
;
case
'b'
:
encryptKeysOption
=
fals
e
;
encryptKeysOption
=
tru
e
;
break
;
case
'y'
:
autoconfirmOption
=
true
;
...
...
@@ -132,8 +132,6 @@ int main(int argc, char *argv[]) {
setFullOptions
(
printDebugInfoOption
,
printTraceInfoOption
,
useHTTPSOption
,
autoconfirmOption
,
encryptKeysOption
);
uint32_t
enclaveLogLevel
=
L_INFO
;
if
(
printTraceInfoOption
)
{
...
...
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