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
da512844
Unverified
Commit
da512844
authored
May 06, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed docs
parent
0ed2e27c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
24 deletions
+5
-24
testw.cpp
testw.cpp
+2
-21
testw.py
testw.py
+3
-3
No files found.
testw.cpp
View file @
da512844
...
...
@@ -116,8 +116,7 @@ int updated;
void
resetDB
()
{
sgx_destroy_enclave
(
eid
);
REQUIRE
(
system
(
"rm -rf "
SGXDATA_FOLDER
)
==
0
);
REQUIRE
(
system
(
"bash -c
\"
rm -rf "
SGXDATA_FOLDER
"*
\"
"
)
==
0
);
}
shared_ptr
<
string
>
encryptTestKey
()
{
...
...
@@ -1003,7 +1002,7 @@ TEST_CASE_METHOD(Fixture, "AES_DKG test", "[aes-dkg]") {
REQUIRE
(
pubBLSKeys
[
i
][
"status"
]
==
0
);
string
hash
=
"09c6137b97cdf159b9950f1492ee059d1e2b10eaf7d51f3a97d61f2eee2e81db"
;
string
hash
=
SAMPLE_HASH
;
blsSigShares
[
i
]
=
c
.
blsSignMessageHash
(
blsName
,
hash
,
t
,
n
,
i
+
1
);
REQUIRE
(
blsSigShares
[
i
][
"status"
]
==
0
);
...
...
@@ -1029,24 +1028,6 @@ TEST_CASE_METHOD(Fixture, "AES_DKG test", "[aes-dkg]") {
REQUIRE
(
common_public
.
VerifySigWithHelper
(
hash_arr
,
commonSig
,
t
,
n
));
}
TEST_CASE_METHOD
(
Fixture
,
"BLS sign test"
,
"[bls-sign]"
)
{
HttpClient
client
(
"http://localhost:1029"
);
StubClient
c
(
client
,
JSONRPC_CLIENT_V2
);
string
hash
=
SAMPLE_HASH
;
string
blsName
=
"BLS_KEY:SCHAIN_ID:323669558:NODE_ID:1:DKG_ID:338183455"
;
int
n
=
4
,
t
=
4
;
Json
::
Value
pubBLSKey
=
c
.
getBLSPublicKeyShare
(
blsName
);
REQUIRE
(
pubBLSKey
[
"status"
]
==
0
);
Json
::
Value
sign
=
c
.
blsSignMessageHash
(
blsName
,
hash
,
t
,
n
,
1
);
REQUIRE
(
sign
[
"status"
]
==
0
);
}
TEST_CASE_METHOD
(
FixtureResetDB
,
"AES encrypt/decrypt"
,
"[AES-encrypt-decrypt]"
)
{
...
...
testw.py
View file @
da512844
...
...
@@ -41,14 +41,14 @@ testList = ["[get-server-status]",
"[ecdsa-get-pub-key]"
,
"[ecdsa-key-gen-api]"
,
"[ecdsa-key-gen-sign-api]"
,
"[bls-key-encrypt]"
,
"[dkg-gen]"
,
"[bls-key-encrypt]"
,
"[dkg-gen]"
,
"[dkg-encr-sshares]"
,
"[dkg-verify]"
,
"[bls-dkg]"
,
"[dkg-api]"
,
"[
is-poly
]"
,
"[
poly-exists
]"
,
"[many-threads]"
,
#"[bls-sign]",
"[aes-encrypt-decrypt]"
]
...
...
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