Unverified Commit af6fc348 authored by kladko's avatar kladko

SKALE-3067-cleanup-sgx

parent ebb1f0f7
...@@ -224,9 +224,7 @@ SGXWalletServer::blsSignMessageHashImpl(const string &_keyShareName, const strin ...@@ -224,9 +224,7 @@ SGXWalletServer::blsSignMessageHashImpl(const string &_keyShareName, const strin
value = readFromDb(_keyShareName); value = readFromDb(_keyShareName);
if (!bls_sign(value->c_str(), _messageHash.c_str(), t, n, _signerIndex, signature.data())) { if (!bls_sign(value->c_str(), _messageHash.c_str(), t, n, _signerIndex, signature.data())) {
result["status"] = -1; throw SGXException(-1, "Could not sign data ");
result["errorMessage"] = "Could not sign";
return result;
} }
} HANDLE_SGX_EXCEPTION(result) } HANDLE_SGX_EXCEPTION(result)
...@@ -534,7 +532,7 @@ Json::Value SGXWalletServer::getBLSPublicKeyShareImpl(const string &_blsKeyName) ...@@ -534,7 +532,7 @@ Json::Value SGXWalletServer::getBLSPublicKeyShareImpl(const string &_blsKeyName)
} }
} HANDLE_SGX_EXCEPTION(result) } HANDLE_SGX_EXCEPTION(result)
return result; RETURN_SUCCESS(result);
} }
Json::Value SGXWalletServer::complaintResponseImpl(const string &_polyName, int _ind) { Json::Value SGXWalletServer::complaintResponseImpl(const string &_polyName, int _ind) {
......
...@@ -89,7 +89,8 @@ extern int autoconfirm; ...@@ -89,7 +89,8 @@ extern int autoconfirm;
#define INVALID_ECDSA_KEY_NAME -20 #define INVALID_ECDSA_KEY_NAME -20
#define INVALID_HEX -21 #define INVALID_HEX -21
#define INVALID_ECSDA_SIGNATURE -22 #define INVALID_ECSDA_SIGNATURE -22
#define KEY_NAME_ALREADY_EXIST -23 #define KEY_NAME_ALREADY_EXISTS -23 \
#define ERROR_IN_ENCLAVE -33 #define ERROR_IN_ENCLAVE -33
......
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