SKALE-2892 remove depricated methods

parent a4382dc4
......@@ -247,12 +247,6 @@ SGXWalletServer::blsSignMessageHashImpl(const string &_keyShareName, const strin
}
Json::Value SGXWalletServer::importECDSAKeyImpl(const string &_key, const string &_keyName) {
INIT_RESULT(result)
result["encryptedKey"] = "";
RETURN_SUCCESS(result)
}
Json::Value SGXWalletServer::generateECDSAKeyImpl() {
spdlog::info("Entering {}", __FUNCTION__);
INIT_RESULT(result)
......@@ -280,34 +274,6 @@ Json::Value SGXWalletServer::generateECDSAKeyImpl() {
RETURN_SUCCESS(result);
}
Json::Value SGXWalletServer::renameECDSAKeyImpl(const string &_keyName, const string &_tempKeyName) {
spdlog::info("Entering {}", __FUNCTION__);
INIT_RESULT(result)
result["encryptedKey"] = "";
try {
string prefix = _tempKeyName.substr(0, 8);
if (prefix != "tmp_NEK:") {
throw SGXException(UNKNOWN_ERROR, "invalid temp key name");
}
prefix = _keyName.substr(0, 12);
if (prefix != "NEK_NODE_ID:") {
throw SGXException(UNKNOWN_ERROR, "invalid key name");
}
string postfix = _keyName.substr(12, _keyName.length());
if (!isStringDec(postfix)) {
throw SGXException(UNKNOWN_ERROR, "invalid key name");
}
shared_ptr <string> encryptedKey = readFromDb(_tempKeyName);
writeDataToDB(_keyName, *encryptedKey);
LevelDB::getLevelDb()->deleteTempNEK(_tempKeyName);
} HANDLE_SGX_EXCEPTION(result)
RETURN_SUCCESS(result);
}
Json::Value SGXWalletServer::ecdsaSignMessageHashImpl(int _base, const string &_keyName, const string &_messageHash) {
spdlog::trace("Entering {}", __FUNCTION__);
INIT_RESULT(result)
......@@ -672,10 +638,6 @@ Json::Value SGXWalletServer::generateECDSAKey() {
return generateECDSAKeyImpl();
}
Json::Value SGXWalletServer::renameECDSAKey(const string &_keyName, const string &_tmpKeyName) {
return renameECDSAKeyImpl(_keyName, _tmpKeyName);
}
Json::Value SGXWalletServer::getPublicECDSAKey(const string &_keyName) {
return getPublicECDSAKeyImpl(_keyName);
}
......@@ -693,10 +655,6 @@ Json::Value SGXWalletServer::blsSignMessageHash(const string &_keyShareName, con
return blsSignMessageHashImpl(_keyShareName, _messageHash, _t, _n);
}
Json::Value SGXWalletServer::importECDSAKey(const string &_key, const string &_keyName) {
return importECDSAKeyImpl(_key, _keyName);
}
Json::Value SGXWalletServer::complaintResponse(const string &polyName, int ind) {
return complaintResponseImpl(polyName, ind);
}
......
......@@ -51,12 +51,8 @@ public:
virtual Json::Value
blsSignMessageHash(const string &_keyShareName, const string &_messageHash, int _t, int _n);
virtual Json::Value importECDSAKey(const string &_key, const string &_keyName);
virtual Json::Value generateECDSAKey();
virtual Json::Value renameECDSAKey(const string &_keyName, const string &_tmpKeyName);
virtual Json::Value
ecdsaSignMessageHash(int _base, const string &_keyShareName, const string &_messageHash);
......@@ -102,12 +98,8 @@ public:
static Json::Value
blsSignMessageHashImpl(const string &_keyShareName, const string &_messageHash, int t, int n);
static Json::Value importECDSAKeyImpl(const string &_key, const string &_keyName);
static Json::Value generateECDSAKeyImpl();
static Json::Value renameECDSAKeyImpl(const string &_keyName, const string &_tempKeyName);
static Json::Value ecdsaSignMessageHashImpl(int _base, const string &keyName, const string &_messageHash);
static Json::Value getPublicECDSAKeyImpl(const string &_keyName);
......
......@@ -38,18 +38,6 @@ class StubClient : public jsonrpc::Client
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
Json::Value importECDSAKey(const std::string& key, const std::string& keyName)
{
Json::Value p;
p["key"] = key;
p["keyName"] = keyName;
Json::Value result = this->CallMethod("importECDSAKey",p);
if (result.isObject())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
Json::Value generateECDSAKey()
{
Json::Value p;
......@@ -61,18 +49,6 @@ class StubClient : public jsonrpc::Client
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
Json::Value renameECDSAKey(const std::string& KeyName, const std::string& tempKeyName)
{
Json::Value p;
p["keyName"] = KeyName;
p["tempKeyName"] = tempKeyName;
Json::Value result = this->CallMethod("renameECDSAKey",p);
if (result.isObject())
return result;
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
Json::Value getPublicECDSAKey(const std::string& keyName)
{
Json::Value p;
......
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