SKALE-3431 fix build

parent 60260cd5
...@@ -236,7 +236,7 @@ getSecretShares(const string &_polyName, const char *_encryptedPolyHex, const ve ...@@ -236,7 +236,7 @@ getSecretShares(const string &_polyName, const char *_encryptedPolyHex, const ve
sgx_status_t status = SGX_SUCCESS; sgx_status_t status = SGX_SUCCESS;
READ_LOCK(initMutex); READ_LOCK(sgxInitMutex);
status = trustedSetEncryptedDkgPoly(eid, &errStatus, errMsg1.data(), encrDKGPoly.data(), encLen); status = trustedSetEncryptedDkgPoly(eid, &errStatus, errMsg1.data(), encrDKGPoly.data(), encLen);
......
...@@ -242,7 +242,6 @@ string encryptECDSAKey(const string& _key) { ...@@ -242,7 +242,6 @@ string encryptECDSAKey(const string& _key) {
uint64_t enc_len = 0; uint64_t enc_len = 0;
sgx_status_t status = SGX_SUCCESS; sgx_status_t status = SGX_SUCCESS;
std::cout << "HERE" << std::endl;
RESTART_BEGIN RESTART_BEGIN
status = trustedEncryptKey(eid, &errStatus, errString.data(), key.data(), status = trustedEncryptKey(eid, &errStatus, errString.data(), key.data(),
encryptedKey.data(), &enc_len); encryptedKey.data(), &enc_len);
......
...@@ -103,7 +103,7 @@ sgxwallet_LDADD=-l$(SGX_URTS_LIB) -l$(SGX_UAE_SERVICE_LIB) -LlibBLS/deps/deps_in ...@@ -103,7 +103,7 @@ sgxwallet_LDADD=-l$(SGX_URTS_LIB) -l$(SGX_UAE_SERVICE_LIB) -LlibBLS/deps/deps_in
-l:libbls.a -l:libleveldb.a \ -l:libbls.a -l:libleveldb.a \
-l:libff.a -lgmp -ldl -l:libsgx_capable.a -l:libsgx_tprotected_fs.a \ -l:libff.a -lgmp -ldl -l:libsgx_capable.a -l:libsgx_tprotected_fs.a \
-ljsonrpccpp-stub -ljsonrpccpp-server -ljsonrpccpp-client -ljsonrpccpp-common -ljsoncpp -lmicrohttpd \ -ljsonrpccpp-stub -ljsonrpccpp-server -ljsonrpccpp-client -ljsonrpccpp-common -ljsoncpp -lmicrohttpd \
-lboost_system -lboost_thread -lgnutls -lgcrypt -lcurl -lssl -lcrypto -lz -lpthread -lstdc++fs -lboost_system -lboost_thread -lgnutls -lgcrypt -lidn2 -lcurl -lssl -lcrypto -lz -lpthread -lstdc++fs
testw_SOURCES=testw.cpp $(COMMON_SRC) testw_SOURCES=testw.cpp $(COMMON_SRC)
...@@ -115,4 +115,4 @@ cert_util_SOURCES= InvalidStateException.cpp Exception.cpp InvalidArgumentExcep ...@@ -115,4 +115,4 @@ cert_util_SOURCES= InvalidStateException.cpp Exception.cpp InvalidArgumentExcep
cert_util_LDADD=-LlibBLS/deps/deps_inst/x86_or_x64/lib -Lleveldb/build -LlibBLS/build \ cert_util_LDADD=-LlibBLS/deps/deps_inst/x86_or_x64/lib -Lleveldb/build -LlibBLS/build \
-LlibBLS/build/libff/libff \ -LlibBLS/build/libff/libff \
-l:libbls.a -l:libleveldb.a \ -l:libbls.a -l:libleveldb.a \
-l:libff.a -lgmp -ljsonrpccpp-stub -ljsonrpccpp-server -ljsonrpccpp-client -ljsonrpccpp-common -ljsoncpp -lmicrohttpd -lgnutls -lgcrypt -lcurl -lssl -lcrypto -lz -lpthread -ldl -l:libff.a -lgmp -ljsonrpccpp-stub -ljsonrpccpp-server -ljsonrpccpp-client -ljsonrpccpp-common -ljsoncpp -lmicrohttpd -lgnutls -lgcrypt -lidn2 -lcurl -lssl -lcrypto -lz -lpthread -ldl
...@@ -65,7 +65,7 @@ void create_test_key() { ...@@ -65,7 +65,7 @@ void create_test_key() {
sgx_status_t status = SGX_SUCCESS; sgx_status_t status = SGX_SUCCESS;
{ {
READ_LOCK(initMutex); READ_LOCK(sgxInitMutex);
status = trustedEncryptKey(eid, &errStatus, errMsg.data(), key.c_str(), encrypted_key, &enc_len); status = trustedEncryptKey(eid, &errStatus, errMsg.data(), key.c_str(), encrypted_key, &enc_len);
} }
...@@ -96,7 +96,7 @@ void validate_SEK() { ...@@ -96,7 +96,7 @@ void validate_SEK() {
sgx_status_t status = SGX_SUCCESS; sgx_status_t status = SGX_SUCCESS;
{ {
READ_LOCK(initMutex); READ_LOCK(sgxInitMutex);
status = trustedDecryptKey(eid, &err_status, errMsg.data(), encr_test_key.data(), len, decr_key.data()); status = trustedDecryptKey(eid, &err_status, errMsg.data(), encr_test_key.data(), len, decr_key.data());
} }
...@@ -126,7 +126,7 @@ shared_ptr <vector<uint8_t>> check_and_set_SEK(const string &SEK) { ...@@ -126,7 +126,7 @@ shared_ptr <vector<uint8_t>> check_and_set_SEK(const string &SEK) {
sgx_status_t status = SGX_SUCCESS; sgx_status_t status = SGX_SUCCESS;
{ {
READ_LOCK(initMutex); READ_LOCK(sgxInitMutex);
status = trustedSetSEKBackup(eid, &err_status, errMsg.data(), encrypted_SEK->data(), &l, status = trustedSetSEKBackup(eid, &err_status, errMsg.data(), encrypted_SEK->data(), &l,
SEK.c_str()); SEK.c_str());
} }
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
using namespace std; using namespace std;
std::shared_timed_mutex initMutex; std::shared_timed_mutex sgxInitMutex;
uint64_t initTime; uint64_t initTime;
void setFullOptions(uint64_t _logLevel, int _useHTTPS, int _autoconfirm, int _enterBackupKey) { void setFullOptions(uint64_t _logLevel, int _useHTTPS, int _autoconfirm, int _enterBackupKey) {
......
...@@ -86,7 +86,7 @@ uint64_t initEnclave() { ...@@ -86,7 +86,7 @@ uint64_t initEnclave() {
{ {
WRITE_LOCK(initMutex); WRITE_LOCK(sgxInitMutex);
if (eid != 0) { if (eid != 0) {
if (sgx_destroy_enclave(eid) != SGX_SUCCESS) { if (sgx_destroy_enclave(eid) != SGX_SUCCESS) {
......
...@@ -21,12 +21,9 @@ ...@@ -21,12 +21,9 @@
@date 2020 @date 2020
*/ */
#include <libff/algebra/fields/fp.hpp>
#include <dkg/dkg.h> #include <dkg/dkg.h>
#include <jsonrpccpp/server/connectors/httpserver.h> #include <jsonrpccpp/server/connectors/httpserver.h>
#include <libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp> #include <libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp>
#include <libff/algebra/exponentiation/exponentiation.hpp>
#include <libff/algebra/fields/fp.hpp>
#include <dkg/dkg.h> #include <dkg/dkg.h>
#include "sgxwallet_common.h" #include "sgxwallet_common.h"
#include "third_party/intel/create_enclave.h" #include "third_party/intel/create_enclave.h"
......
...@@ -24,12 +24,11 @@ ...@@ -24,12 +24,11 @@
#ifndef SGXWALLET_TESTUTILS_H #ifndef SGXWALLET_TESTUTILS_H
#define SGXWALLET_TESTUTILS_H #define SGXWALLET_TESTUTILS_H
#include <libff/algebra/fields/fp.hpp>
#include <dkg/dkg.h> #include <dkg/dkg.h>
#include <jsonrpccpp/server/connectors/httpserver.h> #include <jsonrpccpp/server/connectors/httpserver.h>
#include <libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp> #include <libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp>
#include <libff/algebra/exponentiation/exponentiation.hpp> // #include <libff/algebra/exponentiation/exponentiation.hpp>
#include <libff/algebra/fields/fp.hpp> // #include <libff/algebra/fields/fp.hpp>
#include <dkg/dkg.h> #include <dkg/dkg.h>
#include "sgxwallet_common.h" #include "sgxwallet_common.h"
#include "third_party/intel/create_enclave.h" #include "third_party/intel/create_enclave.h"
......
...@@ -98,7 +98,7 @@ BOOST_THROW_EXCEPTION(runtime_error(__ERR_STRING__)); \ ...@@ -98,7 +98,7 @@ BOOST_THROW_EXCEPTION(runtime_error(__ERR_STRING__)); \
#include <shared_mutex> #include <shared_mutex>
extern std::shared_timed_mutex initMutex; extern std::shared_timed_mutex sgxInitMutex;
extern uint64_t initTime; extern uint64_t initTime;
#if SGX_MODE == SIM #if SGX_MODE == SIM
......
...@@ -115,7 +115,7 @@ int __ATTEMPTS__ = 0; \ ...@@ -115,7 +115,7 @@ int __ATTEMPTS__ = 0; \
do {\ do {\
__ATTEMPTS__++; \ __ATTEMPTS__++; \
{\ {\
READ_LOCK(initMutex); READ_LOCK(sgxInitMutex);
#define RESTART_END \ #define RESTART_END \
} \ } \
......
...@@ -21,12 +21,9 @@ ...@@ -21,12 +21,9 @@
@date 2020 @date 2020
*/ */
#include <libff/algebra/fields/fp.hpp>
#include <dkg/dkg.h> #include <dkg/dkg.h>
#include <jsonrpccpp/server/connectors/httpserver.h> #include <jsonrpccpp/server/connectors/httpserver.h>
#include <libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp> #include <libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp>
#include <libff/algebra/exponentiation/exponentiation.hpp>
#include <libff/algebra/fields/fp.hpp>
#include <dkg/dkg.h> #include <dkg/dkg.h>
#include "sgxwallet_common.h" #include "sgxwallet_common.h"
#include "third_party/intel/create_enclave.h" #include "third_party/intel/create_enclave.h"
......
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