Unverified Commit a7b11c04 authored by kladko's avatar kladko

Fix test

parent a2c0c34a
......@@ -71,7 +71,7 @@
void init_daemon() {
void initDaemon() {
libff::init_alt_bn128_params();
......@@ -80,7 +80,7 @@ void init_daemon() {
void init_enclave() {
void initEnclave() {
eid = 0;
updated = 0;
......@@ -131,23 +131,23 @@ void init_enclave() {
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;
//spdlog::set_pattern("%c");
if (sgxServerInited == 1)
return;
init_enclave();
init_daemon();
initEnclave();
initDaemon();
//init_SEK();
func();
SEK_func();
sgxServerInited = 1;
if (useHTTPS) {
SGXWalletServer::initHttpsServer(check_cert);
initRegistrationServer(sign_automatically);
SGXWalletServer::initHttpsServer(_checkCert);
initRegistrationServer(_autoSign);
init_csrmanager_server();
}
else {
......
......@@ -30,11 +30,11 @@
#define EXTERNC
#endif
EXTERNC void initAll(bool check_cert, bool sign_automatically, void (*func)());
EXTERNC void initAll(bool _checkCert, bool _autoSign, void (*func)());
EXTERNC void init_daemon();
EXTERNC void initDaemon();
EXTERNC void init_enclave();
EXTERNC void initEnclave();
......
......@@ -169,7 +169,7 @@ TEST_CASE("DKG gen test", "[dkg-gen]") {
autoconfirm = true;
//init_all();
init_enclave();
initEnclave();
vector<uint8_t> encrypted_dkg_secret(DKG_MAX_SEALED_LEN, 0);
vector<char> errMsg(1024, 0);
......@@ -257,7 +257,7 @@ TEST_CASE("DKG public shares test", "[dkg-pub_shares]") {
autoconfirm = true;
//init_all();
libff::init_alt_bn128_params();
init_enclave();
initEnclave();
vector<uint8_t> encrypted_dkg_secret(DKG_MAX_SEALED_LEN, 0);
vector<char> errMsg(1024, 0);
......@@ -327,7 +327,7 @@ TEST_CASE("DKG public shares test", "[dkg-pub_shares]") {
TEST_CASE("DKG encrypted secret shares test", "[dkg-encr_sshares]") {
autoconfirm = true;
// init_all();
init_enclave();
initEnclave();
vector<char> errMsg(1024, 1);
vector<char> result(130, 1);
......@@ -363,7 +363,7 @@ TEST_CASE("DKG encrypted secret shares test", "[dkg-encr_sshares]") {
TEST_CASE("DKG verification test", "[dkg-verify]") {
autoconfirm = true;
// init_all();
init_enclave();
initEnclave();
vector<char> errMsg(1024, 0);
vector<char> result(130, 0);
......@@ -401,7 +401,7 @@ TEST_CASE("DKG verification test", "[dkg-verify]") {
TEST_CASE("ECDSA keygen and signature test", "[ecdsa_test]") {
autoconfirm = true;
init_enclave();
initEnclave();
vector<char> errMsg(1024, 0);
int err_status = 0;
......@@ -446,7 +446,7 @@ TEST_CASE("ECDSA keygen and signature test", "[ecdsa_test]") {
TEST_CASE("Test test", "[test_test]") {
autoconfirm = true;
init_enclave();
initEnclave();
vector<char> errMsg(1024, 0);
int err_status = 0;
......@@ -476,7 +476,7 @@ TEST_CASE("Test test", "[test_test]") {
TEST_CASE("get public ECDSA key", "[get_pub_ecdsa_key_test]") {
autoconfirm = true;
//init_all();
init_enclave();
initEnclave();
int err_status = 0;
vector<char> errMsg(1024, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment