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
685d6777
Unverified
Commit
685d6777
authored
Aug 31, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3170-completed-backup-changes
parent
c136929d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
SEKManager.cpp
SEKManager.cpp
+5
-1
testw.cpp
testw.cpp
+16
-1
testw.py
testw.py
+2
-1
No files found.
SEKManager.cpp
View file @
685d6777
...
...
@@ -39,7 +39,7 @@
using
namespace
std
;
#define BACKUP_PATH "./sgx_data/backup_key.txt"
#define BACKUP_PATH "./sgx_data/
sgxwallet_
backup_key.txt"
bool
case_insensitive_match
(
string
s1
,
string
s2
)
{
...
...
@@ -214,6 +214,8 @@ void trustedSetSEK(shared_ptr <string> hex_encrypted_SEK) {
#include "experimental/filesystem"
#include <boost/algorithm/string.hpp>
void
enter_SEK
()
{
vector
<
char
>
errMsg
(
BUF_LEN
,
0
);
...
...
@@ -237,6 +239,8 @@ void enter_SEK() {
string
sek
((
istreambuf_iterator
<
char
>
(
sek_file
)),
istreambuf_iterator
<
char
>
());
boost
::
trim
(
sek
);
spdlog
::
info
(
"Setting backup key ..."
);
while
(
!
checkHex
(
sek
,
16
))
{
...
...
testw.cpp
View file @
685d6777
...
...
@@ -95,6 +95,19 @@ public:
}
};
class
TestFixtureNoResetFromBackup
{
public
:
TestFixtureNoResetFromBackup
()
{
setFullOptions
(
L_INFO
,
false
,
true
,
true
);
initAll
(
L_INFO
,
false
,
true
);
}
~
TestFixtureNoResetFromBackup
()
{
TestUtils
::
destroyEnclave
();
}
};
class
TestFixtureNoReset
{
public
:
TestFixtureNoReset
()
{
...
...
@@ -107,7 +120,6 @@ public:
}
};
TEST_CASE_METHOD
(
TestFixture
,
"ECDSA AES keygen and signature test"
,
"[ecdsa-aes-key-sig-gen]"
)
{
vector
<
char
>
errMsg
(
BUF_LEN
,
0
);
int
errStatus
=
0
;
...
...
@@ -721,3 +733,6 @@ TEST_CASE_METHOD(TestFixture, "First run", "[first-run]") {
TEST_CASE_METHOD
(
TestFixtureNoReset
,
"Second run"
,
"[second-run]"
)
{
}
TEST_CASE_METHOD
(
TestFixtureNoResetFromBackup
,
"Backup restore"
,
"[backup-restore]"
)
{
}
testw.py
View file @
685d6777
...
...
@@ -29,7 +29,8 @@ username = getpass.getuser()
topDir
=
os
.
getcwd
()
+
"/sgxwallet"
print
(
"Top directory is:"
+
topDir
)
testList
=
[
"[first-run]"
,
"[second-run]"
,
"[second-run]"
,
"[backup-restore]"
,
"[cert-sign]"
,
"[get-server-status]"
,
"[get-server-version]"
,
...
...
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