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
a7b11c04
Unverified
Commit
a7b11c04
authored
Mar 12, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test
parent
a2c0c34a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
ServerInit.cpp
ServerInit.cpp
+8
-8
ServerInit.h
ServerInit.h
+3
-3
testw.cpp
testw.cpp
+7
-7
No files found.
ServerInit.cpp
View file @
a7b11c04
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
void
init
_d
aemon
()
{
void
init
D
aemon
()
{
libff
::
init_alt_bn128_params
();
libff
::
init_alt_bn128_params
();
...
@@ -80,7 +80,7 @@ void init_daemon() {
...
@@ -80,7 +80,7 @@ void init_daemon() {
void
init
_e
nclave
()
{
void
init
E
nclave
()
{
eid
=
0
;
eid
=
0
;
updated
=
0
;
updated
=
0
;
...
@@ -131,23 +131,23 @@ void init_enclave() {
...
@@ -131,23 +131,23 @@ void init_enclave() {
int
sgxServerInited
=
0
;
int
sgxServerInited
=
0
;
void
initAll
(
bool
check_cert
,
bool
sign_automatically
,
void
(
*
SEK_func
)())
{
void
initAll
(
bool
_checkCert
,
bool
_autoSign
,
void
(
*
SEK_func
)())
{
cout
<<
"Running sgxwallet version:"
<<
SGXWALLET_VERSION
<<
endl
;
cout
<<
"Running sgxwallet version:"
<<
SGXWALLET_VERSION
<<
endl
;
//spdlog::set_pattern("%c");
//spdlog::set_pattern("%c");
if
(
sgxServerInited
==
1
)
if
(
sgxServerInited
==
1
)
return
;
return
;
init
_e
nclave
();
init
E
nclave
();
init
_d
aemon
();
init
D
aemon
();
//init_SEK();
//init_SEK();
func
();
SEK_
func
();
sgxServerInited
=
1
;
sgxServerInited
=
1
;
if
(
useHTTPS
)
{
if
(
useHTTPS
)
{
SGXWalletServer
::
initHttpsServer
(
check_c
ert
);
SGXWalletServer
::
initHttpsServer
(
_checkC
ert
);
initRegistrationServer
(
sign_automatically
);
initRegistrationServer
(
_autoSign
);
init_csrmanager_server
();
init_csrmanager_server
();
}
}
else
{
else
{
...
...
ServerInit.h
View file @
a7b11c04
...
@@ -30,11 +30,11 @@
...
@@ -30,11 +30,11 @@
#define EXTERNC
#define EXTERNC
#endif
#endif
EXTERNC
void
initAll
(
bool
check_cert
,
bool
sign_automatically
,
void
(
*
func
)());
EXTERNC
void
initAll
(
bool
_checkCert
,
bool
_autoSign
,
void
(
*
func
)());
EXTERNC
void
init
_d
aemon
();
EXTERNC
void
init
D
aemon
();
EXTERNC
void
init
_e
nclave
();
EXTERNC
void
init
E
nclave
();
...
...
testw.cpp
View file @
a7b11c04
...
@@ -169,7 +169,7 @@ TEST_CASE("DKG gen test", "[dkg-gen]") {
...
@@ -169,7 +169,7 @@ TEST_CASE("DKG gen test", "[dkg-gen]") {
autoconfirm
=
true
;
autoconfirm
=
true
;
//init_all();
//init_all();
init
_e
nclave
();
init
E
nclave
();
vector
<
uint8_t
>
encrypted_dkg_secret
(
DKG_MAX_SEALED_LEN
,
0
);
vector
<
uint8_t
>
encrypted_dkg_secret
(
DKG_MAX_SEALED_LEN
,
0
);
vector
<
char
>
errMsg
(
1024
,
0
);
vector
<
char
>
errMsg
(
1024
,
0
);
...
@@ -257,7 +257,7 @@ TEST_CASE("DKG public shares test", "[dkg-pub_shares]") {
...
@@ -257,7 +257,7 @@ TEST_CASE("DKG public shares test", "[dkg-pub_shares]") {
autoconfirm
=
true
;
autoconfirm
=
true
;
//init_all();
//init_all();
libff
::
init_alt_bn128_params
();
libff
::
init_alt_bn128_params
();
init
_e
nclave
();
init
E
nclave
();
vector
<
uint8_t
>
encrypted_dkg_secret
(
DKG_MAX_SEALED_LEN
,
0
);
vector
<
uint8_t
>
encrypted_dkg_secret
(
DKG_MAX_SEALED_LEN
,
0
);
vector
<
char
>
errMsg
(
1024
,
0
);
vector
<
char
>
errMsg
(
1024
,
0
);
...
@@ -327,7 +327,7 @@ TEST_CASE("DKG public shares test", "[dkg-pub_shares]") {
...
@@ -327,7 +327,7 @@ TEST_CASE("DKG public shares test", "[dkg-pub_shares]") {
TEST_CASE
(
"DKG encrypted secret shares test"
,
"[dkg-encr_sshares]"
)
{
TEST_CASE
(
"DKG encrypted secret shares test"
,
"[dkg-encr_sshares]"
)
{
autoconfirm
=
true
;
autoconfirm
=
true
;
// init_all();
// init_all();
init
_e
nclave
();
init
E
nclave
();
vector
<
char
>
errMsg
(
1024
,
1
);
vector
<
char
>
errMsg
(
1024
,
1
);
vector
<
char
>
result
(
130
,
1
);
vector
<
char
>
result
(
130
,
1
);
...
@@ -363,7 +363,7 @@ TEST_CASE("DKG encrypted secret shares test", "[dkg-encr_sshares]") {
...
@@ -363,7 +363,7 @@ TEST_CASE("DKG encrypted secret shares test", "[dkg-encr_sshares]") {
TEST_CASE
(
"DKG verification test"
,
"[dkg-verify]"
)
{
TEST_CASE
(
"DKG verification test"
,
"[dkg-verify]"
)
{
autoconfirm
=
true
;
autoconfirm
=
true
;
// init_all();
// init_all();
init
_e
nclave
();
init
E
nclave
();
vector
<
char
>
errMsg
(
1024
,
0
);
vector
<
char
>
errMsg
(
1024
,
0
);
vector
<
char
>
result
(
130
,
0
);
vector
<
char
>
result
(
130
,
0
);
...
@@ -401,7 +401,7 @@ TEST_CASE("DKG verification test", "[dkg-verify]") {
...
@@ -401,7 +401,7 @@ TEST_CASE("DKG verification test", "[dkg-verify]") {
TEST_CASE
(
"ECDSA keygen and signature test"
,
"[ecdsa_test]"
)
{
TEST_CASE
(
"ECDSA keygen and signature test"
,
"[ecdsa_test]"
)
{
autoconfirm
=
true
;
autoconfirm
=
true
;
init
_e
nclave
();
init
E
nclave
();
vector
<
char
>
errMsg
(
1024
,
0
);
vector
<
char
>
errMsg
(
1024
,
0
);
int
err_status
=
0
;
int
err_status
=
0
;
...
@@ -446,7 +446,7 @@ TEST_CASE("ECDSA keygen and signature test", "[ecdsa_test]") {
...
@@ -446,7 +446,7 @@ TEST_CASE("ECDSA keygen and signature test", "[ecdsa_test]") {
TEST_CASE
(
"Test test"
,
"[test_test]"
)
{
TEST_CASE
(
"Test test"
,
"[test_test]"
)
{
autoconfirm
=
true
;
autoconfirm
=
true
;
init
_e
nclave
();
init
E
nclave
();
vector
<
char
>
errMsg
(
1024
,
0
);
vector
<
char
>
errMsg
(
1024
,
0
);
int
err_status
=
0
;
int
err_status
=
0
;
...
@@ -476,7 +476,7 @@ TEST_CASE("Test test", "[test_test]") {
...
@@ -476,7 +476,7 @@ TEST_CASE("Test test", "[test_test]") {
TEST_CASE
(
"get public ECDSA key"
,
"[get_pub_ecdsa_key_test]"
)
{
TEST_CASE
(
"get public ECDSA key"
,
"[get_pub_ecdsa_key_test]"
)
{
autoconfirm
=
true
;
autoconfirm
=
true
;
//init_all();
//init_all();
init
_e
nclave
();
init
E
nclave
();
int
err_status
=
0
;
int
err_status
=
0
;
vector
<
char
>
errMsg
(
1024
,
0
);
vector
<
char
>
errMsg
(
1024
,
0
);
...
...
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